MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / WindowResearchDevelopmentMouseUp

Function WindowResearchDevelopmentMouseUp

src/openrct2-ui/windows/Research.cpp:315–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313#pragma region Development page
314
315 void WindowResearchDevelopmentMouseUp(WidgetIndex widgetIndex, WidgetIndex baseWidgetIndex)
316 {
317 const auto& gameState = getGameState();
318 auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP);
319
320 if (widgetIndex == (WIDX_LAST_DEVELOPMENT_BUTTON + widgetOffset))
321 {
322 News::OpenSubject(News::ItemType::research, gameState.researchLastItem->rawValue);
323 }
324 }
325
326 void WindowResearchDevelopmentPrepareDraw(WindowBase* w, WidgetIndex baseWidgetIndex)
327 {

Callers 2

onMouseUpMethod · 0.85
onMouseUpMethod · 0.85

Calls 1

GetWidgetIndexOffsetFunction · 0.85

Tested by

no test coverage detected