From 3ceead3ed34387c65bc14e804b9c8f425adff586 Mon Sep 17 00:00:00 2001 From: Saurtron Date: Tue, 24 Dec 2024 11:16:53 +0100 Subject: [PATCH] Rename ActiveCommandSet to ActiveCommandChanged. --- rts/Game/UI/GuiHandler.cpp | 4 ++-- rts/Lua/LuaHandle.cpp | 4 ++-- rts/Lua/LuaHandle.h | 2 +- rts/System/EventClient.cpp | 2 +- rts/System/EventClient.h | 2 +- rts/System/EventHandler.cpp | 4 ++-- rts/System/EventHandler.h | 2 +- rts/System/Events.def | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/rts/Game/UI/GuiHandler.cpp b/rts/Game/UI/GuiHandler.cpp index 8901d1b609..3f96ed9cfd 100644 --- a/rts/Game/UI/GuiHandler.cpp +++ b/rts/Game/UI/GuiHandler.cpp @@ -1455,9 +1455,9 @@ void CGuiHandler::SetActiveCommandIndex(int newIndex) if (inCommand != newIndex) { inCommand = newIndex; if (inCommand < commands.size()) - eventHandler.ActiveCommandSet(&commands[inCommand]); + eventHandler.ActiveCommandChanged(&commands[inCommand]); else - eventHandler.ActiveCommandSet(nullptr); + eventHandler.ActiveCommandChanged(nullptr); } } diff --git a/rts/Lua/LuaHandle.cpp b/rts/Lua/LuaHandle.cpp index 1f6d0fad7f..b691343802 100644 --- a/rts/Lua/LuaHandle.cpp +++ b/rts/Lua/LuaHandle.cpp @@ -3338,12 +3338,12 @@ string CLuaHandle::GetTooltip(int x, int y) /*** Called when a command is issued. * - * @function ActiveCommandSet + * @function ActiveCommandChanged * @int cmdID|nil * @tparam table|nil cmdParams * @tparam cmdOpts|nil options */ -void CLuaHandle::ActiveCommandSet(const SCommandDescription* cmdDesc) +void CLuaHandle::ActiveCommandChanged(const SCommandDescription* cmdDesc) { RECOIL_DETAILED_TRACY_ZONE; LUA_CALL_IN_CHECK(L, false); diff --git a/rts/Lua/LuaHandle.h b/rts/Lua/LuaHandle.h index 97d3276712..63a37eef10 100644 --- a/rts/Lua/LuaHandle.h +++ b/rts/Lua/LuaHandle.h @@ -210,7 +210,7 @@ class CLuaHandle : public CEventClient bool DefaultCommand(const CUnit* unit, const CFeature* feature, int& cmd) override; - void ActiveCommandSet(const SCommandDescription* cmdDesc) override; + void ActiveCommandChanged(const SCommandDescription* cmdDesc) override; bool CommandNotify(const Command& cmd) override; diff --git a/rts/System/EventClient.cpp b/rts/System/EventClient.cpp index 2ce462d536..63feb4eaa2 100644 --- a/rts/System/EventClient.cpp +++ b/rts/System/EventClient.cpp @@ -80,7 +80,7 @@ void CEventClient::DownloadProgress(int ID, long downloaded, long total) {} bool CEventClient::IsAbove(int x, int y) { return false; } std::string CEventClient::GetTooltip(int x, int y) { return ""; } -void CEventClient::ActiveCommandSet(const SCommandDescription* cmdDesc) {} +void CEventClient::ActiveCommandChanged(const SCommandDescription* cmdDesc) {} bool CEventClient::CommandNotify(const Command& cmd) { return false; } bool CEventClient::AddConsoleLine(const std::string& msg, const std::string& section, int level) { return false; } diff --git a/rts/System/EventClient.h b/rts/System/EventClient.h index ae826d3bd8..51734d171f 100644 --- a/rts/System/EventClient.h +++ b/rts/System/EventClient.h @@ -302,7 +302,7 @@ class CEventClient virtual bool DefaultCommand(const CUnit* unit, const CFeature* feature, int& cmd); - virtual void ActiveCommandSet(const SCommandDescription* cmdDesc); + virtual void ActiveCommandChanged(const SCommandDescription* cmdDesc); virtual bool CommandNotify(const Command& cmd); virtual bool AddConsoleLine(const std::string& msg, const std::string& section, int level); diff --git a/rts/System/EventHandler.cpp b/rts/System/EventHandler.cpp index 60bc6c04eb..7fa775438e 100644 --- a/rts/System/EventHandler.cpp +++ b/rts/System/EventHandler.cpp @@ -762,10 +762,10 @@ template std::string ControlReverseIterat return {}; } -void CEventHandler::ActiveCommandSet(const SCommandDescription* cmdDesc) +void CEventHandler::ActiveCommandChanged(const SCommandDescription* cmdDesc) { ZoneScoped; - ITERATE_EVENTCLIENTLIST(ActiveCommandSet, cmdDesc); + ITERATE_EVENTCLIENTLIST(ActiveCommandChanged, cmdDesc); } bool CEventHandler::CommandNotify(const Command& cmd) diff --git a/rts/System/EventHandler.h b/rts/System/EventHandler.h index ecb774c820..ec4d2a9acf 100644 --- a/rts/System/EventHandler.h +++ b/rts/System/EventHandler.h @@ -234,7 +234,7 @@ class CEventHandler void DefaultCommand(const CUnit* unit, const CFeature* feature, int& cmd); - void ActiveCommandSet(const SCommandDescription *cmdDesc); + void ActiveCommandChanged(const SCommandDescription *cmdDesc); bool CommandNotify(const Command& cmd); bool AddConsoleLine(const std::string& msg, const std::string& section, int level); diff --git a/rts/System/Events.def b/rts/System/Events.def index 8eac21642e..5896fa5899 100644 --- a/rts/System/Events.def +++ b/rts/System/Events.def @@ -117,7 +117,7 @@ SETUP_EVENT(LastMessagePosition, MANAGED_BIT | UNSYNCED_BIT) SETUP_EVENT(DefaultCommand, MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT) - SETUP_EVENT(ActiveCommandSet, MANAGED_BIT | UNSYNCED_BIT) + SETUP_EVENT(ActiveCommandChanged, MANAGED_BIT | UNSYNCED_BIT) SETUP_EVENT(CommandNotify, MANAGED_BIT | UNSYNCED_BIT | CONTROL_BIT) SETUP_EVENT(AddConsoleLine, MANAGED_BIT | UNSYNCED_BIT) SETUP_EVENT(GroupChanged, MANAGED_BIT | UNSYNCED_BIT)