Skip to content

Commit

Permalink
make ExamplePlugin ToolboxPlugin instead of ToolboxUIPlugin as it has…
Browse files Browse the repository at this point in the history
… no UI
  • Loading branch information
DubbleClick committed Dec 18, 2024
1 parent 3b544c2 commit b7f7ba7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions plugins/ExamplePlugin/ExamplePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}

Expand Down
10 changes: 2 additions & 8 deletions plugins/ExamplePlugin/ExamplePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@

#include <ToolboxUIPlugin.h>

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"; }
Expand Down

0 comments on commit b7f7ba7

Please sign in to comment.