diff --git a/Dependencies/GWCA/bin/gwca.dll b/Dependencies/GWCA/bin/gwca.dll index b334cdbfc..1f8cbb192 100644 Binary files a/Dependencies/GWCA/bin/gwca.dll and b/Dependencies/GWCA/bin/gwca.dll differ diff --git a/Dependencies/GWCA/include/GWCA/Managers/ChatMgr.h b/Dependencies/GWCA/include/GWCA/Managers/ChatMgr.h index 78c2e728a..2fb5ef878 100644 --- a/Dependencies/GWCA/include/GWCA/Managers/ChatMgr.h +++ b/Dependencies/GWCA/include/GWCA/Managers/ChatMgr.h @@ -78,7 +78,7 @@ namespace GW { // callbacks that handle chat commands; always blocks gw command, unless you set hook_status->blocked = false; typedef void (__cdecl* ChatCommandCallback)(GW::HookStatus*, const wchar_t* cmd, int argc, const LPWSTR* argv); GWCA_API void CreateCommand(const wchar_t* cmd, ChatCommandCallback callback); - GWCA_API void DeleteCommand(const wchar_t* cmd); + GWCA_API void DeleteCommand(const wchar_t* cmd, ChatCommandCallback callback = nullptr); GWCA_API void ToggleTimestamps(bool enable); GWCA_API void SetTimestampsFormat(bool use_24h, bool show_timestamp_seconds = false); diff --git a/Dependencies/GWCA/include/GWCA/Managers/UIMgr.h b/Dependencies/GWCA/include/GWCA/Managers/UIMgr.h index 08339c4aa..91db1d2f9 100644 --- a/Dependencies/GWCA/include/GWCA/Managers/UIMgr.h +++ b/Dependencies/GWCA/include/GWCA/Managers/UIMgr.h @@ -408,12 +408,18 @@ namespace GW { kRecvWhisper = 0x30000000 | 0x1E, // wparam = UIPacket::kRecvWhisper* kPrintChatMessage = 0x30000000 | 0x1F, // wparam = UIPacket::kPrintChatMessage*. Triggered when a message wants to be added to the in-game chat window. kSendWorldAction = 0x30000000 | 0x20, // wparam = UIPacket::kSendWorldAction* + kSetRendererValue = 0x30000000 | 0x21 // wparam = UIPacket::kSetRendererValue }; enum class FlagPreference : uint32_t; enum class NumberPreference : uint32_t; enum class EnumPreference : uint32_t; namespace UIPacket { + struct kSetRendererValue { + uint32_t renderer_mode; // 0 for window, 2 for full screen + uint32_t metric_id; // TODO: Enum this! + uint32_t value; + }; struct kEffectAdd { uint32_t agent_id; Effect* effect; diff --git a/Dependencies/GWCA/lib/gwca.lib b/Dependencies/GWCA/lib/gwca.lib index 9605097eb..38214d4a9 100644 Binary files a/Dependencies/GWCA/lib/gwca.lib and b/Dependencies/GWCA/lib/gwca.lib differ diff --git a/plugins/ExamplePlugin/ExamplePlugin.cpp b/plugins/ExamplePlugin/ExamplePlugin.cpp index 609aac876..03b0ea045 100644 --- a/plugins/ExamplePlugin/ExamplePlugin.cpp +++ b/plugins/ExamplePlugin/ExamplePlugin.cpp @@ -37,19 +37,23 @@ void ExamplePlugin::DrawSettings() ImGui::Checkbox("Redirect ee to eee", &redirect_slash_ee_to_eee); } +void EeCmd(GW::HookStatus*, const wchar_t*, const int, const LPWSTR*) +{ + if (redirect_slash_ee_to_eee) { + GW::Chat::SendChat('/', "eee"); + } +} + void ExamplePlugin::Initialize(ImGuiContext* ctx, const ImGuiAllocFns allocator_fns, const HMODULE toolbox_dll) { ToolboxUIPlugin::Initialize(ctx, allocator_fns, toolbox_dll); - GW::Chat::CreateCommand(L"ee", [](GW::HookStatus*, const wchar_t*, const int, const LPWSTR*) { - if (redirect_slash_ee_to_eee) { - GW::Chat::SendChat('/', "eee"); - } - }); + GW::Chat::CreateCommand(L"ee", EeCmd); } + void ExamplePlugin::SignalTerminate() { ToolboxUIPlugin::SignalTerminate(); - GW::Chat::DeleteCommand(L"ee"); + GW::Chat::DeleteCommand(L"ee", EeCmd); } bool ExamplePlugin::CanTerminate() {