mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-24 13:41:48 +01:00
Remaining API13 updates.
This commit is contained in:
parent
00d550f4fe
commit
ac6a726f57
16 changed files with 36 additions and 31 deletions
|
|
@ -287,13 +287,13 @@ public class CustomizeParameterDrawer(Configuration config, PaletteImport import
|
|||
}
|
||||
|
||||
private ImGuiColorEditFlags GetFlags()
|
||||
=> Format | Display | ImGuiColorEditFlags.HDR | ImGuiColorEditFlags.NoOptions;
|
||||
=> Format | Display | ImGuiColorEditFlags.Hdr | ImGuiColorEditFlags.NoOptions;
|
||||
|
||||
private ImGuiColorEditFlags Format
|
||||
=> config.UseFloatForColors ? ImGuiColorEditFlags.Float : ImGuiColorEditFlags.Uint8;
|
||||
|
||||
private ImGuiColorEditFlags Display
|
||||
=> config.UseRgbForColors ? ImGuiColorEditFlags.DisplayRGB : ImGuiColorEditFlags.DisplayHSV;
|
||||
=> config.UseRgbForColors ? ImGuiColorEditFlags.DisplayRgb : ImGuiColorEditFlags.DisplayHsv;
|
||||
|
||||
private ImRaii.IEndObject EnsureSize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public abstract class DesignComboBase : FilterComboCache<Tuple<IDesignStandIn, s
|
|||
ImGui.TextUnformatted("Currently resolving to ");
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Text, DesignColors.GetColor(linkedDesign));
|
||||
ImGui.SameLine(0, 0);
|
||||
ImGui.TextUnformatted(linkedDesign.Name);
|
||||
ImGui.TextUnformatted(linkedDesign.Name.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -529,11 +529,11 @@ public class EquipmentDrawer
|
|||
|
||||
public unsafe void DrawDragDropTooltip()
|
||||
{
|
||||
var payload = ImGui.GetDragDropPayload().NativePtr;
|
||||
var payload = ImGui.GetDragDropPayload().Handle;
|
||||
if (payload is null)
|
||||
return;
|
||||
|
||||
if (!MemoryMarshal.CreateReadOnlySpanFromNullTerminated(payload->DataType).SequenceEqual("equipDragDrop"u8))
|
||||
if (!MemoryMarshal.CreateReadOnlySpanFromNullTerminated((byte*)Unsafe.AsPointer(ref payload->DataType_0)).SequenceEqual("equipDragDrop"u8))
|
||||
return;
|
||||
|
||||
using var tt = ImUtf8.Tooltip();
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public sealed unsafe class AdvancedDyePopup(
|
|||
var modelHandle = model == null ? null : model->ModelResourceHandle;
|
||||
var path = materialHandle == null
|
||||
? string.Empty
|
||||
: ByteString.FromSpanUnsafe(materialHandle->ResourceHandle.FileName.AsSpan(), true).ToString();
|
||||
: ByteString.FromSpanUnsafe(materialHandle->FileName.AsSpan(), true).ToString();
|
||||
var gamePath = modelHandle == null
|
||||
? string.Empty
|
||||
: modelHandle->GetMaterialFileNameBySlot(index.MaterialIndex).ToString();
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ public class SetPanel(
|
|||
if (source)
|
||||
{
|
||||
ImUtf8.Text($"Moving design #{index + 1:D2}...");
|
||||
if (ImGui.SetDragDropPayload(dragDropLabel, nint.Zero, 0))
|
||||
if (ImGui.SetDragDropPayload(dragDropLabel, null, 0))
|
||||
{
|
||||
_dragIndex = index;
|
||||
_selector.DragDesignIndex = index;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class SetSelector : IDisposable
|
|||
ImGui.SameLine();
|
||||
var f = _enabledFilter;
|
||||
|
||||
if (ImGui.CheckboxFlags("##enabledFilter", ref f, 3))
|
||||
if (ImGui.CheckboxFlags("##enabledFilter", ref f, 3u))
|
||||
{
|
||||
_enabledFilter = _enabledFilter switch
|
||||
{
|
||||
|
|
@ -347,7 +347,7 @@ public class SetSelector : IDisposable
|
|||
if (source)
|
||||
{
|
||||
ImGui.TextUnformatted($"Moving design set {GetSetName(set, index)} from position {index + 1}...");
|
||||
if (ImGui.SetDragDropPayload(dragDropLabel, nint.Zero, 0))
|
||||
if (ImGui.SetDragDropPayload(dragDropLabel, null, 0))
|
||||
_dragIndex = index;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public unsafe class PenumbraPanel(PenumbraService _penumbra, PenumbraChangedItem
|
|||
ImGui.TableNextColumn();
|
||||
var address = _drawObject.Address;
|
||||
ImGui.SetNextItemWidth(200 * ImGuiHelpers.GlobalScale);
|
||||
if (ImGui.InputScalar("##drawObjectPtr", ImGuiDataType.U64, (nint)(&address), nint.Zero, nint.Zero, "%llx",
|
||||
if (ImGui.InputScalar("##drawObjectPtr", ImGuiDataType.U64, ref address, nint.Zero, nint.Zero, "%llx",
|
||||
ImGuiInputTextFlags.CharsHexadecimal))
|
||||
_drawObject = address;
|
||||
ImGuiUtil.DrawTableColumn(_penumbra.Available
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ public class DesignLinkDrawer(
|
|||
{
|
||||
if (source)
|
||||
{
|
||||
ImGui.SetDragDropPayload("DraggingLink", IntPtr.Zero, 0);
|
||||
ImGui.SetDragDropPayload("DraggingLink", null, 0);
|
||||
ImGui.TextUnformatted($"Reordering {design.Name}...");
|
||||
_dragDropIndex = index;
|
||||
_dragDropOrder = order;
|
||||
|
|
|
|||
|
|
@ -154,6 +154,11 @@ public class DesignPanel
|
|||
EquipmentDrawer.DrawMetaToggle(ToggleDrawData.FromDesign(MetaIndex.WeaponState, _manager, _selector.Selected!));
|
||||
EquipmentDrawer.DrawMetaToggle(ToggleDrawData.CrestFromDesign(CrestFlag.OffHand, _manager, _selector.Selected!));
|
||||
}
|
||||
ImGui.SameLine();
|
||||
using (var _ = ImRaii.Group())
|
||||
{
|
||||
EquipmentDrawer.DrawMetaToggle(ToggleDrawData.FromDesign(MetaIndex.EarState, _manager, _selector.Selected!));
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCustomize()
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class CollectionOverrideDrawer(
|
|||
{
|
||||
if (source)
|
||||
{
|
||||
ImGui.SetDragDropPayload("DraggingOverride", nint.Zero, 0);
|
||||
ImGui.SetDragDropPayload("DraggingOverride", null, 0);
|
||||
ImGui.TextUnformatted($"Reordering Override #{idx + 1}...");
|
||||
_dragDropIndex = idx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class UnlockOverview(
|
|||
var unlocked = customizeUnlocks.IsUnlocked(customize, out var time);
|
||||
var icon = customizations.Manager.GetIcon(customize.IconId);
|
||||
var hasIcon = icon.TryGetWrap(out var wrap, out _);
|
||||
ImGui.Image(wrap?.ImGuiHandle ?? icon.GetWrapOrEmpty().ImGuiHandle, iconSize, Vector2.Zero, Vector2.One,
|
||||
ImGui.Image(wrap?.Handle ?? icon.GetWrapOrEmpty().Handle, iconSize, Vector2.Zero, Vector2.One,
|
||||
unlocked || codes.Enabled(CodeService.CodeFlag.Shirts) ? Vector4.One : UnavailableTint);
|
||||
|
||||
if (favorites.Contains(_selected3, _selected2, customize.Index, customize.Value))
|
||||
|
|
@ -135,7 +135,7 @@ public class UnlockOverview(
|
|||
using var tt = ImRaii.Tooltip();
|
||||
var size = new Vector2(wrap!.Width, wrap.Height);
|
||||
if (size.X >= iconSize.X && size.Y >= iconSize.Y)
|
||||
ImGui.Image(wrap.ImGuiHandle, size);
|
||||
ImGui.Image(wrap.Handle, size);
|
||||
ImGui.TextUnformatted(unlockData.Name);
|
||||
ImGui.TextUnformatted($"{customize.Index.ToDefaultName()} {customize.Value.Value}");
|
||||
ImGui.TextUnformatted(unlocked ? $"Unlocked on {time:g}" : "Not unlocked.");
|
||||
|
|
@ -194,7 +194,7 @@ public class UnlockOverview(
|
|||
if (!textures.TryLoadIcon(item.IconId.Id, out var iconHandle))
|
||||
return;
|
||||
|
||||
var (icon, size) = (iconHandle.ImGuiHandle, new Vector2(iconHandle.Width, iconHandle.Height));
|
||||
var (icon, size) = (iconHandle.Handle, new Vector2(iconHandle.Width, iconHandle.Height));
|
||||
|
||||
ImGui.Image(icon, iconSize, Vector2.Zero, Vector2.One,
|
||||
unlocked || codes.Enabled(CodeService.CodeFlag.Shirts) ? Vector4.One : UnavailableTint);
|
||||
|
|
@ -265,7 +265,7 @@ public class UnlockOverview(
|
|||
if (!textures.TryLoadIcon(item.IconId.Id, out var iconHandle))
|
||||
return;
|
||||
|
||||
var (icon, size) = (iconHandle.ImGuiHandle, new Vector2(iconHandle.Width, iconHandle.Height));
|
||||
var (icon, size) = (iconHandle.Handle, new Vector2(iconHandle.Width, iconHandle.Height));
|
||||
|
||||
ImGui.Image(icon, iconSize, Vector2.Zero, Vector2.One,
|
||||
unlocked || codes.Enabled(CodeService.CodeFlag.Shirts) ? Vector4.One : UnavailableTint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue