Skip to content

Commit 0c88609

Browse files
committed
add group preset indicator to UI
1 parent ad547d0 commit 0c88609

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

BossMod/BossMod.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
33
<PropertyGroup>
4-
<Version>0.4.21.6</Version>
4+
<Version>0.4.21.7</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

BossMod/Config/ConfigUI.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,43 @@ private static bool DrawProperty(string label, string tooltip, ConfigNode node,
387387
return modified;
388388
}
389389

390+
public static void DrawGroupPresetIndicator()
391+
{
392+
ImGui.AlignTextToFramePadding();
393+
UIMisc.IconText(Dalamud.Interface.FontAwesomeIcon.ListUl);
394+
if (ImGui.IsItemHovered())
395+
ImGui.SetTooltip("This configuration option includes presets. Right click on the dropdown to select a preset.");
396+
ImGui.SameLine();
397+
}
398+
390399
private static bool DrawProperty(string label, string tooltip, ConfigNode node, FieldInfo member, GroupAssignment v, ConfigRoot root, UITree tree, WorldState ws)
391400
{
392401
var group = member.GetCustomAttribute<GroupDetailsAttribute>();
393402
if (group == null)
394403
return false;
395404

396-
DrawHelp(tooltip);
405+
var spaced = false;
406+
407+
ImGui.AlignTextToFramePadding();
408+
if (tooltip.Length > 0)
409+
{
410+
spaced = true;
411+
UIMisc.HelpMarker(tooltip);
412+
ImGui.SameLine();
413+
}
414+
415+
if (member.GetCustomAttributes<GroupPresetAttribute>().Any())
416+
{
417+
spaced = true;
418+
DrawGroupPresetIndicator();
419+
}
420+
421+
if (!spaced)
422+
{
423+
using (ImRaii.PushColor(ImGuiCol.Text, 0))
424+
UIMisc.IconText(Dalamud.Interface.FontAwesomeIcon.InfoCircle);
425+
}
426+
397427
var modified = false;
398428
foreach (var tn in tree.Node(label, false, v.Validate() ? 0xffffffff : 0xff00ffff, () => DrawPropertyContextMenu(node, member, v)))
399429
{

BossMod/Modules/Dawntrail/Savage/RM12S2TheLindwurm/RM12S2TheLindwurmConfig.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public class Replication2Tethers
8383

8484
public void DrawCustom(UITree tree, Event modified)
8585
{
86+
ConfigUI.DrawGroupPresetIndicator();
8687
foreach (var _ in tree.Node("Replication 2: clone assignments", contextMenu: () => DrawContextMenu(modified)))
8788
{
8889
if (UICombo.Enum("Relative north (for tether priority)", ref RelativeNorth))
@@ -192,6 +193,7 @@ public class Replication3Tethers
192193

193194
public void DrawCustom(UITree tree, Event modified)
194195
{
196+
ConfigUI.DrawGroupPresetIndicator();
195197
foreach (var _ in tree.Node("Idyllic Dream: clone assignments", contextMenu: () => DrawContextMenu(modified)))
196198
{
197199
using (var table = ImRaii.Table("tab2", 10, ImGuiTableFlags.SizingFixedFit))
@@ -246,12 +248,12 @@ public void DrawCustom(UITree tree, Event modified)
246248

247249
void DrawContextMenu(Event modified)
248250
{
249-
if (ImGui.MenuItem("DN: N group stacks, S group defams"))
251+
if (ImGui.MenuItem("DN (NA): N group stacks, S group defams"))
250252
{
251253
Array.Copy(DN.RolesOrdered, RolesOrdered, 8);
252254
modified.Fire();
253255
}
254-
if (ImGui.MenuItem("Caro: stack/defam alternate"))
256+
if (ImGui.MenuItem("Caro/wQc (EU): stack/defam alternate"))
255257
{
256258
Array.Copy(Caro.RolesOrdered, RolesOrdered, 8);
257259
modified.Fire();

0 commit comments

Comments
 (0)