From b7f7ba744151f5e1aaeef02dc60c4341db2ea5cc Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 18 Dec 2024 11:12:52 +0700 Subject: [PATCH] make ExamplePlugin ToolboxPlugin instead of ToolboxUIPlugin as it has no UI --- plugins/ExamplePlugin/ExamplePlugin.cpp | 8 ++++---- plugins/ExamplePlugin/ExamplePlugin.h | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/ExamplePlugin/ExamplePlugin.cpp b/plugins/ExamplePlugin/ExamplePlugin.cpp index 8853bd262..ccad53187 100644 --- a/plugins/ExamplePlugin/ExamplePlugin.cpp +++ b/plugins/ExamplePlugin/ExamplePlugin.cpp @@ -20,13 +20,13 @@ DLLAPI ToolboxPlugin* ToolboxPluginInstance() void ExamplePlugin::LoadSettings(const wchar_t* folder) { - ToolboxUIPlugin::LoadSettings(folder); + ToolboxPlugin::LoadSettings(folder); PLUGIN_LOAD_BOOL(redirect_slash_ee_to_eee); } void ExamplePlugin::SaveSettings(const wchar_t* folder) { - ToolboxUIPlugin::SaveSettings(folder); + ToolboxPlugin::SaveSettings(folder); PLUGIN_SAVE_BOOL(redirect_slash_ee_to_eee); PLUGIN_ASSERT(ini.SaveFile(GetSettingFile(folder).c_str()) == SI_OK); } @@ -48,13 +48,13 @@ void EeCmd(GW::HookStatus*, const wchar_t*, const int, const LPWSTR*) void ExamplePlugin::Initialize(ImGuiContext* ctx, const ImGuiAllocFns allocator_fns, const HMODULE toolbox_dll) { - ToolboxUIPlugin::Initialize(ctx, allocator_fns, toolbox_dll); + ToolboxPlugin::Initialize(ctx, allocator_fns, toolbox_dll); GW::Chat::CreateCommand(&ChatCmd_HookEntry, L"ee", EeCmd); } void ExamplePlugin::SignalTerminate() { - ToolboxUIPlugin::SignalTerminate(); + ToolboxPlugin::SignalTerminate(); GW::Chat::DeleteCommand(&ChatCmd_HookEntry); } diff --git a/plugins/ExamplePlugin/ExamplePlugin.h b/plugins/ExamplePlugin/ExamplePlugin.h index 7bd682583..921589d38 100644 --- a/plugins/ExamplePlugin/ExamplePlugin.h +++ b/plugins/ExamplePlugin/ExamplePlugin.h @@ -2,15 +2,9 @@ #include -class ExamplePlugin : public ToolboxUIPlugin { +class ExamplePlugin : public ToolboxPlugin { public: - ExamplePlugin() - { - can_show_in_main_window = false; - show_title = false; - can_collapse = false; - can_close = false; - } + ExamplePlugin() = default; ~ExamplePlugin() override = default; const char* Name() const override { return "Example Plugin"; }