impr: Get rid of cimgui shared library by hooking pinvoke handler

This commit is contained in:
WerWolv
2024-03-12 23:17:49 +01:00
parent 876f091244
commit fdf01dfb50
15 changed files with 135 additions and 57 deletions

View File

@@ -1,8 +1,18 @@
using ImHex;
using ImGuiNET;
class Script {
public static void OnLoad() {
// This function is executed the first time the Plugin is loaded
UI.RegisterView(new byte[]{ 0xEE, 0xAC, 0x89 }, "Test View", () =>
{
ImGui.SetCurrentContext(UI.GetImGuiContext());
ImGui.TextUnformatted("Test Text");
if (ImGui.Button("Hello World"))
{
UI.ShowToast("Hello World");
}
});
}
public static void Main()