Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions UltimateCombo/Window/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ internal class ConfigWindow : Dalamud.Interface.Windowing.Window
.GetValues<Presets>()
.Select(preset => (Preset: preset, Info: preset.GetAttribute<CustomComboInfoAttribute>()))
.Where(tpl => tpl.Info != null && PresetStorage.GetParent(tpl.Preset) == null)
.OrderByDescending(tpl => tpl.Info!.JobID == 0)
.ThenByDescending(tpl => tpl.Info!.JobID == PLD.JobID)
.OrderByDescending(tpl => tpl.Info!.JobID == PLD.JobID)
.ThenByDescending(tpl => tpl.Info!.JobID == WAR.JobID)
.ThenByDescending(tpl => tpl.Info!.JobID == DRK.JobID)
.ThenByDescending(tpl => tpl.Info!.JobID == GNB.JobID)
Expand Down
12 changes: 12 additions & 0 deletions UltimateCombo/Window/Tabs/PvEWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ internal class PvEWindow : ConfigWindow

if (OpenJob == string.Empty)
{
// start two-column layout
ImGui.Columns(2, "preset_columns", false);

foreach (var jobName in GroupedPresets.Keys)
{
var abbreviation = GroupedPresets[jobName].First().Info.JobShorthand;
Expand All @@ -49,10 +52,19 @@ internal class PvEWindow : ConfigWindow
ImGui.PopStyleColor();
ImGui.PopStyleVar();
}

// move to next column after drawing this item
ImGui.NextColumn();
}

// restore single column mode
ImGui.Columns(1);
}
else
{
// ensure column state is reset when opening a job
ImGui.Columns(1);

var id = GroupedPresets[OpenJob].First().Info.JobID;
IDalamudTextureWrap? icon = Icons.GetJobIcon(id);
var childHeight = icon is null ? 24f.Scale() : (icon.Size.Y / 2f).Scale() + 4f;
Expand Down
12 changes: 12 additions & 0 deletions UltimateCombo/Window/Tabs/PvPWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ internal class PvPWindow : ConfigWindow

if (OpenJob == string.Empty)
{
// start two-column layout
ImGui.Columns(2, "preset_columns", false);

foreach (var jobName in GroupedPresets.Where(x => x.Value.Any(y => PresetStorage.IsPvP(y.Preset))).Select(x => x.Key))
{
var abbreviation = GroupedPresets[jobName].First().Info.JobShorthand;
Expand All @@ -48,10 +51,19 @@ internal class PvPWindow : ConfigWindow
ImGui.PopStyleColor();
ImGui.PopStyleVar();
}

// move to next column after drawing this item
ImGui.NextColumn();
}

// restore single column mode
ImGui.Columns(1);
}
else
{
//ensure column state is reset when opening a job
ImGui.Columns(1);

var id = GroupedPresets[OpenJob].First().Info.JobID;
IDalamudTextureWrap? icon = Icons.GetJobIcon(id);
var childHeight = icon is null ? 24f.Scale() : (icon.Size.Y / 2f.Scale()) + 4f;
Expand Down