feat: update elements and swaps to use tables
This commit is contained in:
parent
466af005b0
commit
0422538368
|
@ -8,27 +8,27 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Dalamud, Version=5.2.4.2, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="Dalamud">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImGui.NET, Version=1.72.0.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="ImGui.NET">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\ImGui.NET.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\ImGui.NET.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImGuiScene, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="ImGuiScene">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Lumina, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="Lumina">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Lumina.Excel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="Lumina.Excel">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Newtonsoft.Json.dll</HintPath>
|
<HintPath>$(AppData)\XIVLauncher\addon\Hooks\dev\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
public bool ShowIndependently {
|
public bool ShowIndependently {
|
||||||
get => this._options[0] == 1;
|
get => this._options[0] == 1;
|
||||||
set => this._options[0] = value ? 1 : 0;
|
set => this._options[0] = value ? (byte) 1 : (byte) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TargetBarOptions(byte[] options) {
|
public TargetBarOptions(byte[] options) {
|
||||||
|
|
|
@ -84,23 +84,23 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxSettingWidth = 0f;
|
|
||||||
|
|
||||||
void DrawSettingName(string name) {
|
void DrawSettingName(string name) {
|
||||||
maxSettingWidth = Math.Max(maxSettingWidth, ImGui.CalcTextSize(name).X);
|
|
||||||
ImGui.TextUnformatted(name);
|
ImGui.TextUnformatted(name);
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Columns(3);
|
const ImGuiTableFlags flags = ImGuiTableFlags.BordersInner
|
||||||
ImGui.SetColumnWidth(0, ImGui.CalcTextSize("Enabled").X + ImGui.GetStyle().ItemSpacing.X * 2);
|
| ImGuiTableFlags.PadOuterX
|
||||||
|
| ImGuiTableFlags.SizingFixedFit
|
||||||
|
| ImGuiTableFlags.RowBg;
|
||||||
|
if (!ImGui.BeginTable($"uimanager-element-table-{kind}", 3, flags)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.TextUnformatted("Enabled");
|
ImGui.TableSetupColumn("Enabled");
|
||||||
ImGui.NextColumn();
|
ImGui.TableSetupColumn("Setting");
|
||||||
|
ImGui.TableSetupColumn("Control", ImGuiTableColumnFlags.WidthStretch);
|
||||||
DrawSettingName("Setting");
|
ImGui.TableHeadersRow();
|
||||||
|
|
||||||
ImGui.TextUnformatted("Control");
|
|
||||||
|
|
||||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.GetStyle().ItemInnerSpacing.X - ImGui.GetStyle().ItemSpacing.X * 6);
|
ImGui.SameLine(ImGui.GetContentRegionAvail().X - ImGui.GetStyle().ItemInnerSpacing.X - ImGui.GetStyle().ItemSpacing.X * 6);
|
||||||
if (ImGuiExt.IconButton(FontAwesomeIcon.Search, $"uimanager-preview-element-{kind}")) {
|
if (ImGuiExt.IconButton(FontAwesomeIcon.Search, $"uimanager-preview-element-{kind}")) {
|
||||||
|
@ -120,10 +120,12 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
|
|
||||||
ImGuiExt.HoverTooltip("Remove this element from this layout");
|
ImGuiExt.HoverTooltip("Remove this element from this layout");
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
void DrawEnabledCheckbox(ElementKind kind, ElementComponent component, ref bool update) {
|
void DrawEnabledCheckbox(ElementKind kind, ElementComponent component, ref bool update, bool nextCol = true) {
|
||||||
ImGui.NextColumn();
|
if (nextCol) {
|
||||||
|
ImGui.TableNextColumn();
|
||||||
|
}
|
||||||
|
|
||||||
var enabled = element[component];
|
var enabled = element[component];
|
||||||
if (ImGui.Checkbox($"###{component}-enabled-{kind}", ref enabled)) {
|
if (ImGui.Checkbox($"###{component}-enabled-{kind}", ref enabled)) {
|
||||||
|
@ -133,11 +135,13 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.TableSetColumnIndex(0);
|
||||||
|
|
||||||
if (!kind.IsJobGauge()) {
|
if (!kind.IsJobGauge()) {
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.Visibility, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.Visibility, ref update, false);
|
||||||
DrawSettingName("Visibility");
|
DrawSettingName("Visibility");
|
||||||
|
|
||||||
var keyboard = element[VisibilityFlags.Keyboard];
|
var keyboard = element[VisibilityFlags.Keyboard];
|
||||||
|
@ -152,10 +156,12 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
element[VisibilityFlags.Gamepad] = gamepad;
|
element[VisibilityFlags.Gamepad] = gamepad;
|
||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
ImGui.TableSetColumnIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
|
||||||
|
|
||||||
DrawSettingName("Measured from");
|
DrawSettingName("Measured from");
|
||||||
|
|
||||||
|
@ -175,6 +181,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.X, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.X, ref update);
|
||||||
DrawSettingName("X");
|
DrawSettingName("X");
|
||||||
|
@ -191,6 +198,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.Y, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.Y, ref update);
|
||||||
DrawSettingName("Y");
|
DrawSettingName("Y");
|
||||||
|
@ -220,6 +228,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.Y, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.Y, ref update);
|
||||||
DrawSettingName("Y");
|
DrawSettingName("Y");
|
||||||
|
@ -237,6 +246,8 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.Scale, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.Scale, ref update);
|
||||||
DrawSettingName("Scale");
|
DrawSettingName("Scale");
|
||||||
|
|
||||||
|
@ -256,6 +267,7 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
if (!kind.IsJobGauge()) {
|
if (!kind.IsJobGauge()) {
|
||||||
DrawEnabledCheckbox(element.Id, ElementComponent.Opacity, ref update);
|
DrawEnabledCheckbox(element.Id, ElementComponent.Opacity, ref update);
|
||||||
|
@ -269,13 +281,14 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == ElementKind.TargetBar) {
|
if (kind == ElementKind.TargetBar) {
|
||||||
var targetBarOpts = new TargetBarOptions(element.Options);
|
var targetBarOpts = new TargetBarOptions(element.Options);
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Display target information independently");
|
DrawSettingName("Display target information independently");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -286,13 +299,14 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == ElementKind.StatusEffects) {
|
if (kind == ElementKind.StatusEffects) {
|
||||||
var statusOpts = new StatusOptions(element.Options);
|
var statusOpts = new StatusOptions(element.Options);
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Style");
|
DrawSettingName("Style");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -310,13 +324,14 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == ElementKind.StatusInfoEnhancements || kind == ElementKind.StatusInfoEnfeeblements || kind == ElementKind.StatusInfoOther) {
|
if (kind == ElementKind.StatusInfoEnhancements || kind == ElementKind.StatusInfoEnfeeblements || kind == ElementKind.StatusInfoOther) {
|
||||||
var statusOpts = new StatusInfoOptions(kind, element.Options);
|
var statusOpts = new StatusInfoOptions(kind, element.Options);
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Layout");
|
DrawSettingName("Layout");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -334,9 +349,10 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Alignment");
|
DrawSettingName("Alignment");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -354,9 +370,10 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Focusable by gamepad");
|
DrawSettingName("Focusable by gamepad");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -373,8 +390,8 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
var hotbarOpts = new HotbarOptions(element);
|
var hotbarOpts = new HotbarOptions(element);
|
||||||
|
|
||||||
if (kind != ElementKind.PetHotbar) {
|
if (kind != ElementKind.PetHotbar) {
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Hotbar number");
|
DrawSettingName("Hotbar number");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -385,13 +402,13 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Hotbar layout");
|
DrawSettingName("Hotbar layout");
|
||||||
|
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
if (ImGui.BeginCombo($"##hotbar-layout-{kind}", hotbarOpts.Layout.Name())) {
|
if (ImGui.BeginCombo($"##hotbar-layout-{kind}", hotbarOpts.Layout.Name())) {
|
||||||
foreach (var hotbarLayout in (HotbarLayout[]) Enum.GetValues(typeof(HotbarLayout))) {
|
foreach (var hotbarLayout in (HotbarLayout[]) Enum.GetValues(typeof(HotbarLayout))) {
|
||||||
|
@ -407,13 +424,14 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind.IsJobGauge()) {
|
if (kind.IsJobGauge()) {
|
||||||
var gaugeOpts = new GaugeOptions(element.Options);
|
var gaugeOpts = new GaugeOptions(element.Options);
|
||||||
|
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
DrawSettingName("Simple");
|
DrawSettingName("Simple");
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -424,11 +442,10 @@ namespace HUD_Manager.Ui.Editor.Tabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
|
ImGui.TableNextRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SetColumnWidth(1, maxSettingWidth + ImGui.GetStyle().ItemSpacing.X * 2);
|
ImGui.EndTable();
|
||||||
|
|
||||||
ImGui.Columns();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var remove in toRemove) {
|
foreach (var remove in toRemove) {
|
||||||
|
|
|
@ -72,31 +72,32 @@ namespace HUD_Manager.Ui {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Columns(4);
|
const ImGuiTableFlags flags = ImGuiTableFlags.Borders
|
||||||
|
& ~ImGuiTableFlags.BordersOuterV
|
||||||
|
| ImGuiTableFlags.PadOuterX
|
||||||
|
| ImGuiTableFlags.RowBg;
|
||||||
|
if (!ImGui.BeginTable("uimanager-swaps-table", 4, flags)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var conditions = new List<HudConditionMatch>(this.Plugin.Config.HudConditionMatches);
|
var conditions = new List<HudConditionMatch>(this.Plugin.Config.HudConditionMatches);
|
||||||
if (this._editingConditionIndex == conditions.Count) {
|
if (this._editingConditionIndex == conditions.Count) {
|
||||||
conditions.Add(new HudConditionMatch());
|
conditions.Add(new HudConditionMatch());
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.TextUnformatted("Job");
|
ImGui.TableSetupColumn("Job");
|
||||||
ImGui.NextColumn();
|
ImGui.TableSetupColumn("State");
|
||||||
|
ImGui.TableSetupColumn("Layout");
|
||||||
ImGui.TextUnformatted("State");
|
ImGui.TableSetupColumn("Options");
|
||||||
ImGui.NextColumn();
|
ImGui.TableHeadersRow();
|
||||||
|
|
||||||
ImGui.TextUnformatted("Layout");
|
|
||||||
ImGui.NextColumn();
|
|
||||||
|
|
||||||
ImGui.TextUnformatted("Options");
|
|
||||||
ImGui.NextColumn();
|
|
||||||
|
|
||||||
ImGui.Separator();
|
|
||||||
|
|
||||||
var addCondition = false;
|
var addCondition = false;
|
||||||
var actionedItemIndex = -1;
|
var actionedItemIndex = -1;
|
||||||
var action = 0; // 0 for delete, otherwise move.
|
var action = 0; // 0 for delete, otherwise move.
|
||||||
foreach (var item in conditions.Select((cond, i) => new {cond, i})) {
|
foreach (var item in conditions.Select((cond, i) => new {cond, i})) {
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
ImGui.TableSetColumnIndex(0);
|
||||||
|
|
||||||
if (this._editingConditionIndex == item.i) {
|
if (this._editingConditionIndex == item.i) {
|
||||||
this._editingCondition ??= new HudConditionMatch();
|
this._editingCondition ??= new HudConditionMatch();
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
|
@ -115,7 +116,7 @@ namespace HUD_Manager.Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
if (ImGui.BeginCombo("##condition-edit-status", this._editingCondition.Status?.Name() ?? "Any")) {
|
if (ImGui.BeginCombo("##condition-edit-status", this._editingCondition.Status?.Name() ?? "Any")) {
|
||||||
|
@ -133,7 +134,7 @@ namespace HUD_Manager.Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
ImGui.PushItemWidth(-1);
|
ImGui.PushItemWidth(-1);
|
||||||
var comboPreview = this._editingCondition.LayoutId == Guid.Empty ? string.Empty : this.Plugin.Config.Layouts[this._editingCondition.LayoutId].Name;
|
var comboPreview = this._editingCondition.LayoutId == Guid.Empty ? string.Empty : this.Plugin.Config.Layouts[this._editingCondition.LayoutId].Name;
|
||||||
|
@ -148,7 +149,7 @@ namespace HUD_Manager.Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PopItemWidth();
|
ImGui.PopItemWidth();
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
if (this._editingCondition.LayoutId != Guid.Empty) {
|
if (this._editingCondition.LayoutId != Guid.Empty) {
|
||||||
if (ImGuiExt.IconButton(FontAwesomeIcon.Check, "condition-edit")) {
|
if (ImGuiExt.IconButton(FontAwesomeIcon.Check, "condition-edit")) {
|
||||||
|
@ -168,14 +169,14 @@ namespace HUD_Manager.Ui {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ImGui.TextUnformatted(item.cond.ClassJob ?? string.Empty);
|
ImGui.TextUnformatted(item.cond.ClassJob ?? string.Empty);
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
ImGui.TextUnformatted(item.cond.Status?.Name() ?? string.Empty);
|
ImGui.TextUnformatted(item.cond.Status?.Name() ?? string.Empty);
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
this.Plugin.Config.Layouts.TryGetValue(item.cond.LayoutId, out var condLayout);
|
this.Plugin.Config.Layouts.TryGetValue(item.cond.LayoutId, out var condLayout);
|
||||||
ImGui.TextUnformatted(condLayout?.Name ?? string.Empty);
|
ImGui.TextUnformatted(condLayout?.Name ?? string.Empty);
|
||||||
ImGui.NextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
||||||
if (ImGuiExt.IconButton(FontAwesomeIcon.PencilAlt, $"{item.i}")) {
|
if (ImGuiExt.IconButton(FontAwesomeIcon.PencilAlt, $"{item.i}")) {
|
||||||
this._editingConditionIndex = item.i;
|
this._editingConditionIndex = item.i;
|
||||||
|
@ -199,13 +200,9 @@ namespace HUD_Manager.Ui {
|
||||||
action = 1;
|
action = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.NextColumn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Columns(1);
|
ImGui.EndTable();
|
||||||
|
|
||||||
ImGui.Separator();
|
|
||||||
|
|
||||||
ImGui.EndChild();
|
ImGui.EndChild();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user