mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 00:18:02 +03:00
добавил tma в просмотр и отрефакторил код
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
using System.Reflection;
|
||||
using System.Numerics;
|
||||
using System.Reflection;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace NResUI
|
||||
{
|
||||
@ -60,5 +62,32 @@ namespace NResUI
|
||||
{
|
||||
return string.IsNullOrEmpty(str);
|
||||
}
|
||||
// This is a direct port of imgui_demo.cpp HelpMarker function
|
||||
|
||||
// https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp#L190
|
||||
|
||||
public static void ShowHint(string message)
|
||||
{
|
||||
// ImGui.TextDisabled("(?)");
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
// Change background transparency
|
||||
ImGui.PushStyleColor(
|
||||
ImGuiCol.PopupBg,
|
||||
new Vector4(
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0.8f
|
||||
)
|
||||
);
|
||||
ImGui.BeginTooltip();
|
||||
ImGui.PushTextWrapPos(ImGui.GetFontSize() * 35.0f);
|
||||
ImGui.TextUnformatted(message);
|
||||
ImGui.PopTextWrapPos();
|
||||
ImGui.EndTooltip();
|
||||
ImGui.PopStyleColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user