mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-21 06:57:44 +01:00
Store Model ID for NPCs, fix issue with applying NPC data setting extended colors.
This commit is contained in:
parent
a50b63f67e
commit
c87885bd3b
4 changed files with 20 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ public class NpcAppearancePanel(NpcCombo _npcCombo, StateManager _state, ObjectM
|
|||
ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X);
|
||||
var resetScroll = ImGui.InputTextWithHint("##npcFilter", "Filter...", ref _npcFilter, 64);
|
||||
|
||||
using var table = ImRaii.Table("npcs", 6, ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY | ImGuiTableFlags.SizingFixedFit,
|
||||
using var table = ImRaii.Table("npcs", 7, ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollY | ImGuiTableFlags.SizingFixedFit,
|
||||
new Vector2(-1, 400 * ImGuiHelpers.GlobalScale));
|
||||
if (!table)
|
||||
return;
|
||||
|
|
@ -45,6 +45,7 @@ public class NpcAppearancePanel(NpcCombo _npcCombo, StateManager _state, ObjectM
|
|||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.WidthFixed, ImGuiHelpers.GlobalScale * 300);
|
||||
ImGui.TableSetupColumn("Kind", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Id", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Model", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Visor", ImGuiTableColumnFlags.WidthFixed);
|
||||
ImGui.TableSetupColumn("Compare", ImGuiTableColumnFlags.WidthStretch);
|
||||
|
||||
|
|
@ -83,6 +84,10 @@ public class NpcAppearancePanel(NpcCombo _npcCombo, StateManager _state, ObjectM
|
|||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted(data.Id.Id.ToString());
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted(data.ModelId.ToString());
|
||||
|
||||
using (_ = ImRaii.PushFont(UiBuilder.IconFont))
|
||||
{
|
||||
ImGui.TableNextColumn();
|
||||
|
|
|
|||
|
|
@ -141,7 +141,10 @@ public class NpcPanel(
|
|||
|
||||
private void DrawCustomization()
|
||||
{
|
||||
using var h = ImRaii.CollapsingHeader("Customization");
|
||||
var header = _selector.Selection.ModelId == 0
|
||||
? "Customization"
|
||||
: $"Customization (Model Id #{_selector.Selection.ModelId})###Customization";
|
||||
using var h = ImRaii.CollapsingHeader(header);
|
||||
if (!h)
|
||||
return;
|
||||
|
||||
|
|
@ -197,8 +200,8 @@ public class NpcPanel(
|
|||
|
||||
if (_state.GetOrCreate(id, data.Objects[0], out var state))
|
||||
{
|
||||
var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags();
|
||||
var design = _converter.Convert(ToDesignData(), applyGear, applyCustomize, applyCrest, applyParameters);
|
||||
var (applyGear, applyCustomize, _, _) = UiHelpers.ConvertKeysToFlags();
|
||||
var design = _converter.Convert(ToDesignData(), applyGear, applyCustomize, 0, 0);
|
||||
_state.ApplyDesign(design, state, StateChanged.Source.Manual);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue