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

Function minimalHandleInput

src/OpenLoco/src/Ui.cpp:962–992  ·  view source on GitHub ↗

0x004C98CF

Source from the content-addressed store, hash-verified

960
961 // 0x004C98CF
962 void minimalHandleInput()
963 {
964 WindowManager::callEvent8OnAllWindows();
965
966 WindowManager::invalidateAllWindowsAfterInput();
967 Input::updateCursorPosition();
968
969 int32_t x;
970 int32_t y;
971 Input::MouseButton state;
972 while ((state = Input::nextMouseInput(x, y)) != Input::MouseButton::released)
973 {
974 Input::handleMouse(x, y, state);
975 }
976
977 if (Input::hasFlag(Input::Flags::rightMousePressed))
978 {
979 Input::handleMouse(x, y, state);
980 }
981 else if (x >= 0)
982 {
983 x = std::clamp(x, 0, Ui::width() - 1);
984 y = std::clamp(y, 0, Ui::height() - 1);
985
986 Input::handleMouse(x, y, state);
987 Input::processMouseOver(x, y);
988 processMouseTool(x, y);
989 }
990
991 WindowManager::callEvent9OnAllWindows();
992 }
993
994 void setWindowScaling(float newScaleFactor)
995 {

Callers 2

openFunction · 0.85
openFunction · 0.85

Calls 11

callEvent8OnAllWindowsFunction · 0.85
updateCursorPositionFunction · 0.85
nextMouseInputFunction · 0.85
handleMouseFunction · 0.85
widthFunction · 0.85
heightFunction · 0.85
processMouseOverFunction · 0.85
processMouseToolFunction · 0.85
callEvent9OnAllWindowsFunction · 0.85
hasFlagFunction · 0.70

Tested by

no test coverage detected