Skip to content

Commit

Permalink
Fix some layout issues
Browse files Browse the repository at this point in the history
Some of the layout started rendering wrong. Possibly the ImGui library
changed something?
  • Loading branch information
behindcurtain3 committed Mar 24, 2024
1 parent b9f2609 commit bf39224
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ internal void Display(GlobalUIState uiState)
ImGui.EndChild();
}
ImGui.SameLine();
ImGui.SetCursorPosY(27f);

var position = ImGui.GetCursorPos();
if (ImGui.BeginChild("ComponentDesignChildWindow2", new Vector2(windowContentSize.X * 0.49f, windowContentSize.Y * 0.65f), true))
Expand Down
1 change: 1 addition & 0 deletions Pulsar4X/Pulsar4X.Client/EmpireManagement/FleetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ private void DisplayShips()
ImGui.EndChild();
}

ImGui.SetCursorPosY(ImGui.GetCursorPosY() - 23f);
ImGui.SetCursorPosX(xPosition);
if(ImGui.Button("Select All/None", new Vector2(Styles.LeftColumnWidthLg, 0f)))
{
Expand Down
4 changes: 4 additions & 0 deletions Pulsar4X/Pulsar4X.Client/EmpireManagement/ShipDesignWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,14 @@ internal override void Display()
ImGui.EndChild();
}
ImGui.SameLine();
ImGui.SetCursorPosY(27f);
if(ImGui.BeginChild("ShipDesign2", secondChildSize, true))
{
DisplayComponents();
ImGui.EndChild();
}
ImGui.SameLine();
ImGui.SetCursorPosY(27f);
if(ImGui.BeginChild("ShipDesign3", thirdChildSize, true))
{
DisplayStats();
Expand Down Expand Up @@ -354,6 +356,7 @@ internal void DisplayComponents()
{
_armor = _armorSelection[_armorIndex];
DesignChanged = true;
ImGui.EndCombo();
}

ImGui.TableNextColumn();
Expand Down Expand Up @@ -485,6 +488,7 @@ internal void DisplayComponentSelection()
{
AvailableShipComponents = AllShipComponents.Where(t => t.ComponentType.Equals(_sortedComponentNames[_componentFilterIndex])).ToList();
}
ImGui.EndCombo();
}

if(ImGui.BeginTable("DesignStatsTables", 3, ImGuiTableFlags.BordersInnerV | ImGuiTableFlags.RowBg))
Expand Down

0 comments on commit bf39224

Please sign in to comment.