Updated to Risa's changes
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Utility;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using System.Text;
|
||||
|
||||
namespace CustomizePlus.Core.Helpers;
|
||||
|
||||
@@ -67,21 +66,15 @@ public static class CtrlHelper
|
||||
}
|
||||
|
||||
public static bool ArrowToggle(string label, ref bool value)
|
||||
{//ImGuiNative.ArrowButton(label, value ? ImGuiDir.Down : ImGuiDir.Right);
|
||||
unsafe // temporary fix
|
||||
{
|
||||
var toggled = ImGui.ArrowButton(label, value ? ImGuiDir.Down : ImGuiDir.Right);
|
||||
|
||||
if (toggled)
|
||||
{
|
||||
var utf8Label = Encoding.UTF8.GetBytes(label + "\0");
|
||||
|
||||
fixed (byte* labelPtr = utf8Label)
|
||||
{
|
||||
bool toggled = ImGuiNative.ArrowButton(labelPtr, value ? ImGuiDir.Down : ImGuiDir.Right) != 0;
|
||||
|
||||
if (toggled)
|
||||
value = !value;
|
||||
|
||||
return value;
|
||||
}
|
||||
value = !value;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public static void AddHoverText(string text)
|
||||
|
||||
Reference in New Issue
Block a user