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

Function scrollMouseOver

src/OpenLoco/src/Ui/Windows/MessageWindow.cpp:183–200  ·  view source on GitHub ↗

0x0042A87C

Source from the content-addressed store, hash-verified

181
182 // 0x0042A87C
183 static void scrollMouseOver(Ui::Window& self, [[maybe_unused]] int16_t x, int16_t y, [[maybe_unused]] uint8_t scrollIndex)
184 {
185 self.flags &= ~(WindowFlags::notScrollView);
186
187 auto messageIndex = y / messageHeight;
188 auto messageId = 0xFFFF;
189
190 if (messageIndex < MessageManager::getNumMessages())
191 {
192 messageId = messageIndex;
193 }
194
195 if (self.rowHover != messageId)
196 {
197 self.rowHover = messageId;
198 self.invalidate();
199 }
200 }
201
202 // 0x0042A70C
203 static std::optional<FormatArguments> tooltip([[maybe_unused]] Ui::Window& self, [[maybe_unused]] WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id)

Callers

nothing calls this directly

Calls 2

getNumMessagesFunction · 0.85
invalidateMethod · 0.45

Tested by

no test coverage detected