mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 04:34:19 +01:00
Add disabled sections to selector in meta edit
This commit is contained in:
parent
fee3f500c5
commit
5a278d4424
1 changed files with 11 additions and 6 deletions
|
|
@ -79,7 +79,6 @@ public partial class ModEditWindow
|
||||||
if( table )
|
if( table )
|
||||||
{
|
{
|
||||||
drawNew( _editor!, _iconSize );
|
drawNew( _editor!, _iconSize );
|
||||||
ImGui.Separator();
|
|
||||||
foreach( var (item, index) in items.ToArray().WithIndex() )
|
foreach( var (item, index) in items.ToArray().WithIndex() )
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId( index );
|
using var id = ImRaii.PushId( index );
|
||||||
|
|
@ -119,7 +118,7 @@ public partial class ModEditWindow
|
||||||
_new = _new with { SetId = setId };
|
_new = _new with { SetId = setId };
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiUtil.HoverTooltip( "Model Set ID" );
|
ImGuiUtil.HoverTooltip( "Model Set ID");
|
||||||
|
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
if( EqpEquipSlotCombo( "##eqpSlot", _new.Slot, out var slot ) )
|
if( EqpEquipSlotCombo( "##eqpSlot", _new.Slot, out var slot ) )
|
||||||
|
|
@ -127,9 +126,10 @@ public partial class ModEditWindow
|
||||||
_new = _new with { Slot = slot };
|
_new = _new with { Slot = slot };
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiUtil.HoverTooltip( "Equip Slot" );
|
ImGuiUtil.HoverTooltip( "Equip Slot");
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
using var style = ImRaii.PushStyle( ImGuiStyleVar.ItemSpacing,
|
using var style = ImRaii.PushStyle( ImGuiStyleVar.ItemSpacing,
|
||||||
new Vector2( 3 * ImGuiHelpers.GlobalScale, ImGui.GetStyle().ItemSpacing.Y ) );
|
new Vector2( 3 * ImGuiHelpers.GlobalScale, ImGui.GetStyle().ItemSpacing.Y ) );
|
||||||
|
|
@ -241,6 +241,7 @@ public partial class ModEditWindow
|
||||||
ImGuiUtil.HoverTooltip( "Equip Slot" );
|
ImGuiUtil.HoverTooltip( "Equip Slot" );
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
var (bit1, bit2) = defaultEntry.ToBits( _new.Slot );
|
var (bit1, bit2) = defaultEntry.ToBits( _new.Slot );
|
||||||
Checkmark( "Material##eqdpCheck1", string.Empty, bit1, bit1, out _ );
|
Checkmark( "Material##eqdpCheck1", string.Empty, bit1, bit1, out _ );
|
||||||
|
|
@ -377,6 +378,7 @@ public partial class ModEditWindow
|
||||||
ImGuiUtil.HoverTooltip( "Variant ID" );
|
ImGuiUtil.HoverTooltip( "Variant ID" );
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
IntDragInput( "##imcMaterialId", "Material ID", SmallIdWidth, defaultEntry.Value.MaterialId, defaultEntry.Value.MaterialId, out _,
|
IntDragInput( "##imcMaterialId", "Material ID", SmallIdWidth, defaultEntry.Value.MaterialId, defaultEntry.Value.MaterialId, out _,
|
||||||
1, byte.MaxValue, 0f );
|
1, byte.MaxValue, 0f );
|
||||||
|
|
@ -550,6 +552,7 @@ public partial class ModEditWindow
|
||||||
ImGuiUtil.HoverTooltip( "EST Type" );
|
ImGuiUtil.HoverTooltip( "EST Type" );
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
IntDragInput( "##estSkeleton", "Skeleton Index", IdWidth, _new.Entry, defaultEntry, out _, 0, ushort.MaxValue, 0.05f );
|
IntDragInput( "##estSkeleton", "Skeleton Index", IdWidth, _new.Entry, defaultEntry, out _, 0, ushort.MaxValue, 0.05f );
|
||||||
}
|
}
|
||||||
|
|
@ -624,6 +627,7 @@ public partial class ModEditWindow
|
||||||
ImGuiUtil.HoverTooltip( "Model Set ID" );
|
ImGuiUtil.HoverTooltip( "Model Set ID" );
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
Checkmark( "##gmpEnabled", "Gimmick Enabled", defaultEntry.Enabled, defaultEntry.Enabled, out _ );
|
Checkmark( "##gmpEnabled", "Gimmick Enabled", defaultEntry.Enabled, defaultEntry.Enabled, out _ );
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
@ -743,6 +747,7 @@ public partial class ModEditWindow
|
||||||
ImGuiUtil.HoverTooltip( "Scaling Type" );
|
ImGuiUtil.HoverTooltip( "Scaling Type" );
|
||||||
|
|
||||||
// Values
|
// Values
|
||||||
|
using var disabled = ImRaii.Disabled();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.SetNextItemWidth( FloatWidth );
|
ImGui.SetNextItemWidth( FloatWidth );
|
||||||
ImGui.DragFloat( "##rspValue", ref defaultEntry, 0f );
|
ImGui.DragFloat( "##rspValue", ref defaultEntry, 0f );
|
||||||
|
|
@ -831,7 +836,7 @@ public partial class ModEditWindow
|
||||||
defaultValue ? ColorId.DecreasedMetaValue.Value() : ColorId.IncreasedMetaValue.Value(), defaultValue != currentValue );
|
defaultValue ? ColorId.DecreasedMetaValue.Value() : ColorId.IncreasedMetaValue.Value(), defaultValue != currentValue );
|
||||||
newValue = currentValue;
|
newValue = currentValue;
|
||||||
ImGui.Checkbox( label, ref newValue );
|
ImGui.Checkbox( label, ref newValue );
|
||||||
ImGuiUtil.HoverTooltip( tooltip );
|
ImGuiUtil.HoverTooltip( tooltip, ImGuiHoveredFlags.AllowWhenDisabled );
|
||||||
return newValue != currentValue;
|
return newValue != currentValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -850,7 +855,7 @@ public partial class ModEditWindow
|
||||||
newValue = Math.Clamp( newValue, minValue, maxValue );
|
newValue = Math.Clamp( newValue, minValue, maxValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiUtil.HoverTooltip( tooltip );
|
ImGuiUtil.HoverTooltip( tooltip, ImGuiHoveredFlags.AllowWhenDisabled );
|
||||||
|
|
||||||
return newValue != currentValue;
|
return newValue != currentValue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue