mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 05:04:16 +01:00
Fix automated design rows.
This commit is contained in:
parent
66f040ffa8
commit
6e59ad0f1a
1 changed files with 9 additions and 2 deletions
|
|
@ -151,9 +151,15 @@ public class SetPanel
|
||||||
+ 150 * ImGuiHelpers.GlobalScale;
|
+ 150 * ImGuiHelpers.GlobalScale;
|
||||||
|
|
||||||
var singleRow = ImGui.GetContentRegionAvail().X >= requiredSizeOneLine || numSpacing == 0;
|
var singleRow = ImGui.GetContentRegionAvail().X >= requiredSizeOneLine || numSpacing == 0;
|
||||||
|
var numRows = (singleRow, _config.ShowUnlockedItemWarnings) switch
|
||||||
|
{
|
||||||
|
(true, true) => 6,
|
||||||
|
(true, false) => 5,
|
||||||
|
(false, true) => 5,
|
||||||
|
(false, false) => 4,
|
||||||
|
};
|
||||||
|
|
||||||
using var table = ImRaii.Table("SetTable", singleRow && _config.ShowUnlockedItemWarnings ? 6 : 5,
|
using var table = ImRaii.Table("SetTable", numRows, ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollX | ImGuiTableFlags.ScrollY);
|
||||||
ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollX | ImGuiTableFlags.ScrollY);
|
|
||||||
if (!table)
|
if (!table)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -184,6 +190,7 @@ public class SetPanel
|
||||||
|
|
||||||
if (_config.ShowUnlockedItemWarnings)
|
if (_config.ShowUnlockedItemWarnings)
|
||||||
ImGui.TableSetupColumn(string.Empty, ImGuiTableColumnFlags.WidthFixed, 2 * ImGui.GetFrameHeight() + 4 * ImGuiHelpers.GlobalScale);
|
ImGui.TableSetupColumn(string.Empty, ImGuiTableColumnFlags.WidthFixed, 2 * ImGui.GetFrameHeight() + 4 * ImGuiHelpers.GlobalScale);
|
||||||
|
|
||||||
ImGui.TableHeadersRow();
|
ImGui.TableHeadersRow();
|
||||||
foreach (var (design, idx) in Selection.Designs.WithIndex())
|
foreach (var (design, idx) in Selection.Designs.WithIndex())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue