fix: fit all buttons on screen
This commit is contained in:
parent
1760f97697
commit
4552183f6a
|
@ -39,6 +39,15 @@ internal class QuestionsTab {
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var label = active.Answers[i];
|
||||||
|
var buttonSize = ImGuiHelpers.GetButtonSize(label);
|
||||||
|
var xPosAfter = ImGui.GetCursorPosX()
|
||||||
|
+ buttonSize.X
|
||||||
|
+ ImGui.GetStyle().ItemSpacing.X;
|
||||||
|
if (i != 0 && xPosAfter > ImGui.GetContentRegionAvail().X) {
|
||||||
|
ImGui.Dummy(Vector2.Zero);
|
||||||
|
}
|
||||||
|
|
||||||
var disabled = this._voting || active is FullQuestion;
|
var disabled = this._voting || active is FullQuestion;
|
||||||
using var endDisabled = ImGuiHelper.WithDisabled(disabled);
|
using var endDisabled = ImGuiHelper.WithDisabled(disabled);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue