MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / processMouseTool

Function processMouseTool

src/OpenLoco/src/Ui.cpp:819–836  ·  view source on GitHub ↗

0x004CD422

Source from the content-addressed store, hash-verified

817
818 // 0x004CD422
819 static void processMouseTool(int16_t x, int16_t y)
820 {
821 if (!Input::hasFlag(Input::Flags::toolActive))
822 {
823 return;
824 }
825
826 auto toolWindow = WindowManager::find(ToolManager::getToolWindowType(), ToolManager::getToolWindowNumber());
827 if (toolWindow != nullptr)
828 {
829 // TODO: Use widget ids properly for tools.
830 toolWindow->callToolUpdate(ToolManager::getToolWidgetIndex(), WidgetId::none, x, y);
831 }
832 else
833 {
834 ToolManager::toolCancel();
835 }
836 }
837
838 // 0x004C96E7
839 void handleInput()

Callers 2

handleInputFunction · 0.85
minimalHandleInputFunction · 0.85

Calls 7

findFunction · 0.85
getToolWindowTypeFunction · 0.85
getToolWindowNumberFunction · 0.85
getToolWidgetIndexFunction · 0.85
callToolUpdateMethod · 0.80
hasFlagFunction · 0.70
toolCancelFunction · 0.50

Tested by

no test coverage detected