mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names * Clang format * Fix build issues
This commit is contained in:
parent
09b1074d08
commit
e09f27df3c
|
@ -887,10 +887,10 @@ private:
|
|||
}
|
||||
|
||||
static void DrawWeatherWindow(
|
||||
DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, rct_window* original_w, int16_t left, int16_t right, int16_t top,
|
||||
DrawPixelInfo* dpi, IWeatherDrawer* weatherDrawer, WindowBase* original_w, int16_t left, int16_t right, int16_t top,
|
||||
int16_t bottom, DrawWeatherFunc drawFunc)
|
||||
{
|
||||
rct_window* w{};
|
||||
WindowBase* w{};
|
||||
auto itStart = WindowGetIterator(original_w);
|
||||
for (auto it = std::next(itStart);; it++)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
WindowNewRideInitVars();
|
||||
}
|
||||
|
||||
rct_window* OpenWindow(WindowClass wc) override
|
||||
WindowBase* OpenWindow(WindowClass wc) override
|
||||
{
|
||||
switch (wc)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
rct_window* OpenView(uint8_t view) override
|
||||
WindowBase* OpenView(uint8_t view) override
|
||||
{
|
||||
switch (view)
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
rct_window* OpenDetails(uint8_t type, int32_t id) override
|
||||
WindowBase* OpenDetails(uint8_t type, int32_t id) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
@ -207,17 +207,17 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
rct_window* ShowError(StringId title, StringId message, const Formatter& args) override
|
||||
WindowBase* ShowError(StringId title, StringId message, const Formatter& args) override
|
||||
{
|
||||
return WindowErrorOpen(title, message, args);
|
||||
}
|
||||
|
||||
rct_window* ShowError(std::string_view title, std::string_view message) override
|
||||
WindowBase* ShowError(std::string_view title, std::string_view message) override
|
||||
{
|
||||
return WindowErrorOpen(title, message);
|
||||
}
|
||||
|
||||
rct_window* OpenIntent(Intent* intent) override
|
||||
WindowBase* OpenIntent(Intent* intent) override
|
||||
{
|
||||
switch (intent->GetWindowClass())
|
||||
{
|
||||
|
@ -516,7 +516,7 @@ public:
|
|||
{
|
||||
uint8_t bannerIndex = static_cast<uint8_t>(intent.GetUIntExtra(INTENT_EXTRA_BANNER_INDEX));
|
||||
|
||||
rct_window* w = WindowFindByNumber(WindowClass::Banner, bannerIndex);
|
||||
WindowBase* w = WindowFindByNumber(WindowClass::Banner, bannerIndex);
|
||||
if (w != nullptr)
|
||||
{
|
||||
w->Invalidate();
|
||||
|
@ -620,7 +620,7 @@ public:
|
|||
WindowAllWheelInput();
|
||||
}
|
||||
|
||||
rct_window* GetOwner(const rct_viewport* viewport) override
|
||||
WindowBase* GetOwner(const Viewport* viewport) override
|
||||
{
|
||||
for (auto& w : g_window_list)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ ScreenCoordsXY gTooltipCursor;
|
|||
static int16_t _clickRepeatTicks;
|
||||
|
||||
static MouseState GameGetNextInput(ScreenCoordsXY& screenCoords);
|
||||
static void InputWidgetOver(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex);
|
||||
static void InputWidgetOver(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void InputWidgetOverChangeCheck(WindowClass windowClass, rct_windownumber windowNumber, WidgetIndex widgetIndex);
|
||||
static void InputWidgetOverFlatbuttonInvalidate();
|
||||
void ProcessMouseOver(const ScreenCoordsXY& screenCoords);
|
||||
|
@ -71,29 +71,29 @@ void InvalidateScroll();
|
|||
static RCTMouseData* GetMouseInput();
|
||||
void TileElementRightClick(int32_t type, TileElement* tileElement, const ScreenCoordsXY& screenCoords);
|
||||
static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState state);
|
||||
static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex);
|
||||
static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex);
|
||||
void InputStateWidgetPressed(
|
||||
const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, rct_window* w, Widget* widget);
|
||||
const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, WindowBase* w, Widget* widget);
|
||||
void SetCursor(CursorID cursor_id);
|
||||
static void InputWindowPositionContinue(
|
||||
rct_window& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords);
|
||||
static void InputWindowPositionEnd(rct_window& w, const ScreenCoordsXY& screenCoords);
|
||||
static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputWindowResizeContinue(rct_window& w, const ScreenCoordsXY& screenCoords);
|
||||
WindowBase& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords);
|
||||
static void InputWindowPositionEnd(WindowBase& w, const ScreenCoordsXY& screenCoords);
|
||||
static void InputWindowResizeBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputWindowResizeContinue(WindowBase& w, const ScreenCoordsXY& screenCoords);
|
||||
static void InputWindowResizeEnd();
|
||||
static void InputViewportDragBegin(rct_window& w);
|
||||
static void InputViewportDragBegin(WindowBase& w);
|
||||
static void InputViewportDragContinue();
|
||||
static void InputViewportDragEnd();
|
||||
static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputScrollContinue(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputScrollBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputScrollContinue(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputScrollEnd();
|
||||
static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void InputScrollPartUpdateHThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateHLeft(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateHRight(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVTop(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputScrollPartUpdateVBottom(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id);
|
||||
static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
|
||||
#pragma region Mouse input
|
||||
|
||||
|
@ -103,7 +103,7 @@ static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const Scr
|
|||
*/
|
||||
void GameHandleInput()
|
||||
{
|
||||
WindowVisitEach([](rct_window* w) { WindowEventPeriodicUpdateCall(w); });
|
||||
WindowVisitEach([](WindowBase* w) { WindowEventPeriodicUpdateCall(w); });
|
||||
|
||||
InvalidateAllWindowsAfterInput();
|
||||
|
||||
|
@ -171,7 +171,7 @@ static RCTMouseData* GetMouseInput()
|
|||
*
|
||||
* rct2: 0x006E957F
|
||||
*/
|
||||
static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex)
|
||||
static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
_inputState = InputState::ScrollRight;
|
||||
gInputDragLast = screenCoords;
|
||||
|
@ -188,7 +188,7 @@ static void InputScrollDragBegin(const ScreenCoordsXY& screenCoords, rct_window*
|
|||
* Based on (heavily changed)
|
||||
* rct2: 0x006E9E0E, 0x006E9ED0
|
||||
*/
|
||||
static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_window* w)
|
||||
static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, WindowBase* w)
|
||||
{
|
||||
WidgetIndex widgetIndex = _dragWidget.widget_index;
|
||||
uint8_t scrollIndex = _dragScrollIndex;
|
||||
|
@ -231,7 +231,7 @@ static void InputScrollDragContinue(const ScreenCoordsXY& screenCoords, rct_wind
|
|||
*/
|
||||
static void InputScrollRight(const ScreenCoordsXY& screenCoords, MouseState state)
|
||||
{
|
||||
rct_window* w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number);
|
||||
WindowBase* w = WindowFindByNumber(_dragWidget.window_classification, _dragWidget.window_number);
|
||||
if (w == nullptr)
|
||||
{
|
||||
ContextShowCursor();
|
||||
|
@ -267,7 +267,7 @@ static void InputScrollRight(const ScreenCoordsXY& screenCoords, MouseState stat
|
|||
*/
|
||||
static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState state)
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
Widget* widget;
|
||||
WidgetIndex widgetIndex;
|
||||
|
||||
|
@ -459,7 +459,7 @@ static void GameHandleInputMouse(const ScreenCoordsXY& screenCoords, MouseState
|
|||
|
||||
#pragma region Window positioning / resizing
|
||||
|
||||
void InputWindowPositionBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
void InputWindowPositionBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
_inputState = InputState::PositioningWindow;
|
||||
gInputDragLast = screenCoords - w.windowPos;
|
||||
|
@ -469,7 +469,7 @@ void InputWindowPositionBegin(rct_window& w, WidgetIndex widgetIndex, const Scre
|
|||
}
|
||||
|
||||
static void InputWindowPositionContinue(
|
||||
rct_window& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords)
|
||||
WindowBase& w, const ScreenCoordsXY& lastScreenCoords, const ScreenCoordsXY& newScreenCoords)
|
||||
{
|
||||
int32_t snapProximity;
|
||||
|
||||
|
@ -477,7 +477,7 @@ static void InputWindowPositionContinue(
|
|||
WindowMoveAndSnap(w, newScreenCoords - lastScreenCoords, snapProximity);
|
||||
}
|
||||
|
||||
static void InputWindowPositionEnd(rct_window& w, const ScreenCoordsXY& screenCoords)
|
||||
static void InputWindowPositionEnd(WindowBase& w, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
_inputState = InputState::Normal;
|
||||
gTooltipTimeout = 0;
|
||||
|
@ -485,7 +485,7 @@ static void InputWindowPositionEnd(rct_window& w, const ScreenCoordsXY& screenCo
|
|||
WindowEventMovedCall(&w, screenCoords);
|
||||
}
|
||||
|
||||
static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void InputWindowResizeBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
_inputState = InputState::Resizing;
|
||||
gInputDragLast = screenCoords;
|
||||
|
@ -496,7 +496,7 @@ static void InputWindowResizeBegin(rct_window& w, WidgetIndex widgetIndex, const
|
|||
_originalWindowHeight = w.height;
|
||||
}
|
||||
|
||||
static void InputWindowResizeContinue(rct_window& w, const ScreenCoordsXY& screenCoords)
|
||||
static void InputWindowResizeContinue(WindowBase& w, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (screenCoords.y < static_cast<int32_t>(ContextGetHeight()) - 2)
|
||||
{
|
||||
|
@ -519,7 +519,7 @@ static void InputWindowResizeEnd()
|
|||
|
||||
#pragma region Viewport dragging
|
||||
|
||||
static void InputViewportDragBegin(rct_window& w)
|
||||
static void InputViewportDragBegin(WindowBase& w)
|
||||
{
|
||||
w.flags &= ~WF_SCROLLING_TO_LOCATION;
|
||||
_inputState = InputState::ViewportRight;
|
||||
|
@ -539,8 +539,8 @@ static void InputViewportDragBegin(rct_window& w)
|
|||
|
||||
static void InputViewportDragContinue()
|
||||
{
|
||||
rct_window* w;
|
||||
rct_viewport* viewport;
|
||||
WindowBase* w;
|
||||
Viewport* viewport;
|
||||
|
||||
auto newDragCoords = ContextGetCursorPosition();
|
||||
const CursorState* cursorState = ContextGetCursorState();
|
||||
|
@ -606,7 +606,7 @@ static void InputViewportDragEnd()
|
|||
|
||||
#pragma region Scroll bars
|
||||
|
||||
static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void InputScrollBegin(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
||||
|
@ -676,7 +676,7 @@ static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const Scree
|
|||
WindowInvalidateByNumber(w.classification, w.number);
|
||||
}
|
||||
|
||||
static void InputScrollContinue(rct_window& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void InputScrollContinue(WindowBase& w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t scroll_part, scroll_id;
|
||||
|
||||
|
@ -743,7 +743,7 @@ static void InputScrollEnd()
|
|||
*
|
||||
* rct2: 0x006E98F2
|
||||
*/
|
||||
static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateHThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t x, int32_t scroll_id)
|
||||
{
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
auto& scroll = w.scrolls[scroll_id];
|
||||
|
@ -782,7 +782,7 @@ static void InputScrollPartUpdateHThumb(rct_window& w, WidgetIndex widgetIndex,
|
|||
*
|
||||
* rct2: 0x006E99A9
|
||||
*/
|
||||
static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateVThumb(WindowBase& w, WidgetIndex widgetIndex, int32_t y, int32_t scroll_id)
|
||||
{
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
auto& scroll = w.scrolls[scroll_id];
|
||||
|
@ -821,7 +821,7 @@ static void InputScrollPartUpdateVThumb(rct_window& w, WidgetIndex widgetIndex,
|
|||
*
|
||||
* rct2: 0x006E9A60
|
||||
*/
|
||||
static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateHLeft(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
{
|
||||
if (WindowFindByNumber(w.classification, w.number) != nullptr)
|
||||
{
|
||||
|
@ -838,7 +838,7 @@ static void InputScrollPartUpdateHLeft(rct_window& w, WidgetIndex widgetIndex, i
|
|||
*
|
||||
* rct2: 0x006E9ABF
|
||||
*/
|
||||
static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateHRight(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
{
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
if (WindowFindByNumber(w.classification, w.number) != nullptr)
|
||||
|
@ -864,7 +864,7 @@ static void InputScrollPartUpdateHRight(rct_window& w, WidgetIndex widgetIndex,
|
|||
*
|
||||
* rct2: 0x006E9C37
|
||||
*/
|
||||
static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateVTop(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
{
|
||||
if (WindowFindByNumber(w.classification, w.number) != nullptr)
|
||||
{
|
||||
|
@ -881,7 +881,7 @@ static void InputScrollPartUpdateVTop(rct_window& w, WidgetIndex widgetIndex, in
|
|||
*
|
||||
* rct2: 0x006E9C96
|
||||
*/
|
||||
static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
static void InputScrollPartUpdateVBottom(WindowBase& w, WidgetIndex widgetIndex, int32_t scroll_id)
|
||||
{
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
if (WindowFindByNumber(w.classification, w.number) != nullptr)
|
||||
|
@ -911,7 +911,7 @@ static void InputScrollPartUpdateVBottom(rct_window& w, WidgetIndex widgetIndex,
|
|||
*
|
||||
* rct2: 0x006E9253
|
||||
*/
|
||||
static void InputWidgetOver(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex)
|
||||
static void InputWidgetOver(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowClass windowClass = WindowClass::Null;
|
||||
rct_windownumber windowNumber = 0;
|
||||
|
@ -980,7 +980,7 @@ static void InputWidgetOverChangeCheck(WindowClass windowClass, rct_windownumber
|
|||
*/
|
||||
static void InputWidgetOverFlatbuttonInvalidate()
|
||||
{
|
||||
rct_window* w = WindowFindByNumber(gHoverWidget.window_classification, gHoverWidget.window_number);
|
||||
WindowBase* w = WindowFindByNumber(gHoverWidget.window_classification, gHoverWidget.window_number);
|
||||
if (w != nullptr)
|
||||
{
|
||||
WindowEventInvalidateCall(w);
|
||||
|
@ -995,7 +995,7 @@ static void InputWidgetOverFlatbuttonInvalidate()
|
|||
*
|
||||
* rct2: 0x006E95F9
|
||||
*/
|
||||
static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, WidgetIndex widgetIndex)
|
||||
static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowClass windowClass = WindowClass::Null;
|
||||
rct_windownumber windowNumber = 0;
|
||||
|
@ -1103,7 +1103,7 @@ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, rct_window* w, W
|
|||
*/
|
||||
void ProcessMouseOver(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
CursorID cursorId = CursorID::Arrow;
|
||||
auto ft = Formatter();
|
||||
|
@ -1186,7 +1186,7 @@ void ProcessMouseTool(const ScreenCoordsXY& screenCoords)
|
|||
{
|
||||
if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE)
|
||||
{
|
||||
rct_window* w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number);
|
||||
WindowBase* w = WindowFindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number);
|
||||
|
||||
if (w == nullptr)
|
||||
ToolCancel();
|
||||
|
@ -1200,7 +1200,7 @@ void ProcessMouseTool(const ScreenCoordsXY& screenCoords)
|
|||
* rct2: 0x006E8DA7
|
||||
*/
|
||||
void InputStateWidgetPressed(
|
||||
const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, rct_window* w, Widget* widget)
|
||||
const ScreenCoordsXY& screenCoords, MouseState state, WidgetIndex widgetIndex, WindowBase* w, Widget* widget)
|
||||
{
|
||||
WindowClass cursor_w_class;
|
||||
rct_windownumber cursor_w_number;
|
||||
|
@ -1208,7 +1208,7 @@ void InputStateWidgetPressed(
|
|||
cursor_w_number = gPressedWidget.window_number;
|
||||
WidgetIndex cursor_widgetIndex = gPressedWidget.widget_index;
|
||||
|
||||
rct_window* cursor_w = WindowFindByNumber(cursor_w_class, cursor_w_number);
|
||||
WindowBase* cursor_w = WindowFindByNumber(cursor_w_class, cursor_w_number);
|
||||
if (cursor_w == nullptr)
|
||||
{
|
||||
_inputState = InputState::Reset;
|
||||
|
@ -1469,7 +1469,7 @@ void InputStateWidgetPressed(
|
|||
}
|
||||
}
|
||||
|
||||
static void InputUpdateTooltip(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (gTooltipWidget.window_classification == WindowClass::Null)
|
||||
{
|
||||
|
@ -1550,7 +1550,7 @@ void SetCursor(CursorID cursor_id)
|
|||
*/
|
||||
void InvalidateScroll()
|
||||
{
|
||||
rct_window* w = WindowFindByNumber(gPressedWidget.window_classification, gPressedWidget.window_number);
|
||||
WindowBase* w = WindowFindByNumber(gPressedWidget.window_classification, gPressedWidget.window_number);
|
||||
if (w != nullptr)
|
||||
{
|
||||
// Reset to basic scroll
|
||||
|
@ -1581,7 +1581,7 @@ void StoreMouseInput(MouseState state, const ScreenCoordsXY& screenCoords)
|
|||
|
||||
void GameHandleEdgeScroll()
|
||||
{
|
||||
rct_window* mainWindow;
|
||||
WindowBase* mainWindow;
|
||||
int32_t scrollX, scrollY;
|
||||
|
||||
mainWindow = WindowGetMain();
|
||||
|
@ -1620,8 +1620,8 @@ bool InputTestPlaceObjectModifier(PLACE_OBJECT_MODIFIER modifier)
|
|||
|
||||
void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords)
|
||||
{
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
rct_viewport* viewport = mainWindow->viewport;
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
Viewport* viewport = mainWindow->viewport;
|
||||
|
||||
const int32_t speed = gConfigGeneral.EdgeScrollingSpeed;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static void ShortcutRotateConstructionObject()
|
|||
return;
|
||||
|
||||
// Rotate scenery
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
if (w != nullptr && !WidgetIsDisabled(*w, WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON)
|
||||
&& w->widgets[WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type != WindowWidgetType::Empty)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ static void ShortcutAdjustLand()
|
|||
{
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
rct_window* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window != nullptr)
|
||||
{
|
||||
window->Invalidate();
|
||||
|
@ -212,7 +212,7 @@ static void ShortcutAdjustWater()
|
|||
{
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
rct_window* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window != nullptr)
|
||||
{
|
||||
window->Invalidate();
|
||||
|
@ -231,7 +231,7 @@ static void ShortcutBuildScenery()
|
|||
{
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
rct_window* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window != nullptr)
|
||||
{
|
||||
window->Invalidate();
|
||||
|
@ -250,7 +250,7 @@ static void ShortcutBuildPaths()
|
|||
{
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
rct_window* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window != nullptr)
|
||||
{
|
||||
window->Invalidate();
|
||||
|
@ -382,7 +382,7 @@ static void ShortcutOpenCheatWindow()
|
|||
return;
|
||||
|
||||
// Check if window is already open
|
||||
rct_window* window = WindowFindByClass(WindowClass::Cheats);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Cheats);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowClose(*window);
|
||||
|
@ -408,7 +408,7 @@ static void ShortcutClearScenery()
|
|||
{
|
||||
if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
{
|
||||
rct_window* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window != nullptr)
|
||||
{
|
||||
window->Invalidate();
|
||||
|
@ -450,10 +450,10 @@ static void ShortcutOpenSceneryPicker()
|
|||
|| (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && gEditorStep != EditorStep::LandscapeEditor))
|
||||
return;
|
||||
|
||||
rct_window* window_scenery = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* window_scenery = WindowFindByClass(WindowClass::Scenery);
|
||||
if (window_scenery == nullptr)
|
||||
{
|
||||
rct_window* window_toolbar = WindowFindByClass(WindowClass::TopToolbar);
|
||||
WindowBase* window_toolbar = WindowFindByClass(WindowClass::TopToolbar);
|
||||
if (window_toolbar != nullptr)
|
||||
{
|
||||
window_toolbar->Invalidate();
|
||||
|
@ -515,7 +515,7 @@ static void ShortcutToggleVisibility()
|
|||
if (windowTileInspectorSelectedIndex < 0)
|
||||
return;
|
||||
|
||||
rct_window* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
if (w == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -530,7 +530,7 @@ static void ShortcutToggleVisibility()
|
|||
|
||||
static void ShortcutIncreaseElementHeight()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
if (w != nullptr)
|
||||
{
|
||||
int action = -1;
|
||||
|
@ -571,7 +571,7 @@ static void ShortcutIncreaseElementHeight()
|
|||
|
||||
static void ShortcutDecreaseElementHeight()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::TileInspector);
|
||||
if (w != nullptr)
|
||||
{
|
||||
int action = -1;
|
||||
|
@ -635,7 +635,7 @@ static void ShortcutConstructionTurnLeft()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutTurnLeft();
|
||||
|
@ -650,7 +650,7 @@ static void ShortcutConstructionTurnRight()
|
|||
{
|
||||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutTurnRight();
|
||||
|
@ -666,7 +666,7 @@ static void ShortcutConstructionSlopeUp()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutSlopeUp();
|
||||
|
@ -682,7 +682,7 @@ static void ShortcutConstructionBuildCurrent()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutBuildCurrent();
|
||||
|
@ -698,7 +698,7 @@ static void ShortcutConstructionSlopeDown()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutSlopeDown();
|
||||
|
@ -714,7 +714,7 @@ static void ShortcutConstructionDemolishCurrent()
|
|||
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)
|
||||
return;
|
||||
|
||||
rct_window* window = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* window = WindowFindByClass(WindowClass::Footpath);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowFootpathKeyboardShortcutDemolishCurrent();
|
||||
|
|
|
@ -51,10 +51,10 @@ void WindowDropdownShowImage(
|
|||
int32_t x, int32_t y, int32_t extray, uint8_t colour, uint8_t flags, int32_t numItems, int32_t itemWidth,
|
||||
int32_t itemHeight, int32_t numColumns);
|
||||
void WindowDropdownClose();
|
||||
int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w);
|
||||
void WindowDropdownShowColour(rct_window* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour);
|
||||
int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w);
|
||||
void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour);
|
||||
void WindowDropdownShowColourAvailable(
|
||||
rct_window* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours);
|
||||
WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour, uint32_t availableColours);
|
||||
uint32_t DropdownGetAppropriateImageDropdownItemsPerRow(uint32_t numItems);
|
||||
bool WindowDropDownHasMultipleColumns(size_t numItems);
|
||||
|
||||
|
|
|
@ -248,10 +248,10 @@ void InGameConsole::Update()
|
|||
if (_isOpen)
|
||||
{
|
||||
// When scrolling the map, the console pixels get copied... therefore invalidate the screen
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
rct_viewport* mainViewport = WindowGetViewport(mainWindow);
|
||||
Viewport* mainViewport = WindowGetViewport(mainWindow);
|
||||
if (mainViewport != nullptr)
|
||||
{
|
||||
if (_lastMainViewport != mainViewport->viewPos)
|
||||
|
|
|
@ -55,7 +55,7 @@ uint32_t LandTool::SizeToSpriteIndex(uint16_t size)
|
|||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
void LandTool::ShowSurfaceStyleDropdown(rct_window* w, Widget* widget, ObjectEntryIndex currentSurfaceType)
|
||||
void LandTool::ShowSurfaceStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentSurfaceType)
|
||||
{
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
|
@ -89,7 +89,7 @@ void LandTool::ShowSurfaceStyleDropdown(rct_window* w, Widget* widget, ObjectEnt
|
|||
gDropdownDefaultIndex = defaultIndex;
|
||||
}
|
||||
|
||||
void LandTool::ShowEdgeStyleDropdown(rct_window* w, Widget* widget, ObjectEntryIndex currentEdgeType)
|
||||
void LandTool::ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentEdgeType)
|
||||
{
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
|
|
|
@ -29,6 +29,6 @@ extern money64 gWaterToolLowerCost;
|
|||
namespace LandTool
|
||||
{
|
||||
uint32_t SizeToSpriteIndex(uint16_t size);
|
||||
void ShowSurfaceStyleDropdown(rct_window* w, Widget* widget, ObjectEntryIndex currentSurfaceType);
|
||||
void ShowEdgeStyleDropdown(rct_window* w, Widget* widget, ObjectEntryIndex currentEdgeType);
|
||||
void ShowSurfaceStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentSurfaceType);
|
||||
void ShowEdgeStyleDropdown(WindowBase* w, Widget* widget, ObjectEntryIndex currentEdgeType);
|
||||
} // namespace LandTool
|
||||
|
|
|
@ -871,15 +871,15 @@ StringId ThemeDescGetName(WindowClass wc)
|
|||
|
||||
void ColourSchemeUpdateAll()
|
||||
{
|
||||
WindowVisitEach([](rct_window* w) { ColourSchemeUpdate(w); });
|
||||
WindowVisitEach([](WindowBase* w) { ColourSchemeUpdate(w); });
|
||||
}
|
||||
|
||||
void ColourSchemeUpdate(rct_window* window)
|
||||
void ColourSchemeUpdate(WindowBase* window)
|
||||
{
|
||||
ColourSchemeUpdateByClass(window, window->classification);
|
||||
}
|
||||
|
||||
void ColourSchemeUpdateByClass(rct_window* window, WindowClass classification)
|
||||
void ColourSchemeUpdateByClass(WindowBase* window, WindowClass classification)
|
||||
{
|
||||
const WindowTheme* windowTheme;
|
||||
const UIThemeWindowEntry* entry = ThemeManager::CurrentTheme->GetEntry(classification);
|
||||
|
|
|
@ -21,9 +21,9 @@ enum
|
|||
UITHEME_FLAG_USE_FULL_BOTTOM_TOOLBAR = 1 << 4,
|
||||
};
|
||||
|
||||
void ColourSchemeUpdate(rct_window* window);
|
||||
void ColourSchemeUpdate(WindowBase* window);
|
||||
void ColourSchemeUpdateAll();
|
||||
void ColourSchemeUpdateByClass(rct_window* window, WindowClass classification);
|
||||
void ColourSchemeUpdateByClass(WindowBase* window, WindowClass classification);
|
||||
|
||||
void ThemeManagerInitialise();
|
||||
void ThemeManagerLoadAvailableThemes();
|
||||
|
|
|
@ -612,7 +612,7 @@ static void ViewportInteractionRemoveScenery(TileElement* tileElement, const Coo
|
|||
*/
|
||||
static void ViewportInteractionRemoveFootpath(TileElement* tileElement, const CoordsXY& mapCoords)
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
TileElement* tileElement2;
|
||||
|
||||
auto z = tileElement->GetBaseZ();
|
||||
|
@ -760,7 +760,7 @@ static Peep* ViewportInteractionGetClosestPeep(ScreenCoordsXY screenCoords, int3
|
|||
*/
|
||||
CoordsXY ViewportInteractionGetTileStartAtCursor(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
rct_window* window = WindowFindFromPoint(screenCoords);
|
||||
WindowBase* window = WindowFindFromPoint(screenCoords);
|
||||
if (window == nullptr || window->viewport == nullptr)
|
||||
{
|
||||
CoordsXY ret{};
|
||||
|
|
|
@ -22,32 +22,32 @@
|
|||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/util/Util.h>
|
||||
|
||||
static void WidgetFrameDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetResizeDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTabDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextButton(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextCentred(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetText(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextInset(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextBoxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetGroupboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCaptionDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCheckboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCloseboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetScrollDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
static void WidgetFrameDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetResizeDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTabDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextButton(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextCentred(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetText(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextInset(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetGroupboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCaptionDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCheckboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetCloseboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetScrollDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
static void WidgetHScrollbarDraw(
|
||||
DrawPixelInfo* dpi, const rct_scroll& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour);
|
||||
DrawPixelInfo* dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour);
|
||||
static void WidgetVScrollbarDraw(
|
||||
DrawPixelInfo* dpi, const rct_scroll& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour);
|
||||
static void WidgetDrawImage(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex);
|
||||
DrawPixelInfo* dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour);
|
||||
static void WidgetDrawImage(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex);
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006EB2A8
|
||||
*/
|
||||
void WidgetDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
void WidgetDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
const auto* widget = GetWidgetByIndex(w, widgetIndex);
|
||||
if (widget == nullptr)
|
||||
|
@ -117,7 +117,7 @@ void WidgetDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
|||
*
|
||||
* rct2: 0x006EB6CE
|
||||
*/
|
||||
static void WidgetFrameDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetFrameDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -151,7 +151,7 @@ static void WidgetFrameDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widge
|
|||
*
|
||||
* rct2: 0x006EB765
|
||||
*/
|
||||
static void WidgetResizeDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetResizeDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -182,7 +182,7 @@ static void WidgetResizeDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widg
|
|||
*
|
||||
* rct2: 0x006EB8E5
|
||||
*/
|
||||
static void WidgetButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -214,7 +214,7 @@ static void WidgetButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widg
|
|||
*
|
||||
* rct2: 0x006EB806
|
||||
*/
|
||||
static void WidgetTabDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetTabDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -263,7 +263,7 @@ static void WidgetTabDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetI
|
|||
*
|
||||
* rct2: 0x006EB861
|
||||
*/
|
||||
static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (!WidgetIsDisabled(w, widgetIndex) && WidgetIsHighlighted(w, widgetIndex))
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ static void WidgetFlatButtonDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex
|
|||
*
|
||||
* rct2: 0x006EBBEB
|
||||
*/
|
||||
static void WidgetTextButton(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetTextButton(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -334,7 +334,7 @@ static void WidgetTextButton(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widg
|
|||
*
|
||||
* rct2: 0x006EBC41
|
||||
*/
|
||||
static void WidgetTextCentred(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetTextCentred(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -380,7 +380,7 @@ static void WidgetTextCentred(DrawPixelInfo* dpi, rct_window& w, WidgetIndex wid
|
|||
*
|
||||
* rct2: 0x006EBD52
|
||||
*/
|
||||
static void WidgetText(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetText(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -429,7 +429,7 @@ static void WidgetText(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetInde
|
|||
*
|
||||
* rct2: 0x006EBD1F
|
||||
*/
|
||||
static void WidgetTextInset(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetTextInset(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -469,7 +469,7 @@ static std::pair<StringId, void*> WidgetGetStringidAndArgs(const Widget& widget)
|
|||
*
|
||||
* rct2: 0x006EB535
|
||||
*/
|
||||
static void WidgetGroupboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetGroupboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -530,7 +530,7 @@ static void WidgetGroupboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex wi
|
|||
*
|
||||
* rct2: 0x006EB2F9
|
||||
*/
|
||||
static void WidgetCaptionDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetCaptionDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto* widget = &w.widgets[widgetIndex];
|
||||
|
@ -579,7 +579,7 @@ static void WidgetCaptionDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex wid
|
|||
*
|
||||
* rct2: 0x006EBB85
|
||||
*/
|
||||
static void WidgetCloseboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetCloseboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -616,7 +616,7 @@ static void WidgetCloseboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex wi
|
|||
*
|
||||
* rct2: 0x006EBAD9
|
||||
*/
|
||||
static void WidgetCheckboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetCheckboxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -657,7 +657,7 @@ static void WidgetCheckboxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex wi
|
|||
*
|
||||
* rct2: 0x006EBD96
|
||||
*/
|
||||
static void WidgetScrollDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetScrollDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
int32_t scrollIndex = WindowGetScrollDataIndex(w, widgetIndex);
|
||||
|
@ -726,7 +726,7 @@ static void WidgetScrollDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widg
|
|||
}
|
||||
|
||||
static void WidgetHScrollbarDraw(
|
||||
DrawPixelInfo* dpi, const rct_scroll& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour)
|
||||
DrawPixelInfo* dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour)
|
||||
{
|
||||
colour &= 0x7F;
|
||||
// Trough
|
||||
|
@ -764,7 +764,7 @@ static void WidgetHScrollbarDraw(
|
|||
}
|
||||
|
||||
static void WidgetVScrollbarDraw(
|
||||
DrawPixelInfo* dpi, const rct_scroll& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour)
|
||||
DrawPixelInfo* dpi, const ScrollBar& scroll, int32_t l, int32_t t, int32_t r, int32_t b, int32_t colour)
|
||||
{
|
||||
colour &= 0x7F;
|
||||
// Trough
|
||||
|
@ -799,7 +799,7 @@ static void WidgetVScrollbarDraw(
|
|||
*
|
||||
* rct2: 0x006EB951
|
||||
*/
|
||||
static void WidgetDrawImage(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetDrawImage(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Get the widget
|
||||
const auto& widget = w.widgets[widgetIndex];
|
||||
|
@ -848,26 +848,26 @@ static void WidgetDrawImage(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widge
|
|||
}
|
||||
}
|
||||
|
||||
bool WidgetIsDisabled(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsDisabled(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w.classification == WindowClass::Custom)
|
||||
return w.widgets[widgetIndex].flags & WIDGET_FLAGS::IS_DISABLED;
|
||||
return (w.disabled_widgets & (1LL << widgetIndex)) != 0;
|
||||
}
|
||||
|
||||
bool WidgetIsHoldable(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsHoldable(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w.classification == WindowClass::Custom)
|
||||
return w.widgets[widgetIndex].flags & WIDGET_FLAGS::IS_HOLDABLE;
|
||||
return (w.hold_down_widgets & (1LL << widgetIndex)) != 0;
|
||||
}
|
||||
|
||||
bool WidgetIsVisible(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsVisible(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
return w.widgets[widgetIndex].IsVisible();
|
||||
}
|
||||
|
||||
bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsPressed(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w.classification == WindowClass::Custom)
|
||||
{
|
||||
|
@ -899,7 +899,7 @@ bool WidgetIsPressed(const rct_window& w, WidgetIndex widgetIndex)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool WidgetIsHighlighted(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsHighlighted(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (gHoverWidget.window_classification != w.classification)
|
||||
return false;
|
||||
|
@ -910,7 +910,7 @@ bool WidgetIsHighlighted(const rct_window& w, WidgetIndex widgetIndex)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool WidgetIsActiveTool(const rct_window& w, WidgetIndex widgetIndex)
|
||||
bool WidgetIsActiveTool(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (!(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)))
|
||||
return false;
|
||||
|
@ -935,7 +935,7 @@ bool WidgetIsActiveTool(const rct_window& w, WidgetIndex widgetIndex)
|
|||
* edi: widget
|
||||
*/
|
||||
void WidgetScrollGetPart(
|
||||
rct_window& w, const Widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords,
|
||||
WindowBase& w, const Widget* widget, const ScreenCoordsXY& screenCoords, ScreenCoordsXY& retScreenCoords,
|
||||
int32_t* output_scroll_area, int32_t* scroll_id)
|
||||
{
|
||||
*scroll_id = 0;
|
||||
|
@ -1039,7 +1039,7 @@ void WidgetScrollGetPart(
|
|||
}
|
||||
}
|
||||
|
||||
Widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex)
|
||||
Widget* GetWidgetByIndex(const WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Make sure we don't go out of bounds if we are given a bad widget index
|
||||
WidgetIndex index = 0;
|
||||
|
@ -1057,7 +1057,7 @@ Widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static void SafeSetWidgetFlag(rct_window& w, WidgetIndex widgetIndex, WidgetFlags mask, bool value)
|
||||
static void SafeSetWidgetFlag(WindowBase& w, WidgetIndex widgetIndex, WidgetFlags mask, bool value)
|
||||
{
|
||||
Widget* widget = GetWidgetByIndex(w, widgetIndex);
|
||||
if (widget == nullptr)
|
||||
|
@ -1071,12 +1071,12 @@ static void SafeSetWidgetFlag(rct_window& w, WidgetIndex widgetIndex, WidgetFlag
|
|||
widget->flags &= ~mask;
|
||||
}
|
||||
|
||||
void WidgetSetEnabled(rct_window& w, WidgetIndex widgetIndex, bool enabled)
|
||||
void WidgetSetEnabled(WindowBase& w, WidgetIndex widgetIndex, bool enabled)
|
||||
{
|
||||
WidgetSetDisabled(w, widgetIndex, !enabled);
|
||||
}
|
||||
|
||||
void WidgetSetDisabled(rct_window& w, WidgetIndex widgetIndex, bool value)
|
||||
void WidgetSetDisabled(WindowBase& w, WidgetIndex widgetIndex, bool value)
|
||||
{
|
||||
SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_DISABLED, value);
|
||||
if (value)
|
||||
|
@ -1089,7 +1089,7 @@ void WidgetSetDisabled(rct_window& w, WidgetIndex widgetIndex, bool value)
|
|||
}
|
||||
}
|
||||
|
||||
void WidgetSetHoldable(rct_window& w, WidgetIndex widgetIndex, bool value)
|
||||
void WidgetSetHoldable(WindowBase& w, WidgetIndex widgetIndex, bool value)
|
||||
{
|
||||
SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_HOLDABLE, value);
|
||||
if (value)
|
||||
|
@ -1102,12 +1102,12 @@ void WidgetSetHoldable(rct_window& w, WidgetIndex widgetIndex, bool value)
|
|||
}
|
||||
}
|
||||
|
||||
void WidgetSetVisible(rct_window& w, WidgetIndex widgetIndex, bool value)
|
||||
void WidgetSetVisible(WindowBase& w, WidgetIndex widgetIndex, bool value)
|
||||
{
|
||||
SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_HIDDEN, !value);
|
||||
}
|
||||
|
||||
void WidgetSetPressed(rct_window& w, WidgetIndex widgetIndex, bool value)
|
||||
void WidgetSetPressed(WindowBase& w, WidgetIndex widgetIndex, bool value)
|
||||
{
|
||||
SafeSetWidgetFlag(w, widgetIndex, WIDGET_FLAGS::IS_PRESSED, value);
|
||||
if (value)
|
||||
|
@ -1116,12 +1116,12 @@ void WidgetSetPressed(rct_window& w, WidgetIndex widgetIndex, bool value)
|
|||
w.pressed_widgets &= ~(1uLL << widgetIndex);
|
||||
}
|
||||
|
||||
void WidgetSetCheckboxValue(rct_window& w, WidgetIndex widgetIndex, bool value)
|
||||
void WidgetSetCheckboxValue(WindowBase& w, WidgetIndex widgetIndex, bool value)
|
||||
{
|
||||
WidgetSetPressed(w, widgetIndex, value);
|
||||
}
|
||||
|
||||
static void WidgetTextBoxDraw(DrawPixelInfo* dpi, rct_window& w, WidgetIndex widgetIndex)
|
||||
static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex widgetIndex)
|
||||
{
|
||||
int32_t no_lines = 0;
|
||||
char wrapped_string[TEXT_INPUT_SIZE];
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
#include <openrct2/interface/Widget.h>
|
||||
|
||||
ImageId GetColourButtonImage(colour_t colour);
|
||||
Widget* GetWidgetByIndex(const rct_window& w, WidgetIndex widgetIndex);
|
||||
Widget* GetWidgetByIndex(const WindowBase& w, WidgetIndex widgetIndex);
|
||||
|
|
|
@ -200,8 +200,8 @@ static ScreenCoordsXY GetCentrePositionForNewWindow(int32_t width, int32_t heigh
|
|||
return ScreenCoordsXY{ (screenWidth - width) / 2, std::max(TOP_TOOLBAR_HEIGHT + 1, (screenHeight - height) / 2) };
|
||||
}
|
||||
|
||||
rct_window* WindowCreate(
|
||||
std::unique_ptr<rct_window>&& wp, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags)
|
||||
WindowBase* WindowCreate(
|
||||
std::unique_ptr<WindowBase>&& wp, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags)
|
||||
{
|
||||
if (flags & WF_AUTO_POSITION)
|
||||
{
|
||||
|
@ -287,27 +287,27 @@ rct_window* WindowCreate(
|
|||
return w;
|
||||
}
|
||||
|
||||
rct_window* WindowCreate(
|
||||
WindowBase* WindowCreate(
|
||||
const ScreenCoordsXY& pos, int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags)
|
||||
{
|
||||
auto w = std::make_unique<rct_window>();
|
||||
auto w = std::make_unique<WindowBase>();
|
||||
w->event_handlers = event_handlers;
|
||||
return WindowCreate(std::move(w), cls, pos, width, height, flags);
|
||||
}
|
||||
|
||||
rct_window* WindowCreateAutoPos(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags)
|
||||
WindowBase* WindowCreateAutoPos(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags)
|
||||
{
|
||||
auto pos = GetAutoPositionForNewWindow(width, height);
|
||||
return WindowCreate(pos, width, height, event_handlers, cls, flags);
|
||||
}
|
||||
|
||||
rct_window* WindowCreateCentred(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags)
|
||||
WindowBase* WindowCreateCentred(int32_t width, int32_t height, WindowEventList* event_handlers, WindowClass cls, uint32_t flags)
|
||||
{
|
||||
auto pos = GetCentrePositionForNewWindow(width, height);
|
||||
return WindowCreate(pos, width, height, event_handlers, cls, flags);
|
||||
}
|
||||
|
||||
static int32_t WindowGetWidgetIndex(const rct_window& w, Widget* widget)
|
||||
static int32_t WindowGetWidgetIndex(const WindowBase& w, Widget* widget)
|
||||
{
|
||||
int32_t i = 0;
|
||||
for (Widget* widget2 = w.widgets; widget2->type != WindowWidgetType::Last; widget2++, i++)
|
||||
|
@ -316,7 +316,7 @@ static int32_t WindowGetWidgetIndex(const rct_window& w, Widget* widget)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int32_t WindowGetScrollIndex(const rct_window& w, int32_t targetWidgetIndex)
|
||||
static int32_t WindowGetScrollIndex(const WindowBase& w, int32_t targetWidgetIndex)
|
||||
{
|
||||
if (w.widgets[targetWidgetIndex].type != WindowWidgetType::Scroll)
|
||||
return -1;
|
||||
|
@ -334,7 +334,7 @@ static int32_t WindowGetScrollIndex(const rct_window& w, int32_t targetWidgetInd
|
|||
return scrollIndex;
|
||||
}
|
||||
|
||||
static Widget* WindowGetScrollWidget(const rct_window& w, int32_t scrollIndex)
|
||||
static Widget* WindowGetScrollWidget(const WindowBase& w, int32_t scrollIndex)
|
||||
{
|
||||
for (Widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++)
|
||||
{
|
||||
|
@ -353,7 +353,7 @@ static Widget* WindowGetScrollWidget(const rct_window& w, int32_t scrollIndex)
|
|||
*
|
||||
* rct2: 0x006E78E3
|
||||
*/
|
||||
static void WindowScrollWheelInput(rct_window& w, int32_t scrollIndex, int32_t wheel)
|
||||
static void WindowScrollWheelInput(WindowBase& w, int32_t scrollIndex, int32_t wheel)
|
||||
{
|
||||
auto& scroll = w.scrolls[scrollIndex];
|
||||
Widget* widget = WindowGetScrollWidget(w, scrollIndex);
|
||||
|
@ -384,7 +384,7 @@ static void WindowScrollWheelInput(rct_window& w, int32_t scrollIndex, int32_t w
|
|||
*
|
||||
* rct2: 0x006E793B
|
||||
*/
|
||||
static int32_t WindowWheelInput(rct_window& w, int32_t wheel)
|
||||
static int32_t WindowWheelInput(WindowBase& w, int32_t wheel)
|
||||
{
|
||||
int32_t i = 0;
|
||||
for (Widget* widget = w.widgets; widget->type != WindowWidgetType::Last; widget++)
|
||||
|
@ -409,7 +409,7 @@ static int32_t WindowWheelInput(rct_window& w, int32_t wheel)
|
|||
*
|
||||
* rct2: 0x006E79FB
|
||||
*/
|
||||
static void WindowViewportWheelInput(rct_window& w, int32_t wheel)
|
||||
static void WindowViewportWheelInput(WindowBase& w, int32_t wheel)
|
||||
{
|
||||
if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))
|
||||
return;
|
||||
|
@ -420,7 +420,7 @@ static void WindowViewportWheelInput(rct_window& w, int32_t wheel)
|
|||
WindowZoomOut(w, true);
|
||||
}
|
||||
|
||||
static bool WindowOtherWheelInput(rct_window& w, WidgetIndex widgetIndex, int32_t wheel)
|
||||
static bool WindowOtherWheelInput(WindowBase& w, WidgetIndex widgetIndex, int32_t wheel)
|
||||
{
|
||||
// HACK: Until we have a new window system that allows us to add new events like mouse wheel easily,
|
||||
// this selective approach will have to do.
|
||||
|
@ -537,7 +537,7 @@ void WindowAllWheelInput()
|
|||
// Check window cursor is over
|
||||
if (!(InputTestFlag(INPUT_FLAG_5)))
|
||||
{
|
||||
rct_window* w = WindowFindFromPoint(cursorState->position);
|
||||
WindowBase* w = WindowFindFromPoint(cursorState->position);
|
||||
if (w != nullptr)
|
||||
{
|
||||
// Check if main window
|
||||
|
@ -587,7 +587,7 @@ void ApplyScreenSaverLockSetting()
|
|||
* Initialises scroll widgets to their virtual size.
|
||||
* rct2: 0x006EAEB8
|
||||
*/
|
||||
void WindowInitScrollWidgets(rct_window& w)
|
||||
void WindowInitScrollWidgets(WindowBase& w)
|
||||
{
|
||||
Widget* widget;
|
||||
int32_t widget_index, scroll_index;
|
||||
|
@ -629,7 +629,7 @@ void WindowInitScrollWidgets(rct_window& w)
|
|||
*
|
||||
* rct2: 0x006EB15C
|
||||
*/
|
||||
void WindowDrawWidgets(rct_window& w, DrawPixelInfo* dpi)
|
||||
void WindowDrawWidgets(WindowBase& w, DrawPixelInfo* dpi)
|
||||
{
|
||||
Widget* widget;
|
||||
WidgetIndex widgetIndex;
|
||||
|
@ -674,7 +674,7 @@ void WindowDrawWidgets(rct_window& w, DrawPixelInfo* dpi)
|
|||
*
|
||||
* rct2: 0x006EA776
|
||||
*/
|
||||
static void WindowInvalidatePressedImageButton(const rct_window& w)
|
||||
static void WindowInvalidatePressedImageButton(const WindowBase& w)
|
||||
{
|
||||
WidgetIndex widgetIndex;
|
||||
Widget* widget;
|
||||
|
@ -696,7 +696,7 @@ static void WindowInvalidatePressedImageButton(const rct_window& w)
|
|||
*/
|
||||
void InvalidateAllWindowsAfterInput()
|
||||
{
|
||||
WindowVisitEach([](rct_window* w) {
|
||||
WindowVisitEach([](WindowBase* w) {
|
||||
WindowUpdateScrollWidgets(*w);
|
||||
WindowInvalidatePressedImageButton(*w);
|
||||
WindowEventResizeCall(w);
|
||||
|
@ -807,7 +807,7 @@ void Window::TextInputOpen(
|
|||
WindowTextInputOpen(this, callWidget, title, description, descriptionArgs, existingText, existingArgs, maxLength);
|
||||
}
|
||||
|
||||
void WindowAlignTabs(rct_window* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id)
|
||||
void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id)
|
||||
{
|
||||
int32_t i, x = w->widgets[start_tab_id].left;
|
||||
int32_t tab_width = w->widgets[start_tab_id].width();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <openrct2/interface/Window.h>
|
||||
#include <openrct2/interface/Window_internal.h>
|
||||
|
||||
struct Window : rct_window
|
||||
struct Window : WindowBase
|
||||
{
|
||||
virtual bool IsLegacy() override;
|
||||
virtual void OnDraw(DrawPixelInfo& dpi) override;
|
||||
|
@ -37,4 +37,4 @@ struct Window : rct_window
|
|||
|
||||
void WindowAllWheelInput();
|
||||
void ApplyScreenSaverLockSetting();
|
||||
void WindowAlignTabs(rct_window* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id);
|
||||
void WindowAlignTabs(WindowBase* w, WidgetIndex start_tab_id, WidgetIndex end_tab_id);
|
||||
|
|
|
@ -209,7 +209,7 @@ namespace OpenRCT2::Scripting
|
|||
|
||||
} // namespace OpenRCT2::Scripting
|
||||
|
||||
CustomListView::CustomListView(rct_window* parent, size_t scrollIndex)
|
||||
CustomListView::CustomListView(WindowBase* parent, size_t scrollIndex)
|
||||
: ParentWindow(parent)
|
||||
, ScrollIndex(scrollIndex)
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ void CustomListView::MouseUp(const ScreenCoordsXY& pos)
|
|||
}
|
||||
}
|
||||
|
||||
void CustomListView::Paint(rct_window* w, DrawPixelInfo* dpi, const rct_scroll* scroll) const
|
||||
void CustomListView::Paint(WindowBase* w, DrawPixelInfo* dpi, const ScrollBar* scroll) const
|
||||
{
|
||||
auto paletteIndex = ColourMapA[w->colours[1]].mid_light;
|
||||
GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width, dpi->y + dpi->height } }, paletteIndex);
|
||||
|
@ -665,7 +665,7 @@ void CustomListView::Paint(rct_window* w, DrawPixelInfo* dpi, const rct_scroll*
|
|||
}
|
||||
|
||||
void CustomListView::PaintHeading(
|
||||
rct_window* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text,
|
||||
WindowBase* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text,
|
||||
ColumnSortOrder sortOrder, bool isPressed) const
|
||||
{
|
||||
auto boxFlags = 0;
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
private:
|
||||
static constexpr int32_t HEADER_ROW = -1;
|
||||
|
||||
rct_window* ParentWindow{};
|
||||
WindowBase* ParentWindow{};
|
||||
size_t ScrollIndex{};
|
||||
std::vector<ListViewColumn> Columns;
|
||||
std::vector<ListViewItem> Items;
|
||||
|
@ -120,7 +120,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
DukValue OnClick;
|
||||
DukValue OnHighlight;
|
||||
|
||||
CustomListView(rct_window* parent, size_t scrollIndex);
|
||||
CustomListView(WindowBase* parent, size_t scrollIndex);
|
||||
ScrollbarType GetScrollbars() const;
|
||||
void SetScrollbars(ScrollbarType value, bool initialising = false);
|
||||
const std::vector<ListViewColumn>& GetColumns() const;
|
||||
|
@ -136,11 +136,11 @@ namespace OpenRCT2::Ui::Windows
|
|||
void MouseOver(const ScreenCoordsXY& pos, bool isMouseDown);
|
||||
void MouseDown(const ScreenCoordsXY& pos);
|
||||
void MouseUp(const ScreenCoordsXY& pos);
|
||||
void Paint(rct_window* w, DrawPixelInfo* dpi, const rct_scroll* scroll) const;
|
||||
void Paint(WindowBase* w, DrawPixelInfo* dpi, const ScrollBar* scroll) const;
|
||||
|
||||
private:
|
||||
void PaintHeading(
|
||||
rct_window* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text,
|
||||
WindowBase* w, DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const std::string& text,
|
||||
ColumnSortOrder sortOrder, bool isPressed) const;
|
||||
void PaintSeperator(DrawPixelInfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text) const;
|
||||
void PaintCell(
|
||||
|
|
|
@ -347,7 +347,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
|
||||
CustomWindowInfo(const CustomWindowInfo&) = delete;
|
||||
|
||||
const CustomWidgetDesc* GetCustomWidgetDesc(rct_window* w, size_t widgetIndex) const
|
||||
const CustomWidgetDesc* GetCustomWidgetDesc(WindowBase* w, size_t widgetIndex) const
|
||||
{
|
||||
if (widgetIndex < WidgetIndexMap.size())
|
||||
{
|
||||
|
@ -371,13 +371,13 @@ namespace OpenRCT2::Ui::Windows
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
CustomWidgetDesc* GetCustomWidgetDesc(rct_window* w, size_t widgetIndex)
|
||||
CustomWidgetDesc* GetCustomWidgetDesc(WindowBase* w, size_t widgetIndex)
|
||||
{
|
||||
return const_cast<CustomWidgetDesc*>(std::as_const(*this).GetCustomWidgetDesc(w, widgetIndex));
|
||||
}
|
||||
};
|
||||
|
||||
static CustomWindowInfo& GetInfo(rct_window* w);
|
||||
static CustomWindowInfo& GetInfo(WindowBase* w);
|
||||
static void InvokeEventHandler(const std::shared_ptr<Plugin>& owner, const DukValue& dukHandler);
|
||||
static void InvokeEventHandler(
|
||||
const std::shared_ptr<Plugin>& owner, const DukValue& dukHandler, const std::vector<DukValue>& args);
|
||||
|
@ -1124,7 +1124,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
|
||||
rct_windownumber CustomWindow::_nextWindowNumber;
|
||||
|
||||
rct_window* WindowCustomOpen(std::shared_ptr<Plugin> owner, DukValue dukDesc)
|
||||
WindowBase* WindowCustomOpen(std::shared_ptr<Plugin> owner, DukValue dukDesc)
|
||||
{
|
||||
auto desc = CustomWindowDesc::FromDukValue(dukDesc);
|
||||
uint16_t windowFlags = WF_RESIZABLE | WF_TRANSPARENT;
|
||||
|
@ -1145,7 +1145,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return window;
|
||||
}
|
||||
|
||||
static CustomWindowInfo& GetInfo(rct_window* w)
|
||||
static CustomWindowInfo& GetInfo(WindowBase* w)
|
||||
{
|
||||
return *(static_cast<CustomWindowInfo*>(w->custom_info));
|
||||
}
|
||||
|
@ -1163,7 +1163,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
scriptEngine.ExecutePluginCall(owner, dukHandler, args, false);
|
||||
}
|
||||
|
||||
std::string GetWindowTitle(rct_window* w)
|
||||
std::string GetWindowTitle(WindowBase* w)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1173,7 +1173,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return {};
|
||||
}
|
||||
|
||||
void UpdateWindowTitle(rct_window* w, std::string_view value)
|
||||
void UpdateWindowTitle(WindowBase* w, std::string_view value)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1182,7 +1182,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateWindowTab(rct_window* w, int32_t tabIndex)
|
||||
void UpdateWindowTab(WindowBase* w, int32_t tabIndex)
|
||||
{
|
||||
if (w->classification == WindowClass::Custom && w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1194,7 +1194,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetText(rct_window* w, WidgetIndex widgetIndex, std::string_view value)
|
||||
void UpdateWidgetText(WindowBase* w, WidgetIndex widgetIndex, std::string_view value)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1209,7 +1209,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetItems(rct_window* w, WidgetIndex widgetIndex, const std::vector<std::string>& items)
|
||||
void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector<std::string>& items)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1223,7 +1223,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetColour(rct_window* w, WidgetIndex widgetIndex, colour_t colour)
|
||||
void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, colour_t colour)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1250,7 +1250,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
void UpdateWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex, int32_t selectedIndex)
|
||||
void UpdateWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex, int32_t selectedIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1297,7 +1297,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> GetWidgetItems(rct_window* w, WidgetIndex widgetIndex)
|
||||
std::vector<std::string> GetWidgetItems(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1311,7 +1311,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return {};
|
||||
}
|
||||
|
||||
colour_t GetWidgetColour(rct_window* w, WidgetIndex widgetIndex)
|
||||
colour_t GetWidgetColour(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1325,7 +1325,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return COLOUR_BLACK;
|
||||
}
|
||||
|
||||
int32_t GetWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex)
|
||||
int32_t GetWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1339,7 +1339,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return -1;
|
||||
}
|
||||
|
||||
rct_window* FindCustomWindowByClassification(std::string_view classification)
|
||||
WindowBase* FindCustomWindowByClassification(std::string_view classification)
|
||||
{
|
||||
for (const auto& w : g_window_list)
|
||||
{
|
||||
|
@ -1355,7 +1355,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::optional<WidgetIndex> FindWidgetIndexByName(rct_window* w, std::string_view name)
|
||||
std::optional<WidgetIndex> FindWidgetIndexByName(WindowBase* w, std::string_view name)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1375,7 +1375,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::string GetWidgetName(rct_window* w, WidgetIndex widgetIndex)
|
||||
std::string GetWidgetName(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1389,7 +1389,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return {};
|
||||
}
|
||||
|
||||
void SetWidgetName(rct_window* w, WidgetIndex widgetIndex, std::string_view name)
|
||||
void SetWidgetName(WindowBase* w, WidgetIndex widgetIndex, std::string_view name)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1402,7 +1402,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
std::string GetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex)
|
||||
std::string GetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1416,7 +1416,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return {};
|
||||
}
|
||||
|
||||
void SetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex, std::string_view tooltip)
|
||||
void SetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex, std::string_view tooltip)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1429,7 +1429,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
}
|
||||
}
|
||||
|
||||
CustomListView* GetCustomListView(rct_window* w, WidgetIndex widgetIndex)
|
||||
CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1443,7 +1443,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t GetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex)
|
||||
int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1457,7 +1457,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
return 0;
|
||||
}
|
||||
|
||||
void SetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex, int32_t value)
|
||||
void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value)
|
||||
{
|
||||
if (w->custom_info != nullptr)
|
||||
{
|
||||
|
@ -1473,7 +1473,7 @@ namespace OpenRCT2::Ui::Windows
|
|||
void CloseWindowsOwnedByPlugin(std::shared_ptr<Plugin> plugin)
|
||||
{
|
||||
// Get all the windows that need closing
|
||||
std::vector<std::shared_ptr<rct_window>> customWindows;
|
||||
std::vector<std::shared_ptr<WindowBase>> customWindows;
|
||||
for (const auto& window : g_window_list)
|
||||
{
|
||||
if (window->classification == WindowClass::Custom)
|
||||
|
|
|
@ -21,25 +21,25 @@ namespace OpenRCT2::Ui::Windows
|
|||
{
|
||||
class CustomListView;
|
||||
|
||||
std::string GetWindowTitle(rct_window* w);
|
||||
void UpdateWindowTitle(rct_window* w, std::string_view value);
|
||||
void UpdateWindowTab(rct_window* w, int32_t tabIndex);
|
||||
void UpdateWidgetText(rct_window* w, WidgetIndex widget, std::string_view string_view);
|
||||
void UpdateWidgetItems(rct_window* w, WidgetIndex widgetIndex, const std::vector<std::string>& items);
|
||||
void UpdateWidgetColour(rct_window* w, WidgetIndex widgetIndex, colour_t colour);
|
||||
void UpdateWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex, int32_t selectedIndex);
|
||||
std::vector<std::string> GetWidgetItems(rct_window* w, WidgetIndex widgetIndex);
|
||||
colour_t GetWidgetColour(rct_window* w, WidgetIndex widgetIndex);
|
||||
int32_t GetWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex);
|
||||
rct_window* FindCustomWindowByClassification(std::string_view classification);
|
||||
std::optional<WidgetIndex> FindWidgetIndexByName(rct_window* w, std::string_view name);
|
||||
std::string GetWidgetName(rct_window* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetName(rct_window* w, WidgetIndex widgetIndex, std::string_view name);
|
||||
std::string GetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex, std::string_view tooltip);
|
||||
CustomListView* GetCustomListView(rct_window* w, WidgetIndex widgetIndex);
|
||||
int32_t GetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex, int32_t value);
|
||||
std::string GetWindowTitle(WindowBase* w);
|
||||
void UpdateWindowTitle(WindowBase* w, std::string_view value);
|
||||
void UpdateWindowTab(WindowBase* w, int32_t tabIndex);
|
||||
void UpdateWidgetText(WindowBase* w, WidgetIndex widget, std::string_view string_view);
|
||||
void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector<std::string>& items);
|
||||
void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, colour_t colour);
|
||||
void UpdateWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex, int32_t selectedIndex);
|
||||
std::vector<std::string> GetWidgetItems(WindowBase* w, WidgetIndex widgetIndex);
|
||||
colour_t GetWidgetColour(WindowBase* w, WidgetIndex widgetIndex);
|
||||
int32_t GetWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex);
|
||||
WindowBase* FindCustomWindowByClassification(std::string_view classification);
|
||||
std::optional<WidgetIndex> FindWidgetIndexByName(WindowBase* w, std::string_view name);
|
||||
std::string GetWidgetName(WindowBase* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetName(WindowBase* w, WidgetIndex widgetIndex, std::string_view name);
|
||||
std::string GetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex, std::string_view tooltip);
|
||||
CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex);
|
||||
int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex);
|
||||
void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value);
|
||||
void CloseWindowsOwnedByPlugin(std::shared_ptr<Plugin> plugin);
|
||||
} // namespace OpenRCT2::Ui::Windows
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace OpenRCT2::Scripting
|
|||
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
rct_window* WindowCustomOpen(std::shared_ptr<OpenRCT2::Scripting::Plugin> owner, DukValue dukDesc);
|
||||
WindowBase* WindowCustomOpen(std::shared_ptr<OpenRCT2::Scripting::Plugin> owner, DukValue dukDesc);
|
||||
}
|
||||
|
||||
namespace OpenRCT2::Scripting
|
||||
|
|
|
@ -242,7 +242,7 @@ namespace OpenRCT2::Scripting
|
|||
}
|
||||
|
||||
private:
|
||||
rct_window* GetWindow() const
|
||||
WindowBase* GetWindow() const
|
||||
{
|
||||
if (_class == WindowClass::MainWindow)
|
||||
return WindowGetMain();
|
||||
|
@ -250,7 +250,7 @@ namespace OpenRCT2::Scripting
|
|||
return WindowFindByNumber(_class, _number);
|
||||
}
|
||||
|
||||
rct_viewport* GetViewport() const
|
||||
Viewport* GetViewport() const
|
||||
{
|
||||
auto w = GetWindow();
|
||||
if (w != nullptr)
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace OpenRCT2::Scripting
|
|||
{
|
||||
}
|
||||
|
||||
static DukValue ToDukValue(duk_context* ctx, rct_window* w, WidgetIndex widgetIndex);
|
||||
static DukValue ToDukValue(duk_context* ctx, WindowBase* w, WidgetIndex widgetIndex);
|
||||
|
||||
private:
|
||||
std::shared_ptr<ScWindow> window_get() const;
|
||||
|
@ -401,7 +401,7 @@ namespace OpenRCT2::Scripting
|
|||
static void Register(duk_context* ctx);
|
||||
|
||||
protected:
|
||||
rct_window* GetWindow() const
|
||||
WindowBase* GetWindow() const
|
||||
{
|
||||
if (_class == WindowClass::MainWindow)
|
||||
return WindowGetMain();
|
||||
|
@ -989,7 +989,7 @@ namespace OpenRCT2::Scripting
|
|||
}
|
||||
};
|
||||
|
||||
inline DukValue ScWidget::ToDukValue(duk_context* ctx, rct_window* w, WidgetIndex widgetIndex)
|
||||
inline DukValue ScWidget::ToDukValue(duk_context* ctx, WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
const auto& widget = w->widgets[widgetIndex];
|
||||
auto c = w->classification;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace OpenRCT2::Scripting
|
|||
rct_windownumber _number;
|
||||
|
||||
public:
|
||||
ScWindow(rct_window* w)
|
||||
ScWindow(WindowBase* w)
|
||||
: ScWindow(w->classification, w->number)
|
||||
{
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ namespace OpenRCT2::Scripting
|
|||
}
|
||||
|
||||
private:
|
||||
rct_window* GetWindow() const
|
||||
WindowBase* GetWindow() const
|
||||
{
|
||||
return WindowFindByNumber(_class, _number);
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ namespace OpenRCT2::Title
|
|||
|
||||
void StoreCurrentViewLocation()
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w != nullptr && w->viewport_smart_follow_sprite.IsNull())
|
||||
{
|
||||
_previousWindowWidth = w->width;
|
||||
|
@ -406,7 +406,7 @@ namespace OpenRCT2::Title
|
|||
*/
|
||||
void RestoreViewLocationIfResized()
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w != nullptr && w->viewport_smart_follow_sprite.IsNull())
|
||||
{
|
||||
if (w->width != _previousWindowWidth || w->height != _previousWindowHeight)
|
||||
|
|
|
@ -265,7 +265,7 @@ private:
|
|||
*
|
||||
* rct2: 0x0066D2AC
|
||||
*/
|
||||
rct_window* WindowAboutOpen()
|
||||
WindowBase* WindowAboutOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<AboutWindow>(WindowClass::About, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowAssetPacksOpen()
|
||||
WindowBase* WindowAssetPacksOpen()
|
||||
{
|
||||
auto flags = WF_AUTO_POSITION | WF_CENTRE_SCREEN;
|
||||
return WindowFocusOrCreate<AssetPacksWindow>(WindowClass::AssetPacks, WW, WH, flags);
|
||||
|
|
|
@ -298,7 +298,7 @@ public:
|
|||
*
|
||||
* rct2: 0x006BA305
|
||||
*/
|
||||
rct_window* WindowBannerOpen(rct_windownumber number)
|
||||
WindowBase* WindowBannerOpen(rct_windownumber number)
|
||||
{
|
||||
auto w = static_cast<BannerWindow*>(WindowBringToFrontByNumber(WindowClass::Banner, number));
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowChangelogOpen(int personality)
|
||||
WindowBase* WindowChangelogOpen(int personality)
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::Changelog);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -1111,7 +1111,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowCheatsOpen()
|
||||
WindowBase* WindowCheatsOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::Cheats);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -197,7 +197,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowClearSceneryOpen()
|
||||
WindowBase* WindowClearSceneryOpen()
|
||||
{
|
||||
auto* w = static_cast<CleanSceneryWindow*>(WindowBringToFrontByClass(WindowClass::ClearScenery));
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* CustomCurrencyWindowOpen()
|
||||
WindowBase* CustomCurrencyWindowOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<CustomCurrencyWindow>(WindowClass::CustomCurrencyConfig, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowDebugPaintOpen()
|
||||
WindowBase* WindowDebugPaintOpen()
|
||||
{
|
||||
auto* window = WindowFocusOrCreate<DebugPaintWindow>(
|
||||
WindowClass::DebugPaint, { 16, ContextGetHeight() - 16 - 33 - WINDOW_HEIGHT }, WINDOW_WIDTH, WINDOW_HEIGHT,
|
||||
|
|
|
@ -92,9 +92,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowRideDemolishPromptOpen(const Ride& ride)
|
||||
WindowBase* WindowRideDemolishPromptOpen(const Ride& ride)
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
DemolishRidePromptWindow* newWindow;
|
||||
|
||||
w = WindowFindByClass(WindowClass::DemolishRidePrompt);
|
||||
|
|
|
@ -433,7 +433,7 @@ void WindowDropdownClose()
|
|||
* New function based on 6e914e
|
||||
* returns -1 if index is invalid
|
||||
*/
|
||||
int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w)
|
||||
int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w)
|
||||
{
|
||||
if (w->classification == WindowClass::Dropdown)
|
||||
{
|
||||
|
@ -446,7 +446,7 @@ int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, rct_window* w)
|
|||
/**
|
||||
* rct2: 0x006ED43D
|
||||
*/
|
||||
void WindowDropdownShowColour(rct_window* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour)
|
||||
void WindowDropdownShowColour(WindowBase* w, Widget* widget, uint8_t dropdownColour, uint8_t selectedColour)
|
||||
{
|
||||
int32_t defaultIndex = -1;
|
||||
// Set items
|
||||
|
|
|
@ -181,7 +181,7 @@ private:
|
|||
|
||||
bool CheckObjectSelection() const
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
auto [missingObjectType, errorString] = Editor::CheckObjectSelection();
|
||||
if (missingObjectType == ObjectType::None)
|
||||
|
@ -390,7 +390,7 @@ private:
|
|||
* Creates the main editor top toolbar window.
|
||||
* rct2: 0x0066F052 (part of 0x0066EF38)
|
||||
*/
|
||||
rct_window* WindowEditorBottomToolbarOpen()
|
||||
WindowBase* WindowEditorBottomToolbarOpen()
|
||||
{
|
||||
auto* window = WindowCreate<EditorBottomToolbarWindow>(
|
||||
WindowClass::BottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - 32), ContextGetWidth(), 32,
|
||||
|
|
|
@ -576,7 +576,7 @@ private:
|
|||
*
|
||||
* rct2: 0x00684E04
|
||||
*/
|
||||
rct_window* WindowEditorInventionsListOpen()
|
||||
WindowBase* WindowEditorInventionsListOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<InventionListWindow>(
|
||||
WindowClass::EditorInventionList, WW, WH, WF_NO_SCROLLING | WF_RESIZABLE | WF_CENTRE_SCREEN);
|
||||
|
|
|
@ -1519,7 +1519,7 @@ private:
|
|||
*
|
||||
* rct2: 0x006AA64E
|
||||
*/
|
||||
rct_window* WindowEditorObjectSelectionOpen()
|
||||
WindowBase* WindowEditorObjectSelectionOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<EditorObjectSelectionWindow>(
|
||||
WindowClass::EditorObjectSelection, 755, 400, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN);
|
||||
|
|
|
@ -121,24 +121,24 @@ static Widget *window_editor_objective_options_widgets[] = {
|
|||
|
||||
#pragma region Events
|
||||
|
||||
static void WindowEditorObjectiveOptionsMainMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowEditorObjectiveOptionsMainResize(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsMainMousedown(rct_window *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowEditorObjectiveOptionsMainDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowEditorObjectiveOptionsMainUpdate(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsMainTextinput(rct_window *w, WidgetIndex widgetIndex, char *text);
|
||||
static void WindowEditorObjectiveOptionsMainInvalidate(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsMainPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowEditorObjectiveOptionsMainMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowEditorObjectiveOptionsMainResize(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsMainMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowEditorObjectiveOptionsMainDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowEditorObjectiveOptionsMainUpdate(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsMainTextinput(WindowBase *w, WidgetIndex widgetIndex, char *text);
|
||||
static void WindowEditorObjectiveOptionsMainInvalidate(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsMainPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static void WindowEditorObjectiveOptionsRidesMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowEditorObjectiveOptionsRidesResize(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsRidesUpdate(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollgetheight(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window *w);
|
||||
static void WindowEditorObjectiveOptionsRidesPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
static void WindowEditorObjectiveOptionsRidesMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowEditorObjectiveOptionsRidesResize(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsRidesUpdate(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollgetheight(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowEditorObjectiveOptionsRidesInvalidate(WindowBase *w);
|
||||
static void WindowEditorObjectiveOptionsRidesPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
static void WindowEditorObjectiveOptionsRidesScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
|
||||
// 0x009A9DF4
|
||||
static WindowEventList window_objective_options_main_events([](auto& events)
|
||||
|
@ -188,15 +188,15 @@ static uint64_t window_editor_objective_options_page_hold_down_widgets[] = {
|
|||
|
||||
#pragma endregion
|
||||
|
||||
static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(rct_window* w);
|
||||
static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(WindowBase* w);
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0067137D
|
||||
*/
|
||||
rct_window* WindowEditorObjectiveOptionsOpen()
|
||||
WindowBase* WindowEditorObjectiveOptionsOpen()
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
w = WindowBringToFrontByClass(WindowClass::EditorObjectiveOptions);
|
||||
if (w != nullptr)
|
||||
|
@ -215,7 +215,7 @@ rct_window* WindowEditorObjectiveOptionsOpen()
|
|||
return w;
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsSetPressedTab(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsSetPressedTab(WindowBase* w)
|
||||
{
|
||||
int32_t i;
|
||||
for (i = WIDX_TAB_1; i <= WIDX_TAB_2; i++)
|
||||
|
@ -223,12 +223,12 @@ static void WindowEditorObjectiveOptionsSetPressedTab(rct_window* w)
|
|||
w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsAnchorBorderWidgets(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsAnchorBorderWidgets(WindowBase* w)
|
||||
{
|
||||
w->ResizeFrameWithPage();
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowEditorObjectiveOptionsDrawTabImages(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
Widget* widget;
|
||||
int32_t spriteIndex;
|
||||
|
@ -258,7 +258,7 @@ static void WindowEditorObjectiveOptionsDrawTabImages(rct_window* w, DrawPixelIn
|
|||
*
|
||||
* rct2: 0x00668496
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page)
|
||||
static void WindowEditorObjectiveOptionsSetPage(WindowBase* w, int32_t page)
|
||||
{
|
||||
if (w->page == page)
|
||||
return;
|
||||
|
@ -283,7 +283,7 @@ static void WindowEditorObjectiveOptionsSetPage(rct_window* w, int32_t page)
|
|||
*
|
||||
* rct2: 0x0067201D
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsSetObjective(rct_window* w, int32_t objective)
|
||||
static void WindowEditorObjectiveOptionsSetObjective(WindowBase* w, int32_t objective)
|
||||
{
|
||||
gScenarioObjective.Type = objective;
|
||||
w->Invalidate();
|
||||
|
@ -329,7 +329,7 @@ static void WindowEditorObjectiveOptionsSetObjective(rct_window* w, int32_t obje
|
|||
*
|
||||
* rct2: 0x006719CA
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowEditorObjectiveOptionsMainMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -364,12 +364,12 @@ static void WindowEditorObjectiveOptionsMainMouseup(rct_window* w, WidgetIndex w
|
|||
*
|
||||
* rct2: 0x00672254
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainResize(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsMainResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 450, 229, 450, 229);
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsShowObjectiveDropdown(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsShowObjectiveDropdown(WindowBase* w)
|
||||
{
|
||||
int32_t numItems = 0, objectiveType;
|
||||
Widget* dropdownWidget;
|
||||
|
@ -409,7 +409,7 @@ static void WindowEditorObjectiveOptionsShowObjectiveDropdown(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsShowCategoryDropdown(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsShowCategoryDropdown(WindowBase* w)
|
||||
{
|
||||
int32_t i;
|
||||
Widget* dropdownWidget;
|
||||
|
@ -427,7 +427,7 @@ static void WindowEditorObjectiveOptionsShowCategoryDropdown(rct_window* w)
|
|||
Dropdown::SetChecked(gScenarioCategory, true);
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsArg1Increase(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsArg1Increase(WindowBase* w)
|
||||
{
|
||||
switch (gScenarioObjective.Type)
|
||||
{
|
||||
|
@ -491,7 +491,7 @@ static void WindowEditorObjectiveOptionsArg1Increase(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsArg1Decrease(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsArg1Decrease(WindowBase* w)
|
||||
{
|
||||
switch (gScenarioObjective.Type)
|
||||
{
|
||||
|
@ -555,7 +555,7 @@ static void WindowEditorObjectiveOptionsArg1Decrease(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsArg2Increase(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsArg2Increase(WindowBase* w)
|
||||
{
|
||||
if (gScenarioObjective.Year >= 25)
|
||||
{
|
||||
|
@ -568,7 +568,7 @@ static void WindowEditorObjectiveOptionsArg2Increase(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowEditorObjectiveOptionsArg2Decrease(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsArg2Decrease(WindowBase* w)
|
||||
{
|
||||
if (gScenarioObjective.Year <= 1)
|
||||
{
|
||||
|
@ -585,7 +585,7 @@ static void WindowEditorObjectiveOptionsArg2Decrease(rct_window* w)
|
|||
*
|
||||
* rct2: 0x00671A0D
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowEditorObjectiveOptionsMainMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -614,7 +614,7 @@ static void WindowEditorObjectiveOptionsMainMousedown(rct_window* w, WidgetIndex
|
|||
*
|
||||
* rct2: 0x00671A54
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowEditorObjectiveOptionsMainDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
uint8_t newObjectiveType;
|
||||
|
||||
|
@ -643,7 +643,7 @@ static void WindowEditorObjectiveOptionsMainDropdown(rct_window* w, WidgetIndex
|
|||
*
|
||||
* rct2: 0x006721E7
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainUpdate(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsMainUpdate(WindowBase* w)
|
||||
{
|
||||
uint32_t parkFlags;
|
||||
uint8_t objectiveType;
|
||||
|
@ -670,7 +670,7 @@ static void WindowEditorObjectiveOptionsMainUpdate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x00671A73
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainTextinput(rct_window* w, WidgetIndex widgetIndex, char* text)
|
||||
static void WindowEditorObjectiveOptionsMainTextinput(WindowBase* w, WidgetIndex widgetIndex, char* text)
|
||||
{
|
||||
if (text == nullptr)
|
||||
return;
|
||||
|
@ -704,7 +704,7 @@ static void WindowEditorObjectiveOptionsMainTextinput(rct_window* w, WidgetIndex
|
|||
*
|
||||
* rct2: 0x0067161C
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainInvalidate(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsMainInvalidate(WindowBase* w)
|
||||
{
|
||||
auto widgets = window_editor_objective_options_widgets[w->page];
|
||||
if (w->widgets != widgets)
|
||||
|
@ -760,7 +760,7 @@ static void WindowEditorObjectiveOptionsMainInvalidate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x0067161C
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowEditorObjectiveOptionsMainPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
int32_t width;
|
||||
StringId stringId;
|
||||
|
@ -906,7 +906,7 @@ static void WindowEditorObjectiveOptionsMainPaint(rct_window* w, DrawPixelInfo*
|
|||
*
|
||||
* rct2: 0x006724A4
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowEditorObjectiveOptionsRidesMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -924,7 +924,7 @@ static void WindowEditorObjectiveOptionsRidesMouseup(rct_window* w, WidgetIndex
|
|||
*
|
||||
* rct2: 0x006725A8
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesResize(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsRidesResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 380, 224, 380, 224);
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ static void WindowEditorObjectiveOptionsRidesResize(rct_window* w)
|
|||
*
|
||||
* rct2: 0x00672544
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesUpdate(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsRidesUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WindowEventInvalidateCall(w);
|
||||
|
@ -962,7 +962,7 @@ static void WindowEditorObjectiveOptionsRidesUpdate(rct_window* w)
|
|||
* rct2: 0x006724BF
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesScrollgetheight(
|
||||
rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
*height = w->no_list_items * 12;
|
||||
}
|
||||
|
@ -972,7 +972,7 @@ static void WindowEditorObjectiveOptionsRidesScrollgetheight(
|
|||
* rct2: 0x006724FC
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmousedown(
|
||||
rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
auto i = screenCoords.y / 12;
|
||||
if (i < 0 || i >= w->no_list_items)
|
||||
|
@ -992,7 +992,7 @@ static void WindowEditorObjectiveOptionsRidesScrollmousedown(
|
|||
* rct2: 0x006724CC
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesScrollmouseover(
|
||||
rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -1011,7 +1011,7 @@ static void WindowEditorObjectiveOptionsRidesScrollmouseover(
|
|||
*
|
||||
* rct2: 0x006722B5
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsRidesInvalidate(WindowBase* w)
|
||||
{
|
||||
Widget* widgets;
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ static void WindowEditorObjectiveOptionsRidesInvalidate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x00672340
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowEditorObjectiveOptionsRidesPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowEditorObjectiveOptionsDrawTabImages(w, dpi);
|
||||
|
@ -1048,7 +1048,7 @@ static void WindowEditorObjectiveOptionsRidesPaint(rct_window* w, DrawPixelInfo*
|
|||
*
|
||||
* rct2: 0x0067236F
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
static void WindowEditorObjectiveOptionsRidesScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
int32_t colour = ColourMapA[w->colours[1]].mid_light;
|
||||
GfxFillRect(dpi, { { dpi->x, dpi->y }, { dpi->x + dpi->width - 1, dpi->y + dpi->height - 1 } }, colour);
|
||||
|
@ -1097,7 +1097,7 @@ static void WindowEditorObjectiveOptionsRidesScrollpaint(rct_window* w, DrawPixe
|
|||
*
|
||||
* rct2: 0x00672609
|
||||
*/
|
||||
static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(rct_window* w)
|
||||
static void WindowEditorObjectiveOptionsUpdateDisabledWidgets(WindowBase* w)
|
||||
{
|
||||
// Check if there are any rides (not shops or facilities)
|
||||
const auto& rideManager = GetRideManager();
|
||||
|
|
|
@ -1236,7 +1236,7 @@ private:
|
|||
#pragma endregion
|
||||
};
|
||||
|
||||
rct_window* WindowEditorScenarioOptionsOpen()
|
||||
WindowBase* WindowEditorScenarioOptionsOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<EditorScenarioOptionsWindow>(WindowClass::EditorScenarioOptions, 280, 148, WF_NO_SCROLLING);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
WindowBase* WindowErrorOpen(std::string_view title, std::string_view message)
|
||||
{
|
||||
WindowCloseByClass(WindowClass::Error);
|
||||
|
||||
|
@ -161,7 +161,7 @@ rct_window* WindowErrorOpen(std::string_view title, std::string_view message)
|
|||
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE);
|
||||
}
|
||||
|
||||
rct_window* WindowErrorOpen(StringId title, StringId message, const Formatter& args)
|
||||
WindowBase* WindowErrorOpen(StringId title, StringId message, const Formatter& args)
|
||||
{
|
||||
auto titlez = FormatStringID(title, args.Data());
|
||||
auto messagez = FormatStringID(message, args.Data());
|
||||
|
|
|
@ -1037,17 +1037,17 @@ static FinancesWindow* FinancesWindowOpen(uint8_t page)
|
|||
return window;
|
||||
}
|
||||
|
||||
rct_window* WindowFinancesOpen()
|
||||
WindowBase* WindowFinancesOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<FinancesWindow>(WindowClass::Finances, WW_OTHER_TABS, WH_SUMMARY, WF_10);
|
||||
}
|
||||
|
||||
rct_window* WindowFinancesResearchOpen()
|
||||
WindowBase* WindowFinancesResearchOpen()
|
||||
{
|
||||
return FinancesWindowOpen(WINDOW_FINANCES_PAGE_RESEARCH);
|
||||
}
|
||||
|
||||
rct_window* WindowFinancesMarketingOpen()
|
||||
WindowBase* WindowFinancesMarketingOpen()
|
||||
{
|
||||
return FinancesWindowOpen(WINDOW_FINANCES_PAGE_MARKETING);
|
||||
}
|
||||
|
|
|
@ -1406,7 +1406,7 @@ public:
|
|||
*
|
||||
* rct2: 0x006A7C43
|
||||
*/
|
||||
rct_window* WindowFootpathOpen()
|
||||
WindowBase* WindowFootpathOpen()
|
||||
{
|
||||
if (!FootpathSelectDefault())
|
||||
{
|
||||
|
@ -1424,7 +1424,7 @@ void WindowFootpathResetSelectedPath()
|
|||
|
||||
void WindowFootpathKeyboardShortcutTurnLeft()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
@ -1437,7 +1437,7 @@ void WindowFootpathKeyboardShortcutTurnLeft()
|
|||
|
||||
void WindowFootpathKeyboardShortcutTurnRight()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
@ -1450,7 +1450,7 @@ void WindowFootpathKeyboardShortcutTurnRight()
|
|||
|
||||
void WindowFootpathKeyboardShortcutSlopeDown()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
@ -1463,7 +1463,7 @@ void WindowFootpathKeyboardShortcutSlopeDown()
|
|||
|
||||
void WindowFootpathKeyboardShortcutSlopeUp()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
@ -1476,7 +1476,7 @@ void WindowFootpathKeyboardShortcutSlopeUp()
|
|||
|
||||
void WindowFootpathKeyboardShortcutDemolishCurrent()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
@ -1489,7 +1489,7 @@ void WindowFootpathKeyboardShortcutDemolishCurrent()
|
|||
|
||||
void WindowFootpathKeyboardShortcutBuildCurrent()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Footpath);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Footpath);
|
||||
if (w != nullptr)
|
||||
{
|
||||
auto* footpathWindow = static_cast<FootpathWindow*>(w);
|
||||
|
|
|
@ -69,19 +69,19 @@ static Widget window_game_bottom_toolbar_widgets[] =
|
|||
|
||||
uint8_t gToolbarDirtyFlags;
|
||||
|
||||
static void WindowGameBottomToolbarMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback);
|
||||
static void WindowGameBottomToolbarInvalidate(rct_window *w);
|
||||
static void WindowGameBottomToolbarPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowGameBottomToolbarUpdate(rct_window* w);
|
||||
static void WindowGameBottomToolbarCursor(rct_window *w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID *cursorId);
|
||||
static void WindowGameBottomToolbarUnknown05(rct_window *w);
|
||||
static void WindowGameBottomToolbarMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static OpenRCT2String WindowGameBottomToolbarTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback);
|
||||
static void WindowGameBottomToolbarInvalidate(WindowBase *w);
|
||||
static void WindowGameBottomToolbarPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
static void WindowGameBottomToolbarUpdate(WindowBase* w);
|
||||
static void WindowGameBottomToolbarCursor(WindowBase *w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID *cursorId);
|
||||
static void WindowGameBottomToolbarUnknown05(WindowBase *w);
|
||||
|
||||
static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo *dpi, rct_window *w);
|
||||
static void WindowGameBottomToolbarDrawParkRating(DrawPixelInfo *dpi, rct_window *w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor);
|
||||
static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo *dpi, rct_window *w);
|
||||
static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo *dpi, rct_window *w);
|
||||
static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo *dpi, rct_window *w);
|
||||
static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo *dpi, WindowBase *w);
|
||||
static void WindowGameBottomToolbarDrawParkRating(DrawPixelInfo *dpi, WindowBase *w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor);
|
||||
static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo *dpi, WindowBase *w);
|
||||
static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo *dpi, WindowBase *w);
|
||||
static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo *dpi, WindowBase *w);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -99,13 +99,13 @@ static WindowEventList window_game_bottom_toolbar_events([](auto& events)
|
|||
});
|
||||
// clang-format on
|
||||
|
||||
static void WindowGameBottomToolbarInvalidateDirtyWidgets(rct_window* w);
|
||||
static void WindowGameBottomToolbarInvalidateDirtyWidgets(WindowBase* w);
|
||||
|
||||
/**
|
||||
* Creates the main game bottom toolbar window.
|
||||
* rct2: 0x0066B52F (part of 0x0066B3E8)
|
||||
*/
|
||||
rct_window* WindowGameBottomToolbarOpen()
|
||||
WindowBase* WindowGameBottomToolbarOpen()
|
||||
{
|
||||
int32_t screenWidth = ContextGetWidth();
|
||||
int32_t screenHeight = ContextGetHeight();
|
||||
|
@ -114,7 +114,7 @@ rct_window* WindowGameBottomToolbarOpen()
|
|||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
uint32_t toolbar_height = line_height * 2 + 12;
|
||||
|
||||
rct_window* window = WindowCreate(
|
||||
WindowBase* window = WindowCreate(
|
||||
ScreenCoordsXY(0, screenHeight - toolbar_height), screenWidth, toolbar_height, &window_game_bottom_toolbar_events,
|
||||
WindowClass::BottomToolbar, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND);
|
||||
window->widgets = window_game_bottom_toolbar_widgets;
|
||||
|
@ -133,7 +133,7 @@ rct_window* WindowGameBottomToolbarOpen()
|
|||
*
|
||||
* rct2: 0x0066C588
|
||||
*/
|
||||
static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowGameBottomToolbarMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
News::Item* newsItem;
|
||||
|
||||
|
@ -176,7 +176,7 @@ static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetInde
|
|||
if (!subjectLoc.has_value())
|
||||
break;
|
||||
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
WindowScrollToLocation(*mainWindow, subjectLoc.value());
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ static void WindowGameBottomToolbarMouseup(rct_window* w, WidgetIndex widgetInde
|
|||
}
|
||||
}
|
||||
|
||||
static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback)
|
||||
static OpenRCT2String WindowGameBottomToolbarTooltip(WindowBase* w, const WidgetIndex widgetIndex, const StringId fallback)
|
||||
{
|
||||
int32_t month, day;
|
||||
auto ft = Formatter();
|
||||
|
@ -217,7 +217,7 @@ static OpenRCT2String WindowGameBottomToolbarTooltip(rct_window* w, const Widget
|
|||
*
|
||||
* rct2: 0x0066BBA0
|
||||
*/
|
||||
static void WindowGameBottomToolbarInvalidate(rct_window* w)
|
||||
static void WindowGameBottomToolbarInvalidate(WindowBase* w)
|
||||
{
|
||||
// Figure out how much line height we have to work with.
|
||||
uint32_t line_height = FontGetLineHeight(FontStyle::Medium);
|
||||
|
@ -346,7 +346,7 @@ void WindowGameBottomToolbarInvalidateNewsItem()
|
|||
*
|
||||
* rct2: 0x0066BC87
|
||||
*/
|
||||
static void WindowGameBottomToolbarPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowGameBottomToolbarPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
auto leftWidget = window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET];
|
||||
auto rightWidget = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET];
|
||||
|
@ -384,7 +384,7 @@ static void WindowGameBottomToolbarPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
const auto topLeft = w->windowPos
|
||||
+ ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].left + 1,
|
||||
|
@ -458,7 +458,7 @@ static void WindowGameBottomToolbarDrawLeftPanel(DrawPixelInfo* dpi, rct_window*
|
|||
* rct2: 0x0066C76C
|
||||
*/
|
||||
static void WindowGameBottomToolbarDrawParkRating(
|
||||
DrawPixelInfo* dpi, rct_window* w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor)
|
||||
DrawPixelInfo* dpi, WindowBase* w, int32_t colour, const ScreenCoordsXY& coords, uint8_t factor)
|
||||
{
|
||||
int16_t bar_width;
|
||||
|
||||
|
@ -478,7 +478,7 @@ static void WindowGameBottomToolbarDrawParkRating(
|
|||
GfxDrawSprite(dpi, ImageId(SPR_RATING_HIGH), coords + ScreenCoordsXY{ 114, 0 });
|
||||
}
|
||||
|
||||
static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
const auto topLeft = w->windowPos
|
||||
+ ScreenCoordsXY{ window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + 1,
|
||||
|
@ -550,7 +550,7 @@ static void WindowGameBottomToolbarDrawRightPanel(DrawPixelInfo* dpi, rct_window
|
|||
*
|
||||
* rct2: 0x0066BFA5
|
||||
*/
|
||||
static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
int32_t width;
|
||||
News::Item* newsItem;
|
||||
|
@ -651,7 +651,7 @@ static void WindowGameBottomToolbarDrawNewsItem(DrawPixelInfo* dpi, rct_window*
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
Widget* middleOutsetWidget = &window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET];
|
||||
|
||||
|
@ -688,7 +688,7 @@ static void WindowGameBottomToolbarDrawMiddlePanel(DrawPixelInfo* dpi, rct_windo
|
|||
*
|
||||
* rct2: 0x0066C6D8
|
||||
*/
|
||||
static void WindowGameBottomToolbarUpdate(rct_window* w)
|
||||
static void WindowGameBottomToolbarUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
if (w->frame_no >= 24)
|
||||
|
@ -702,7 +702,7 @@ static void WindowGameBottomToolbarUpdate(rct_window* w)
|
|||
* rct2: 0x0066C644
|
||||
*/
|
||||
static void WindowGameBottomToolbarCursor(
|
||||
rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID* cursorId)
|
||||
WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords, CursorID* cursorId)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -719,7 +719,7 @@ static void WindowGameBottomToolbarCursor(
|
|||
*
|
||||
* rct2: 0x0066C6F2
|
||||
*/
|
||||
static void WindowGameBottomToolbarUnknown05(rct_window* w)
|
||||
static void WindowGameBottomToolbarUnknown05(WindowBase* w)
|
||||
{
|
||||
WindowGameBottomToolbarInvalidateDirtyWidgets(w);
|
||||
}
|
||||
|
@ -728,7 +728,7 @@ static void WindowGameBottomToolbarUnknown05(rct_window* w)
|
|||
*
|
||||
* rct2: 0x0066C6F2
|
||||
*/
|
||||
static void WindowGameBottomToolbarInvalidateDirtyWidgets(rct_window* w)
|
||||
static void WindowGameBottomToolbarInvalidateDirtyWidgets(WindowBase* w)
|
||||
{
|
||||
if (gToolbarDirtyFlags & BTM_TB_DIRTY_FLAG_MONEY)
|
||||
{
|
||||
|
|
|
@ -625,7 +625,7 @@ private:
|
|||
pickupAction.SetCallback([peepnum = number](const GameAction* ga, const GameActions::Result* result) {
|
||||
if (result->Error != GameActions::Status::Ok)
|
||||
return;
|
||||
rct_window* wind = WindowFindByNumber(WindowClass::Peep, peepnum);
|
||||
WindowBase* wind = WindowFindByNumber(WindowClass::Peep, peepnum);
|
||||
if (wind != nullptr)
|
||||
{
|
||||
ToolSet(*wind, WC_PEEP__WIDX_PICKUP, Tool::Picker);
|
||||
|
@ -692,7 +692,7 @@ private:
|
|||
|
||||
void GuestFollow()
|
||||
{
|
||||
rct_window* main = WindowGetMain();
|
||||
WindowBase* main = WindowGetMain();
|
||||
WindowFollowSprite(*main, EntityId::FromUnderlying(number));
|
||||
}
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ private:
|
|||
* rct2: 0x006989E9
|
||||
*
|
||||
*/
|
||||
rct_window* WindowGuestOpen(Peep* peep)
|
||||
WindowBase* WindowGuestOpen(Peep* peep)
|
||||
{
|
||||
if (peep == nullptr)
|
||||
{
|
||||
|
|
|
@ -955,7 +955,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowGuestListOpen()
|
||||
WindowBase* WindowGuestListOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::GuestList);
|
||||
if (window == nullptr)
|
||||
|
@ -968,7 +968,7 @@ rct_window* WindowGuestListOpen()
|
|||
/**
|
||||
* @param index The number of the ride or index of the thought
|
||||
*/
|
||||
rct_window* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index)
|
||||
WindowBase* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index)
|
||||
{
|
||||
auto* w = static_cast<GuestListWindow*>(WindowGuestListOpen());
|
||||
if (w != nullptr)
|
||||
|
|
|
@ -401,7 +401,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowInstallTrackOpen(const utf8* path)
|
||||
WindowBase* WindowInstallTrackOpen(const utf8* path)
|
||||
{
|
||||
auto trackDesign = TrackDesignImport(path);
|
||||
if (trackDesign == nullptr)
|
||||
|
|
|
@ -338,7 +338,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowLandOpen()
|
||||
WindowBase* WindowLandOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<LandWindow>(WindowClass::Land, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0);
|
||||
}
|
||||
|
|
|
@ -399,7 +399,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowLandRightsOpen()
|
||||
WindowBase* WindowLandRightsOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<LandRightsWindow>(
|
||||
WindowClass::LandRights, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0);
|
||||
|
|
|
@ -82,7 +82,7 @@ static Widget window_loadsave_widgets[] =
|
|||
|
||||
#pragma endregion
|
||||
|
||||
static rct_window* WindowOverwritePromptOpen(const char* name, const char* path);
|
||||
static WindowBase* WindowOverwritePromptOpen(const char* name, const char* path);
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -1031,7 +1031,7 @@ public:
|
|||
#pragma endregion
|
||||
};
|
||||
|
||||
rct_window* WindowLoadsaveOpen(
|
||||
WindowBase* WindowLoadsaveOpen(
|
||||
int32_t type, std::string_view defaultPath, std::function<void(int32_t result, std::string_view)> callback,
|
||||
TrackDesign* trackDesign)
|
||||
{
|
||||
|
@ -1117,8 +1117,8 @@ static Widget window_overwrite_prompt_widgets[] = {
|
|||
WIDGETS_END,
|
||||
};
|
||||
|
||||
static void WindowOverwritePromptMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowOverwritePromptPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowOverwritePromptMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowOverwritePromptPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static WindowEventList window_overwrite_prompt_events([](auto& events) {
|
||||
events.mouse_up = &WindowOverwritePromptMouseup;
|
||||
|
@ -1128,9 +1128,9 @@ static WindowEventList window_overwrite_prompt_events([](auto& events) {
|
|||
static char _window_overwrite_prompt_name[256];
|
||||
static char _window_overwrite_prompt_path[MAX_PATH];
|
||||
|
||||
static rct_window* WindowOverwritePromptOpen(const char* name, const char* path)
|
||||
static WindowBase* WindowOverwritePromptOpen(const char* name, const char* path)
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
WindowCloseByClass(WindowClass::LoadsaveOverwritePrompt);
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ static rct_window* WindowOverwritePromptOpen(const char* name, const char* path)
|
|||
return w;
|
||||
}
|
||||
|
||||
static void WindowOverwritePromptMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowOverwritePromptMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -1170,7 +1170,7 @@ static void WindowOverwritePromptMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowOverwritePromptPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowOverwritePromptPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
* Creates the main window that holds the main viewport.
|
||||
* rct2: 0x0066B3E8
|
||||
*/
|
||||
rct_window* WindowMainOpen()
|
||||
WindowBase* WindowMainOpen()
|
||||
{
|
||||
return WindowCreate<MainWindow>(WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK);
|
||||
}
|
||||
|
|
|
@ -650,7 +650,7 @@ public:
|
|||
auto mapCoords = CoordsXY{ std::clamp(c.x, 0, MAXIMUM_MAP_SIZE_BIG - 1), std::clamp(c.y, 0, MAXIMUM_MAP_SIZE_BIG - 1) };
|
||||
auto mapZ = TileElementHeight(mapCoords);
|
||||
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
WindowScrollToLocation(*mainWindow, { mapCoords, mapZ });
|
||||
|
@ -928,7 +928,7 @@ private:
|
|||
|
||||
void CentreMapOnViewPoint()
|
||||
{
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
int16_t ax, bx, cx, dx;
|
||||
int16_t bp, di;
|
||||
|
||||
|
@ -1243,11 +1243,11 @@ private:
|
|||
*/
|
||||
void PaintHudRectangle(DrawPixelInfo* dpi)
|
||||
{
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow == nullptr)
|
||||
return;
|
||||
|
||||
rct_viewport* mainViewport = mainWindow->viewport;
|
||||
Viewport* mainViewport = mainWindow->viewport;
|
||||
if (mainViewport == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -1441,11 +1441,11 @@ private:
|
|||
};
|
||||
};
|
||||
|
||||
rct_window* WindowMapOpen()
|
||||
WindowBase* WindowMapOpen()
|
||||
{
|
||||
try
|
||||
{
|
||||
rct_window* w = WindowFocusOrCreate<MapWindow>(WindowClass::Map, 245, 259, WF_10);
|
||||
WindowBase* w = WindowFocusOrCreate<MapWindow>(WindowClass::Map, 245, 259, WF_10);
|
||||
w->selected_tab = 0;
|
||||
w->list_information_type = 0;
|
||||
return w;
|
||||
|
@ -1458,7 +1458,7 @@ rct_window* WindowMapOpen()
|
|||
|
||||
void WindowMapReset()
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
// Check if window is even opened
|
||||
w = WindowBringToFrontByClass(WindowClass::Map);
|
||||
|
|
|
@ -197,34 +197,34 @@ static Widget* PageWidgets[WINDOW_MAPGEN_PAGE_COUNT] = {
|
|||
|
||||
#pragma region Events
|
||||
|
||||
static void WindowMapgenSharedClose(rct_window* w);
|
||||
static void WindowMapgenSharedMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenSharedClose(WindowBase* w);
|
||||
static void WindowMapgenSharedMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
|
||||
static void WindowMapgenBaseMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenBaseMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenBaseDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMapgenBaseUpdate(rct_window* w);
|
||||
static void WindowMapgenTextinput(rct_window* w, WidgetIndex widgetIndex, char* text);
|
||||
static void WindowMapgenBaseInvalidate(rct_window* w);
|
||||
static void WindowMapgenBasePaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowMapgenBaseMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenBaseMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenBaseDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMapgenBaseUpdate(WindowBase* w);
|
||||
static void WindowMapgenTextinput(WindowBase* w, WidgetIndex widgetIndex, char* text);
|
||||
static void WindowMapgenBaseInvalidate(WindowBase* w);
|
||||
static void WindowMapgenBasePaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static void WindowMapgenRandomMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenRandomMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenRandomUpdate(rct_window* w);
|
||||
static void WindowMapgenRandomInvalidate(rct_window* w);
|
||||
static void WindowMapgenRandomPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowMapgenRandomMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenRandomMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenRandomUpdate(WindowBase* w);
|
||||
static void WindowMapgenRandomInvalidate(WindowBase* w);
|
||||
static void WindowMapgenRandomPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static void WindowMapgenSimplexMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenSimplexMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenSimplexDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMapgenSimplexUpdate(rct_window* w);
|
||||
static void WindowMapgenSimplexInvalidate(rct_window* w);
|
||||
static void WindowMapgenSimplexPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowMapgenSimplexMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenSimplexMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenSimplexDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMapgenSimplexUpdate(WindowBase* w);
|
||||
static void WindowMapgenSimplexInvalidate(WindowBase* w);
|
||||
static void WindowMapgenSimplexPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static void WindowMapgenHeightmapMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenHeightmapMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenHeightmapInvalidate(rct_window* w);
|
||||
static void WindowMapgenHeightmapPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowMapgenHeightmapMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowMapgenHeightmapMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMapgenHeightmapInvalidate(WindowBase* w);
|
||||
static void WindowMapgenHeightmapPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static WindowEventList BaseEvents([](auto& events) {
|
||||
events.close = &WindowMapgenSharedClose;
|
||||
|
@ -374,9 +374,9 @@ constexpr int32_t WATERLEVEL_MIN = 0;
|
|||
constexpr int32_t WATERLEVEL_MAX = 54;
|
||||
constexpr int32_t MAX_SMOOTH_ITERATIONS = 20;
|
||||
|
||||
static void WindowMapgenSetPage(rct_window* w, int32_t page);
|
||||
static void WindowMapgenSetPressedTab(rct_window* w);
|
||||
static void WindowMapgenDrawTabImages(DrawPixelInfo* dpi, rct_window* w);
|
||||
static void WindowMapgenSetPage(WindowBase* w, int32_t page);
|
||||
static void WindowMapgenSetPressedTab(WindowBase* w);
|
||||
static void WindowMapgenDrawTabImages(DrawPixelInfo* dpi, WindowBase* w);
|
||||
|
||||
enum class ResizeDirection
|
||||
{
|
||||
|
@ -419,9 +419,9 @@ static void WindowMapgenChangeMapSize(int32_t sizeOffset)
|
|||
_mapSize.x = std::clamp(_mapSize.x + sizeOffset, MINIMUM_MAP_SIZE_TECHNICAL, MAXIMUM_MAP_SIZE_TECHNICAL);
|
||||
}
|
||||
|
||||
rct_window* WindowMapgenOpen()
|
||||
WindowBase* WindowMapgenOpen()
|
||||
{
|
||||
rct_window* w = WindowBringToFrontByClass(WindowClass::Mapgen);
|
||||
WindowBase* w = WindowBringToFrontByClass(WindowClass::Mapgen);
|
||||
if (w != nullptr)
|
||||
{
|
||||
return w;
|
||||
|
@ -445,12 +445,12 @@ rct_window* WindowMapgenOpen()
|
|||
return w;
|
||||
}
|
||||
|
||||
static void WindowMapgenSharedClose(rct_window* w)
|
||||
static void WindowMapgenSharedClose(WindowBase* w)
|
||||
{
|
||||
MapGenUnloadHeightmap();
|
||||
}
|
||||
|
||||
static void WindowMapgenSharedMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMapgenSharedMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ static void WindowMapgenSharedMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenInputMapSize(rct_window* w, WidgetIndex callingWidget, int32_t currentValue)
|
||||
static void WindowMapgenInputMapSize(WindowBase* w, WidgetIndex callingWidget, int32_t currentValue)
|
||||
{
|
||||
Formatter ft;
|
||||
ft.Add<int16_t>(MINIMUM_MAP_SIZE_PRACTICAL);
|
||||
|
@ -479,7 +479,7 @@ static void WindowMapgenInputMapSize(rct_window* w, WidgetIndex callingWidget, i
|
|||
|
||||
#pragma region Base page
|
||||
|
||||
static void WindowMapgenBaseMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMapgenBaseMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowMapgenSharedMouseup(w, widgetIndex);
|
||||
|
||||
|
@ -523,7 +523,7 @@ static void WindowMapgenBaseMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenBaseMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowMapgenBaseMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -572,7 +572,7 @@ static void WindowMapgenBaseMousedown(rct_window* w, WidgetIndex widgetIndex, Wi
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenBaseDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowMapgenBaseDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
int32_t type;
|
||||
|
||||
|
@ -615,7 +615,7 @@ static void WindowMapgenBaseDropdown(rct_window* w, WidgetIndex widgetIndex, int
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenBaseUpdate(rct_window* w)
|
||||
static void WindowMapgenBaseUpdate(WindowBase* w)
|
||||
{
|
||||
// Tab animation
|
||||
if (++w->frame_no >= TabAnimationLoops[w->page])
|
||||
|
@ -623,7 +623,7 @@ static void WindowMapgenBaseUpdate(rct_window* w)
|
|||
WidgetInvalidate(*w, WIDX_TAB_1);
|
||||
}
|
||||
|
||||
static void WindowMapgenTextinput(rct_window* w, WidgetIndex widgetIndex, char* text)
|
||||
static void WindowMapgenTextinput(WindowBase* w, WidgetIndex widgetIndex, char* text)
|
||||
{
|
||||
int32_t value;
|
||||
char* end;
|
||||
|
@ -662,7 +662,7 @@ static void WindowMapgenTextinput(rct_window* w, WidgetIndex widgetIndex, char*
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMapgenBaseInvalidate(rct_window* w)
|
||||
static void WindowMapgenBaseInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_BASE])
|
||||
{
|
||||
|
@ -682,7 +682,7 @@ static void WindowMapgenBaseInvalidate(rct_window* w)
|
|||
ft.Add<uint16_t>(_mapSize.x - 2);
|
||||
}
|
||||
|
||||
static void WindowMapgenDrawDropdownButton(rct_window* w, DrawPixelInfo* dpi, WidgetIndex widgetIndex, ImageId image)
|
||||
static void WindowMapgenDrawDropdownButton(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex widgetIndex, ImageId image)
|
||||
{
|
||||
const auto& widget = w->widgets[widgetIndex];
|
||||
ScreenCoordsXY pos = { w->windowPos.x + widget.left, w->windowPos.y + widget.top };
|
||||
|
@ -705,7 +705,7 @@ static void WindowMapgenDrawDropdownButton(rct_window* w, DrawPixelInfo* dpi, Wi
|
|||
}
|
||||
|
||||
static void WindowMapgenDrawDropdownButtons(
|
||||
rct_window* w, DrawPixelInfo* dpi, WidgetIndex floorWidgetIndex, WidgetIndex edgeWidgetIndex)
|
||||
WindowBase* w, DrawPixelInfo* dpi, WidgetIndex floorWidgetIndex, WidgetIndex edgeWidgetIndex)
|
||||
{
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
const auto surfaceObj = static_cast<TerrainSurfaceObject*>(
|
||||
|
@ -731,7 +731,7 @@ static void WindowMapgenDrawDropdownButtons(
|
|||
WindowMapgenDrawDropdownButton(w, dpi, edgeWidgetIndex, edgeImage);
|
||||
}
|
||||
|
||||
static void WindowMapgenBasePaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMapgenBasePaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMapgenDrawTabImages(dpi, w);
|
||||
|
@ -767,7 +767,7 @@ static void WindowMapgenBasePaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
|
||||
#pragma region Random page
|
||||
|
||||
static void WindowMapgenRandomMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMapgenRandomMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowMapgenSharedMouseup(w, widgetIndex);
|
||||
|
||||
|
@ -800,11 +800,11 @@ static void WindowMapgenRandomMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenRandomMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowMapgenRandomMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
}
|
||||
|
||||
static void WindowMapgenRandomUpdate(rct_window* w)
|
||||
static void WindowMapgenRandomUpdate(WindowBase* w)
|
||||
{
|
||||
// Tab animation
|
||||
if (++w->frame_no >= TabAnimationLoops[w->page])
|
||||
|
@ -812,7 +812,7 @@ static void WindowMapgenRandomUpdate(rct_window* w)
|
|||
WidgetInvalidate(*w, WIDX_TAB_2);
|
||||
}
|
||||
|
||||
static void WindowMapgenRandomInvalidate(rct_window* w)
|
||||
static void WindowMapgenRandomInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_RANDOM])
|
||||
{
|
||||
|
@ -829,7 +829,7 @@ static void WindowMapgenRandomInvalidate(rct_window* w)
|
|||
WindowMapgenSetPressedTab(w);
|
||||
}
|
||||
|
||||
static void WindowMapgenRandomPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMapgenRandomPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMapgenDrawTabImages(dpi, w);
|
||||
|
@ -839,7 +839,7 @@ static void WindowMapgenRandomPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
|
||||
#pragma region Simplex page
|
||||
|
||||
static void WindowMapgenSimplexMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMapgenSimplexMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowMapgenSharedMouseup(w, widgetIndex);
|
||||
|
||||
|
@ -878,7 +878,7 @@ static void WindowMapgenSimplexMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenSimplexMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowMapgenSimplexMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -959,7 +959,7 @@ static void WindowMapgenSimplexMousedown(rct_window* w, WidgetIndex widgetIndex,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenSimplexDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowMapgenSimplexDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
int32_t type;
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ static void WindowMapgenSimplexDropdown(rct_window* w, WidgetIndex widgetIndex,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenSimplexUpdate(rct_window* w)
|
||||
static void WindowMapgenSimplexUpdate(WindowBase* w)
|
||||
{
|
||||
// Tab animation
|
||||
if (++w->frame_no >= TabAnimationLoops[w->page])
|
||||
|
@ -1010,7 +1010,7 @@ static void WindowMapgenSimplexUpdate(rct_window* w)
|
|||
WidgetInvalidate(*w, WIDX_TAB_3);
|
||||
}
|
||||
|
||||
static void WindowMapgenSimplexInvalidate(rct_window* w)
|
||||
static void WindowMapgenSimplexInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_SIMPLEX])
|
||||
{
|
||||
|
@ -1045,7 +1045,7 @@ static void WindowMapgenSimplexInvalidate(rct_window* w)
|
|||
ft.Add<uint16_t>(_mapSize.x - 2);
|
||||
}
|
||||
|
||||
static void WindowMapgenSimplexPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMapgenSimplexPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMapgenDrawTabImages(dpi, w);
|
||||
|
@ -1114,7 +1114,7 @@ static void WindowMapgenSimplexPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
|
||||
#pragma region Heightmap page
|
||||
|
||||
static void WindowMapgenHeightmapMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowMapgenHeightmapMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -1180,7 +1180,7 @@ static void WindowMapgenHeightmapLoadsaveCallback(int32_t result, const utf8* pa
|
|||
}
|
||||
|
||||
// The window needs to be open while using the map
|
||||
rct_window* const w = ContextOpenWindow(WindowClass::Mapgen);
|
||||
WindowBase* const w = ContextOpenWindow(WindowClass::Mapgen);
|
||||
_heightmapLoaded = true;
|
||||
WindowMapgenSetPage(w, WINDOW_MAPGEN_PAGE_HEIGHTMAP);
|
||||
|
||||
|
@ -1188,7 +1188,7 @@ static void WindowMapgenHeightmapLoadsaveCallback(int32_t result, const utf8* pa
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenHeightmapMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMapgenHeightmapMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
WindowMapgenSharedMouseup(w, widgetIndex);
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ static void WindowMapgenHeightmapMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
WindowMapgenHeightmapGenerateMap();
|
||||
}
|
||||
|
||||
static void WindowMapgenHeightmapInvalidate(rct_window* w)
|
||||
static void WindowMapgenHeightmapInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != PageWidgets[WINDOW_MAPGEN_PAGE_HEIGHTMAP])
|
||||
{
|
||||
|
@ -1250,7 +1250,7 @@ static void WindowMapgenHeightmapInvalidate(rct_window* w)
|
|||
WindowMapgenSetPressedTab(w);
|
||||
}
|
||||
|
||||
static void WindowMapgenHeightmapPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMapgenHeightmapPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMapgenDrawTabImages(dpi, w);
|
||||
|
@ -1313,7 +1313,7 @@ static void WindowMapgenHeightmapPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
|
||||
#pragma region Common
|
||||
|
||||
static void WindowMapgenSetPage(rct_window* w, int32_t page)
|
||||
static void WindowMapgenSetPage(WindowBase* w, int32_t page)
|
||||
{
|
||||
w->page = page;
|
||||
w->frame_no = 0;
|
||||
|
@ -1349,7 +1349,7 @@ static void WindowMapgenSetPage(rct_window* w, int32_t page)
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMapgenSetPressedTab(rct_window* w)
|
||||
static void WindowMapgenSetPressedTab(WindowBase* w)
|
||||
{
|
||||
int32_t i;
|
||||
for (i = 0; i < WINDOW_MAPGEN_PAGE_COUNT; i++)
|
||||
|
@ -1357,7 +1357,7 @@ static void WindowMapgenSetPressedTab(rct_window* w)
|
|||
w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMapgenDrawTabImage(DrawPixelInfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex)
|
||||
static void WindowMapgenDrawTabImage(DrawPixelInfo* dpi, WindowBase* w, int32_t page, int32_t spriteIndex)
|
||||
{
|
||||
WidgetIndex widgetIndex = WIDX_TAB_1 + page;
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ static void WindowMapgenDrawTabImage(DrawPixelInfo* dpi, rct_window* w, int32_t
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMapgenDrawTabImages(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowMapgenDrawTabImages(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_BASE, SPR_G2_TAB_LAND);
|
||||
WindowMapgenDrawTabImage(dpi, w, WINDOW_MAPGEN_PAGE_RANDOM, SPR_G2_TAB_TREE);
|
||||
|
|
|
@ -23,8 +23,8 @@ static Widget window_map_tooltip_widgets[] = {
|
|||
WIDGETS_END,
|
||||
};
|
||||
|
||||
static void WindowMapTooltipUpdate(rct_window *w);
|
||||
static void WindowMapTooltipPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowMapTooltipUpdate(WindowBase *w);
|
||||
static void WindowMapTooltipPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static WindowEventList window_map_tooltip_events([](auto& events)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ void WindowMapTooltipUpdateVisibility()
|
|||
*/
|
||||
static void WindowMapTooltipOpen()
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
constexpr int32_t width = 200;
|
||||
constexpr int32_t height = 44;
|
||||
|
@ -128,7 +128,7 @@ static void WindowMapTooltipOpen()
|
|||
*
|
||||
* rct2: 0x006EE8CE
|
||||
*/
|
||||
static void WindowMapTooltipUpdate(rct_window* w)
|
||||
static void WindowMapTooltipUpdate(WindowBase* w)
|
||||
{
|
||||
w->Invalidate();
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ static void WindowMapTooltipUpdate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x006EE894
|
||||
*/
|
||||
static void WindowMapTooltipPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMapTooltipPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
StringId stringId;
|
||||
std::memcpy(&stringId, _mapTooltipArgs.Data(), sizeof(StringId));
|
||||
|
|
|
@ -428,7 +428,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowMazeConstructionOpen()
|
||||
WindowBase* WindowMazeConstructionOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<MazeConstructionWindow>(
|
||||
WindowClass::RideConstruction, ScreenCoordsXY(0, 29), WW, WH, WF_NO_AUTO_CLOSE);
|
||||
|
@ -436,7 +436,7 @@ rct_window* WindowMazeConstructionOpen()
|
|||
|
||||
void WindowMazeConstructionUpdatePressedWidgets()
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr)
|
||||
|
|
|
@ -120,40 +120,40 @@ static constexpr StringId WindowMultiplayerPageTitles[] = {
|
|||
|
||||
static uint8_t _selectedGroup = 0;
|
||||
|
||||
static void WindowMultiplayerInformationMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerInformationResize(rct_window *w);
|
||||
static void WindowMultiplayerInformationUpdate(rct_window *w);
|
||||
static void WindowMultiplayerInformationInvalidate(rct_window *w);
|
||||
static void WindowMultiplayerInformationPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerInformationMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerInformationResize(WindowBase *w);
|
||||
static void WindowMultiplayerInformationUpdate(WindowBase *w);
|
||||
static void WindowMultiplayerInformationInvalidate(WindowBase *w);
|
||||
static void WindowMultiplayerInformationPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static void WindowMultiplayerPlayersMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerPlayersResize(rct_window *w);
|
||||
static void WindowMultiplayerPlayersUpdate(rct_window *w);
|
||||
static void WindowMultiplayerPlayersScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowMultiplayerPlayersScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerPlayersScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerPlayersInvalidate(rct_window *w);
|
||||
static void WindowMultiplayerPlayersPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerPlayersScrollpaint(rct_window *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
static void WindowMultiplayerPlayersMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerPlayersResize(WindowBase *w);
|
||||
static void WindowMultiplayerPlayersUpdate(WindowBase *w);
|
||||
static void WindowMultiplayerPlayersScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowMultiplayerPlayersScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerPlayersScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerPlayersInvalidate(WindowBase *w);
|
||||
static void WindowMultiplayerPlayersPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerPlayersScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
|
||||
static void WindowMultiplayerGroupsMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerGroupsResize(rct_window *w);
|
||||
static void WindowMultiplayerGroupsMousedown(rct_window *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMultiplayerGroupsDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMultiplayerGroupsUpdate(rct_window *w);
|
||||
static void WindowMultiplayerGroupsScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowMultiplayerGroupsScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerGroupsScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerGroupsTextInput(rct_window *w, WidgetIndex widgetIndex, char *text);
|
||||
static void WindowMultiplayerGroupsInvalidate(rct_window *w);
|
||||
static void WindowMultiplayerGroupsPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerGroupsScrollpaint(rct_window *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
static void WindowMultiplayerGroupsMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerGroupsResize(WindowBase *w);
|
||||
static void WindowMultiplayerGroupsMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowMultiplayerGroupsDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowMultiplayerGroupsUpdate(WindowBase *w);
|
||||
static void WindowMultiplayerGroupsScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowMultiplayerGroupsScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerGroupsScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowMultiplayerGroupsTextInput(WindowBase *w, WidgetIndex widgetIndex, char *text);
|
||||
static void WindowMultiplayerGroupsInvalidate(WindowBase *w);
|
||||
static void WindowMultiplayerGroupsPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerGroupsScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
|
||||
static void WindowMultiplayerOptionsMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerOptionsResize(rct_window *w);
|
||||
static void WindowMultiplayerOptionsUpdate(rct_window *w);
|
||||
static void WindowMultiplayerOptionsInvalidate(rct_window *w);
|
||||
static void WindowMultiplayerOptionsPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowMultiplayerOptionsMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowMultiplayerOptionsResize(WindowBase *w);
|
||||
static void WindowMultiplayerOptionsUpdate(WindowBase *w);
|
||||
static void WindowMultiplayerOptionsInvalidate(WindowBase *w);
|
||||
static void WindowMultiplayerOptionsPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static WindowEventList window_multiplayer_information_events([](auto& events)
|
||||
{
|
||||
|
@ -223,16 +223,16 @@ static constexpr const int32_t window_multiplayer_animation_frames[] = {
|
|||
4,
|
||||
};
|
||||
|
||||
static void WindowMultiplayerDrawTabImages(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowMultiplayerSetPage(rct_window* w, int32_t page);
|
||||
static void WindowMultiplayerDrawTabImages(WindowBase* w, DrawPixelInfo* dpi);
|
||||
static void WindowMultiplayerSetPage(WindowBase* w, int32_t page);
|
||||
|
||||
static bool _windowInformationSizeDirty;
|
||||
static ScreenCoordsXY _windowInformationSize;
|
||||
|
||||
rct_window* WindowMultiplayerOpen()
|
||||
WindowBase* WindowMultiplayerOpen()
|
||||
{
|
||||
// Check if window is already open
|
||||
rct_window* window = WindowBringToFrontByClass(WindowClass::Multiplayer);
|
||||
WindowBase* window = WindowBringToFrontByClass(WindowClass::Multiplayer);
|
||||
if (window == nullptr)
|
||||
{
|
||||
window = WindowCreateAutoPos(
|
||||
|
@ -243,7 +243,7 @@ rct_window* WindowMultiplayerOpen()
|
|||
return window;
|
||||
}
|
||||
|
||||
static void WindowMultiplayerSetPage(rct_window* w, int32_t page)
|
||||
static void WindowMultiplayerSetPage(WindowBase* w, int32_t page)
|
||||
{
|
||||
_windowInformationSizeDirty = true;
|
||||
|
||||
|
@ -264,12 +264,12 @@ static void WindowMultiplayerSetPage(rct_window* w, int32_t page)
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerAnchorBorderWidgets(rct_window* w)
|
||||
static void WindowMultiplayerAnchorBorderWidgets(WindowBase* w)
|
||||
{
|
||||
w->ResizeFrameWithPage();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerSetPressedTab(rct_window* w)
|
||||
static void WindowMultiplayerSetPressedTab(WindowBase* w)
|
||||
{
|
||||
for (int32_t i = WIDX_TAB1; i <= WIDX_TAB4; i++)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ static void WindowMultiplayerSetPressedTab(rct_window* w)
|
|||
w->pressed_widgets |= 1LL << (WIDX_TAB1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsShowGroupDropdown(rct_window* w, Widget* widget)
|
||||
static void WindowMultiplayerGroupsShowGroupDropdown(WindowBase* w, Widget* widget)
|
||||
{
|
||||
Widget* dropdownWidget;
|
||||
int32_t numItems, i;
|
||||
|
@ -308,7 +308,7 @@ static void WindowMultiplayerGroupsShowGroupDropdown(rct_window* w, Widget* widg
|
|||
|
||||
#pragma region Information page
|
||||
|
||||
static void WindowMultiplayerInformationMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMultiplayerInformationMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -377,26 +377,26 @@ static ScreenCoordsXY WindowMultiplayerInformationGetSize()
|
|||
return _windowInformationSize;
|
||||
}
|
||||
|
||||
static void WindowMultiplayerInformationResize(rct_window* w)
|
||||
static void WindowMultiplayerInformationResize(WindowBase* w)
|
||||
{
|
||||
auto size = WindowMultiplayerInformationGetSize();
|
||||
WindowSetResize(*w, size.x, size.y, size.x, size.y);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerInformationUpdate(rct_window* w)
|
||||
static void WindowMultiplayerInformationUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerInformationInvalidate(rct_window* w)
|
||||
static void WindowMultiplayerInformationInvalidate(WindowBase* w)
|
||||
{
|
||||
WindowMultiplayerSetPressedTab(w);
|
||||
WindowMultiplayerAnchorBorderWidgets(w);
|
||||
WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerInformationPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMultiplayerInformationPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMultiplayerDrawTabImages(w, dpi);
|
||||
|
@ -463,7 +463,7 @@ static bool IsServerPlayerInvisible()
|
|||
return NetworkIsServerPlayerInvisible() && !gConfigGeneral.DebuggingTools;
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMultiplayerPlayersMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -482,7 +482,7 @@ static void WindowMultiplayerPlayersMouseup(rct_window* w, WidgetIndex widgetInd
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersResize(rct_window* w)
|
||||
static void WindowMultiplayerPlayersResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 420, 124, 500, 450);
|
||||
|
||||
|
@ -495,13 +495,13 @@ static void WindowMultiplayerPlayersResize(rct_window* w)
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersUpdate(rct_window* w)
|
||||
static void WindowMultiplayerPlayersUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
static void WindowMultiplayerPlayersScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -522,7 +522,7 @@ static void WindowMultiplayerPlayersScrollgetsize(rct_window* w, int32_t scrollI
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMultiplayerPlayersScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t index;
|
||||
|
||||
|
@ -537,7 +537,7 @@ static void WindowMultiplayerPlayersScrollmousedown(rct_window* w, int32_t scrol
|
|||
WindowPlayerOpen(NetworkGetPlayerID(player));
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMultiplayerPlayersScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t index;
|
||||
|
||||
|
@ -549,7 +549,7 @@ static void WindowMultiplayerPlayersScrollmouseover(rct_window* w, int32_t scrol
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersInvalidate(rct_window* w)
|
||||
static void WindowMultiplayerPlayersInvalidate(WindowBase* w)
|
||||
{
|
||||
WindowMultiplayerSetPressedTab(w);
|
||||
WindowMultiplayerAnchorBorderWidgets(w);
|
||||
|
@ -558,7 +558,7 @@ static void WindowMultiplayerPlayersInvalidate(rct_window* w)
|
|||
WindowAlignTabs(w, WIDX_TAB1, WIDX_TAB4);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMultiplayerPlayersPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
StringId stringId;
|
||||
|
||||
|
@ -573,7 +573,7 @@ static void WindowMultiplayerPlayersPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
DrawTextBasic(dpi, screenCoords, stringId, ft, { w->colours[2] });
|
||||
}
|
||||
|
||||
static void WindowMultiplayerPlayersScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
static void WindowMultiplayerPlayersScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
ScreenCoordsXY screenCoords;
|
||||
screenCoords.y = 0;
|
||||
|
@ -677,7 +677,7 @@ static void WindowMultiplayerPlayersScrollpaint(rct_window* w, DrawPixelInfo* dp
|
|||
|
||||
#pragma region Groups page
|
||||
|
||||
static void WindowMultiplayerGroupsMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMultiplayerGroupsMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -713,7 +713,7 @@ static void WindowMultiplayerGroupsMouseup(rct_window* w, WidgetIndex widgetInde
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsResize(rct_window* w)
|
||||
static void WindowMultiplayerGroupsResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 320, 200, 320, 500);
|
||||
|
||||
|
@ -724,7 +724,7 @@ static void WindowMultiplayerGroupsResize(rct_window* w)
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowMultiplayerGroupsMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -737,7 +737,7 @@ static void WindowMultiplayerGroupsMousedown(rct_window* w, WidgetIndex widgetIn
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowMultiplayerGroupsDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
if (dropdownIndex == -1)
|
||||
{
|
||||
|
@ -760,13 +760,13 @@ static void WindowMultiplayerGroupsDropdown(rct_window* w, WidgetIndex widgetInd
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsUpdate(rct_window* w)
|
||||
static void WindowMultiplayerGroupsUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
static void WindowMultiplayerGroupsScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
|
@ -787,7 +787,7 @@ static void WindowMultiplayerGroupsScrollgetsize(rct_window* w, int32_t scrollIn
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMultiplayerGroupsScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t index;
|
||||
|
||||
|
@ -803,7 +803,7 @@ static void WindowMultiplayerGroupsScrollmousedown(rct_window* w, int32_t scroll
|
|||
GameActions::Execute(&networkModifyGroup);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowMultiplayerGroupsScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t index;
|
||||
|
||||
|
@ -815,7 +815,7 @@ static void WindowMultiplayerGroupsScrollmouseover(rct_window* w, int32_t scroll
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsTextInput(rct_window* w, WidgetIndex widgetIndex, char* text)
|
||||
static void WindowMultiplayerGroupsTextInput(WindowBase* w, WidgetIndex widgetIndex, char* text)
|
||||
{
|
||||
if (widgetIndex != WIDX_RENAME_GROUP)
|
||||
return;
|
||||
|
@ -827,7 +827,7 @@ static void WindowMultiplayerGroupsTextInput(rct_window* w, WidgetIndex widgetIn
|
|||
GameActions::Execute(&networkModifyGroup);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsInvalidate(rct_window* w)
|
||||
static void WindowMultiplayerGroupsInvalidate(WindowBase* w)
|
||||
{
|
||||
WindowMultiplayerSetPressedTab(w);
|
||||
WindowMultiplayerAnchorBorderWidgets(w);
|
||||
|
@ -842,7 +842,7 @@ static void WindowMultiplayerGroupsInvalidate(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMultiplayerGroupsPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
thread_local std::string _buffer;
|
||||
|
||||
|
@ -889,7 +889,7 @@ static void WindowMultiplayerGroupsPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerGroupsScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
static void WindowMultiplayerGroupsScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
auto screenCoords = ScreenCoordsXY{ 0, 0 };
|
||||
|
||||
|
@ -934,7 +934,7 @@ static void WindowMultiplayerGroupsScrollpaint(rct_window* w, DrawPixelInfo* dpi
|
|||
|
||||
#pragma region Options page
|
||||
|
||||
static void WindowMultiplayerOptionsMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowMultiplayerOptionsMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -965,18 +965,18 @@ static void WindowMultiplayerOptionsMouseup(rct_window* w, WidgetIndex widgetInd
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerOptionsResize(rct_window* w)
|
||||
static void WindowMultiplayerOptionsResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 300, 100, 300, 100);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerOptionsUpdate(rct_window* w)
|
||||
static void WindowMultiplayerOptionsUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerOptionsInvalidate(rct_window* w)
|
||||
static void WindowMultiplayerOptionsInvalidate(WindowBase* w)
|
||||
{
|
||||
WindowMultiplayerSetPressedTab(w);
|
||||
WindowMultiplayerAnchorBorderWidgets(w);
|
||||
|
@ -992,7 +992,7 @@ static void WindowMultiplayerOptionsInvalidate(rct_window* w)
|
|||
WidgetSetCheckboxValue(*w, WIDX_KNOWN_KEYS_ONLY_CHECKBOX, gConfigNetwork.KnownKeysOnly);
|
||||
}
|
||||
|
||||
static void WindowMultiplayerOptionsPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMultiplayerOptionsPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowMultiplayerDrawTabImages(w, dpi);
|
||||
|
@ -1000,7 +1000,7 @@ static void WindowMultiplayerOptionsPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
|
||||
#pragma endregion
|
||||
|
||||
static void WindowMultiplayerDrawTabImage(rct_window* w, DrawPixelInfo* dpi, int32_t page, int32_t spriteIndex)
|
||||
static void WindowMultiplayerDrawTabImage(WindowBase* w, DrawPixelInfo* dpi, int32_t page, int32_t spriteIndex)
|
||||
{
|
||||
WidgetIndex widgetIndex = WIDX_TAB1 + page;
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ static void WindowMultiplayerDrawTabImage(rct_window* w, DrawPixelInfo* dpi, int
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowMultiplayerDrawTabImages(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowMultiplayerDrawTabImages(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowMultiplayerDrawTabImage(w, dpi, WINDOW_MULTIPLAYER_PAGE_INFORMATION, SPR_TAB_KIOSKS_AND_FACILITIES_0);
|
||||
WindowMultiplayerDrawTabImage(w, dpi, WINDOW_MULTIPLAYER_PAGE_PLAYERS, SPR_TAB_GUESTS_0);
|
||||
|
|
|
@ -130,7 +130,7 @@ private:
|
|||
std::string _password;
|
||||
};
|
||||
|
||||
rct_window* WindowNetworkStatusOpen(const std::string& text, close_callback onClose)
|
||||
WindowBase* WindowNetworkStatusOpen(const std::string& text, close_callback onClose)
|
||||
{
|
||||
auto window = WindowFocusOrCreate<NetworkStatusWindow>(
|
||||
WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN);
|
||||
|
@ -152,7 +152,7 @@ void WindowNetworkStatusClose()
|
|||
networkWindow->Close();
|
||||
}
|
||||
|
||||
rct_window* WindowNetworkStatusOpenPassword()
|
||||
WindowBase* WindowNetworkStatusOpenPassword()
|
||||
{
|
||||
auto window = WindowFocusOrCreate<NetworkStatusWindow>(
|
||||
WindowClass::NetworkStatus, 420, 90, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN);
|
||||
|
|
|
@ -371,7 +371,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowNewCampaignOpen(int16_t campaignType)
|
||||
WindowBase* WindowNewCampaignOpen(int16_t campaignType)
|
||||
{
|
||||
auto w = static_cast<NewCampaignWindow*>(WindowBringToFrontByClass(WindowClass::NewCampaign));
|
||||
if (w != nullptr)
|
||||
|
|
|
@ -946,9 +946,9 @@ void WindowNewRideInitVars()
|
|||
*
|
||||
* rct2: 0x006B3CFF
|
||||
*/
|
||||
rct_window* WindowNewRideOpen()
|
||||
WindowBase* WindowNewRideOpen()
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
window = WindowBringToFrontByClass(WindowClass::ConstructRide);
|
||||
if (window)
|
||||
|
@ -963,7 +963,7 @@ rct_window* WindowNewRideOpen()
|
|||
return window;
|
||||
}
|
||||
|
||||
rct_window* WindowNewRideOpenResearch()
|
||||
WindowBase* WindowNewRideOpenResearch()
|
||||
{
|
||||
auto w = static_cast<NewRideWindow*>(WindowNewRideOpen());
|
||||
w->SetPage(RESEARCH_TAB);
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
}
|
||||
else if (_pressedButtonIndex > 1)
|
||||
{
|
||||
static rct_window* _mainWindow;
|
||||
static WindowBase* _mainWindow;
|
||||
auto subjectLoc = News::GetSubjectLocation(newsItem.Type, newsItem.Assoc);
|
||||
if (subjectLoc.has_value() && (_mainWindow = WindowGetMain()) != nullptr)
|
||||
{
|
||||
|
@ -308,7 +308,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowNewsOpen()
|
||||
WindowBase* WindowNewsOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<NewsWindow>(WindowClass::RecentNews, WW, WH, 0);
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ private:
|
|||
};
|
||||
};
|
||||
|
||||
rct_window* WindowNewsOptionsOpen()
|
||||
WindowBase* WindowNewsOptionsOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<NewsOptionsWindow>(WindowClass::NotificationOptions, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@ static constexpr StringId GetStringFromObjectType(const ObjectType type)
|
|||
}
|
||||
}
|
||||
|
||||
class ObjectLoadErrorWindow final : public rct_window
|
||||
class ObjectLoadErrorWindow final : public WindowBase
|
||||
{
|
||||
private:
|
||||
std::vector<ObjectEntryDescriptor> _invalidEntries;
|
||||
|
@ -563,7 +563,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects)
|
||||
WindowBase* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects)
|
||||
{
|
||||
// Check if window is already open
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::ObjectLoadError);
|
||||
|
|
|
@ -612,7 +612,7 @@ public:
|
|||
if (page == WINDOW_OPTIONS_PAGE_ADVANCED)
|
||||
return AdvancedTooltip(widgetIndex, fallback);
|
||||
|
||||
return rct_window::OnTooltip(widgetIndex, fallback);
|
||||
return WindowBase::OnTooltip(widgetIndex, fallback);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -934,7 +934,7 @@ private:
|
|||
gConfigGeneral.AlwaysShowGridlines ^= 1;
|
||||
ConfigSaveDefault();
|
||||
GfxInvalidateScreen();
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
if (gConfigGeneral.AlwaysShowGridlines)
|
||||
|
@ -2117,7 +2117,7 @@ private:
|
|||
GfxInvalidateScreen();
|
||||
}
|
||||
|
||||
uint8_t GetScrollPercentage(const Widget& widget, const rct_scroll& scroll)
|
||||
uint8_t GetScrollPercentage(const Widget& widget, const ScrollBar& scroll)
|
||||
{
|
||||
uint8_t w = widget.width() - 1;
|
||||
return static_cast<float>(scroll.h_left) / (scroll.h_right - w) * 100;
|
||||
|
@ -2184,7 +2184,7 @@ private:
|
|||
*
|
||||
* rct2: 0x006BAC5B
|
||||
*/
|
||||
rct_window* WindowOptionsOpen()
|
||||
WindowBase* WindowOptionsOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<OptionsWindow>(WindowClass::Options, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
|
|
@ -1304,7 +1304,7 @@ static ParkWindow* ParkWindowOpen(uint8_t page)
|
|||
*
|
||||
* rct2: 0x00667C48
|
||||
*/
|
||||
rct_window* WindowParkEntranceOpen()
|
||||
WindowBase* WindowParkEntranceOpen()
|
||||
{
|
||||
return ParkWindowOpen(WINDOW_PARK_PAGE_ENTRANCE);
|
||||
}
|
||||
|
@ -1313,7 +1313,7 @@ rct_window* WindowParkEntranceOpen()
|
|||
*
|
||||
* rct2: 0x00667CA4
|
||||
*/
|
||||
rct_window* WindowParkRatingOpen()
|
||||
WindowBase* WindowParkRatingOpen()
|
||||
{
|
||||
return ParkWindowOpen(WINDOW_PARK_PAGE_RATING);
|
||||
}
|
||||
|
@ -1322,7 +1322,7 @@ rct_window* WindowParkRatingOpen()
|
|||
*
|
||||
* rct2: 0x00667D35
|
||||
*/
|
||||
rct_window* WindowParkGuestsOpen()
|
||||
WindowBase* WindowParkGuestsOpen()
|
||||
{
|
||||
return ParkWindowOpen(WINDOW_PARK_PAGE_GUESTS);
|
||||
}
|
||||
|
@ -1331,7 +1331,7 @@ rct_window* WindowParkGuestsOpen()
|
|||
*
|
||||
* rct2: 0x00667E57
|
||||
*/
|
||||
rct_window* WindowParkObjectiveOpen()
|
||||
WindowBase* WindowParkObjectiveOpen()
|
||||
{
|
||||
auto* wnd = ParkWindowOpen(WINDOW_PARK_PAGE_OBJECTIVE);
|
||||
if (wnd != nullptr)
|
||||
|
@ -1348,7 +1348,7 @@ rct_window* WindowParkObjectiveOpen()
|
|||
*
|
||||
* rct2: 0x00667DC6
|
||||
*/
|
||||
rct_window* WindowParkAwardsOpen()
|
||||
WindowBase* WindowParkAwardsOpen()
|
||||
{
|
||||
return ParkWindowOpen(WINDOW_PARK_PAGE_AWARDS);
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowPatrolAreaOpen(EntityId staffId)
|
||||
WindowBase* WindowPatrolAreaOpen(EntityId staffId)
|
||||
{
|
||||
auto w = WindowFocusOrCreate<PatrolAreaWindow>(
|
||||
WindowClass::PatrolArea, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0);
|
||||
|
|
|
@ -81,14 +81,14 @@ static Widget *window_player_page_widgets[] = {
|
|||
|
||||
#pragma region Events
|
||||
|
||||
static void WindowPlayerOverviewClose(rct_window *w);
|
||||
static void WindowPlayerOverviewMouseUp(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowPlayerOverviewResize(rct_window *w);
|
||||
static void WindowPlayerOverviewMouseDown(rct_window *w, WidgetIndex widgetIndex, Widget *widget);
|
||||
static void WindowPlayerOverviewDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowPlayerOverviewUpdate(rct_window* w);
|
||||
static void WindowPlayerOverviewInvalidate(rct_window *w);
|
||||
static void WindowPlayerOverviewPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowPlayerOverviewClose(WindowBase *w);
|
||||
static void WindowPlayerOverviewMouseUp(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowPlayerOverviewResize(WindowBase *w);
|
||||
static void WindowPlayerOverviewMouseDown(WindowBase *w, WidgetIndex widgetIndex, Widget *widget);
|
||||
static void WindowPlayerOverviewDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowPlayerOverviewUpdate(WindowBase* w);
|
||||
static void WindowPlayerOverviewInvalidate(WindowBase *w);
|
||||
static void WindowPlayerOverviewPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static WindowEventList window_player_overview_events([](auto& events)
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ static WindowEventList window_player_overview_events([](auto& events)
|
|||
events.paint = &WindowPlayerOverviewPaint;
|
||||
});
|
||||
|
||||
static void WindowPlayerStatisticsClose(rct_window *w);
|
||||
static void WindowPlayerStatisticsMouseUp(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowPlayerStatisticsResize(rct_window *w);
|
||||
static void WindowPlayerStatisticsUpdate(rct_window* w);
|
||||
static void WindowPlayerStatisticsInvalidate(rct_window *w);
|
||||
static void WindowPlayerStatisticsPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowPlayerStatisticsClose(WindowBase *w);
|
||||
static void WindowPlayerStatisticsMouseUp(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowPlayerStatisticsResize(WindowBase *w);
|
||||
static void WindowPlayerStatisticsUpdate(WindowBase* w);
|
||||
static void WindowPlayerStatisticsInvalidate(WindowBase *w);
|
||||
static void WindowPlayerStatisticsPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static WindowEventList window_player_statistics_events([](auto& events)
|
||||
{
|
||||
|
@ -128,14 +128,14 @@ static WindowEventList *window_player_page_events[] = {
|
|||
|
||||
// clang-format on
|
||||
|
||||
static void WindowPlayerSetPage(rct_window* w, int32_t page);
|
||||
static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, rct_window* w);
|
||||
static void WindowPlayerUpdateViewport(rct_window* w, bool scroll);
|
||||
static void WindowPlayerUpdateTitle(rct_window* w);
|
||||
static void WindowPlayerSetPage(WindowBase* w, int32_t page);
|
||||
static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, WindowBase* w);
|
||||
static void WindowPlayerUpdateViewport(WindowBase* w, bool scroll);
|
||||
static void WindowPlayerUpdateTitle(WindowBase* w);
|
||||
|
||||
rct_window* WindowPlayerOpen(uint8_t id)
|
||||
WindowBase* WindowPlayerOpen(uint8_t id)
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
window = WindowBringToFrontByNumber(WindowClass::Player, id);
|
||||
if (window == nullptr)
|
||||
|
@ -169,7 +169,7 @@ rct_window* WindowPlayerOpen(uint8_t id)
|
|||
return window;
|
||||
}
|
||||
|
||||
static void WindowPlayerOverviewShowGroupDropdown(rct_window* w, Widget* widget)
|
||||
static void WindowPlayerOverviewShowGroupDropdown(WindowBase* w, Widget* widget)
|
||||
{
|
||||
Widget* dropdownWidget;
|
||||
int32_t numItems, i;
|
||||
|
@ -196,11 +196,11 @@ static void WindowPlayerOverviewShowGroupDropdown(rct_window* w, Widget* widget)
|
|||
Dropdown::SetChecked(NetworkGetGroupIndex(NetworkGetPlayerGroup(player)), true);
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewClose(rct_window* w)
|
||||
void WindowPlayerOverviewClose(WindowBase* w)
|
||||
{
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex)
|
||||
void WindowPlayerOverviewMouseUp(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -213,7 +213,7 @@ void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex)
|
|||
break;
|
||||
case WIDX_LOCATE:
|
||||
{
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
int32_t player = NetworkGetPlayerIndex(static_cast<uint8_t>(w->number));
|
||||
|
@ -238,7 +238,7 @@ void WindowPlayerOverviewMouseUp(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewMouseDown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
void WindowPlayerOverviewMouseDown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ void WindowPlayerOverviewMouseDown(rct_window* w, WidgetIndex widgetIndex, Widge
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
void WindowPlayerOverviewDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
const auto playerId = static_cast<uint8_t>(w->number);
|
||||
const auto playerIdx = NetworkGetPlayerIndex(playerId);
|
||||
|
@ -272,12 +272,12 @@ void WindowPlayerOverviewDropdown(rct_window* w, WidgetIndex widgetIndex, int32_
|
|||
GameActions::Execute(&playerSetGroupAction);
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewResize(rct_window* w)
|
||||
void WindowPlayerOverviewResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 240, 170, 500, 300);
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewUpdate(rct_window* w)
|
||||
void WindowPlayerOverviewUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB_1 + w->page);
|
||||
|
@ -300,7 +300,7 @@ void WindowPlayerOverviewUpdate(rct_window* w)
|
|||
WindowPlayerUpdateViewport(w, scroll);
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
void WindowPlayerOverviewPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowPlayerDrawTabImages(dpi, w);
|
||||
|
@ -359,7 +359,7 @@ void WindowPlayerOverviewPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerOverviewInvalidate(rct_window* w)
|
||||
void WindowPlayerOverviewInvalidate(WindowBase* w)
|
||||
{
|
||||
int32_t playerIndex = NetworkGetPlayerIndex(static_cast<uint8_t>(w->number));
|
||||
if (playerIndex == -1)
|
||||
|
@ -395,7 +395,7 @@ void WindowPlayerOverviewInvalidate(rct_window* w)
|
|||
|
||||
WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_2);
|
||||
|
||||
rct_viewport* viewport = w->viewport;
|
||||
Viewport* viewport = w->viewport;
|
||||
if (viewport != nullptr)
|
||||
{
|
||||
Widget* viewportWidget = &window_player_overview_widgets[WIDX_VIEWPORT];
|
||||
|
@ -414,7 +414,7 @@ void WindowPlayerOverviewInvalidate(rct_window* w)
|
|||
WidgetSetEnabled(*w, WIDX_KICK, canKick && !isOwnWindow && !isServer);
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsClose(rct_window* w)
|
||||
void WindowPlayerStatisticsClose(WindowBase* w)
|
||||
{
|
||||
if (w->error.var_480)
|
||||
{
|
||||
|
@ -422,7 +422,7 @@ void WindowPlayerStatisticsClose(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsMouseUp(rct_window* w, WidgetIndex widgetIndex)
|
||||
void WindowPlayerStatisticsMouseUp(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -436,12 +436,12 @@ void WindowPlayerStatisticsMouseUp(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsResize(rct_window* w)
|
||||
void WindowPlayerStatisticsResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, 210, 80, 210, 80);
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsUpdate(rct_window* w)
|
||||
void WindowPlayerStatisticsUpdate(WindowBase* w)
|
||||
{
|
||||
w->frame_no++;
|
||||
WidgetInvalidate(*w, WIDX_TAB_1 + w->page);
|
||||
|
@ -452,7 +452,7 @@ void WindowPlayerStatisticsUpdate(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsInvalidate(rct_window* w)
|
||||
void WindowPlayerStatisticsInvalidate(WindowBase* w)
|
||||
{
|
||||
if (window_player_page_widgets[w->page] != w->widgets)
|
||||
{
|
||||
|
@ -471,7 +471,7 @@ void WindowPlayerStatisticsInvalidate(rct_window* w)
|
|||
WindowAlignTabs(w, WIDX_TAB_1, WIDX_TAB_2);
|
||||
}
|
||||
|
||||
void WindowPlayerStatisticsPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
void WindowPlayerStatisticsPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowPlayerDrawTabImages(dpi, w);
|
||||
|
@ -497,7 +497,7 @@ void WindowPlayerStatisticsPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
DrawTextBasic(dpi, screenCoords, STR_MONEY_SPENT, ft);
|
||||
}
|
||||
|
||||
static void WindowPlayerSetPage(rct_window* w, int32_t page)
|
||||
static void WindowPlayerSetPage(WindowBase* w, int32_t page)
|
||||
{
|
||||
int32_t originalPage = w->page;
|
||||
|
||||
|
@ -538,7 +538,7 @@ static void WindowPlayerSetPage(rct_window* w, int32_t page)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
Widget* widget;
|
||||
|
||||
|
@ -566,7 +566,7 @@ static void WindowPlayerDrawTabImages(DrawPixelInfo* dpi, rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowPlayerUpdateViewport(rct_window* w, bool scroll)
|
||||
static void WindowPlayerUpdateViewport(WindowBase* w, bool scroll)
|
||||
{
|
||||
int32_t playerIndex = NetworkGetPlayerIndex(static_cast<uint8_t>(w->number));
|
||||
if (playerIndex == -1)
|
||||
|
@ -574,7 +574,7 @@ static void WindowPlayerUpdateViewport(rct_window* w, bool scroll)
|
|||
return;
|
||||
}
|
||||
|
||||
rct_viewport* viewport = w->viewport;
|
||||
Viewport* viewport = w->viewport;
|
||||
if (viewport != nullptr)
|
||||
{
|
||||
auto coord = NetworkGetPlayerLastActionCoord(playerIndex);
|
||||
|
@ -613,7 +613,7 @@ static void WindowPlayerUpdateViewport(rct_window* w, bool scroll)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowPlayerUpdateTitle(rct_window* w)
|
||||
static void WindowPlayerUpdateTitle(WindowBase* w)
|
||||
{
|
||||
auto ft = Formatter::Common();
|
||||
int32_t player = NetworkGetPlayerIndex(static_cast<uint8_t>(w->number));
|
||||
|
|
|
@ -91,9 +91,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowRideRefurbishPromptOpen(const Ride& ride)
|
||||
WindowBase* WindowRideRefurbishPromptOpen(const Ride& ride)
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
RefurbishRidePromptWindow* newWindow;
|
||||
|
||||
w = WindowFindByClass(WindowClass::DemolishRidePrompt);
|
||||
|
|
|
@ -101,17 +101,17 @@ static Widget *window_research_page_widgets[] = {
|
|||
|
||||
#pragma region Events
|
||||
|
||||
static void WindowResearchDevelopmentMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowResearchDevelopmentUpdate(rct_window *w);
|
||||
static void WindowResearchDevelopmentInvalidate(rct_window *w);
|
||||
static void WindowResearchDevelopmentPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowResearchDevelopmentMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowResearchDevelopmentUpdate(WindowBase *w);
|
||||
static void WindowResearchDevelopmentInvalidate(WindowBase *w);
|
||||
static void WindowResearchDevelopmentPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
static void WindowResearchFundingMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowResearchFundingMousedown(rct_window *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowResearchFundingDropdown(rct_window *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowResearchFundingUpdate(rct_window *w);
|
||||
static void WindowResearchFundingInvalidate(rct_window *w);
|
||||
static void WindowResearchFundingPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowResearchFundingMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowResearchFundingMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowResearchFundingDropdown(WindowBase *w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowResearchFundingUpdate(WindowBase *w);
|
||||
static void WindowResearchFundingInvalidate(WindowBase *w);
|
||||
static void WindowResearchFundingPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
|
||||
//
|
||||
static WindowEventList window_research_development_events([](auto& events)
|
||||
|
@ -154,13 +154,13 @@ static constexpr const StringId ResearchStageNames[] = {
|
|||
STR_RESEARCH_STAGE_UNKNOWN,
|
||||
};
|
||||
|
||||
static void WindowResearchSetPage(rct_window* w, int32_t page);
|
||||
static void WindowResearchSetPressedTab(rct_window* w);
|
||||
static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, rct_window* w);
|
||||
static void WindowResearchSetPage(WindowBase* w, int32_t page);
|
||||
static void WindowResearchSetPressedTab(WindowBase* w);
|
||||
static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, WindowBase* w);
|
||||
|
||||
rct_window* WindowResearchOpen()
|
||||
WindowBase* WindowResearchOpen()
|
||||
{
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
w = WindowBringToFrontByClass(WindowClass::Research);
|
||||
if (w == nullptr)
|
||||
|
@ -196,7 +196,7 @@ rct_window* WindowResearchOpen()
|
|||
*
|
||||
* rct2: 0x006B6B38
|
||||
*/
|
||||
static void WindowResearchDevelopmentMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowResearchDevelopmentMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ static void WindowResearchDevelopmentMouseup(rct_window* w, WidgetIndex widgetIn
|
|||
*
|
||||
* rct2: 0x0069CBA6
|
||||
*/
|
||||
static void WindowResearchDevelopmentUpdate(rct_window* w)
|
||||
static void WindowResearchDevelopmentUpdate(WindowBase* w)
|
||||
{
|
||||
// Tab animation
|
||||
if (++w->frame_no >= window_research_tab_animation_loops[w->page])
|
||||
|
@ -229,7 +229,7 @@ static void WindowResearchDevelopmentUpdate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x006B6819
|
||||
*/
|
||||
static void WindowResearchDevelopmentInvalidate(rct_window* w)
|
||||
static void WindowResearchDevelopmentInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != window_research_page_widgets[WINDOW_RESEARCH_PAGE_DEVELOPMENT])
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ static void WindowResearchDevelopmentInvalidate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x006B689B
|
||||
*/
|
||||
static void WindowResearchDevelopmentPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowResearchDevelopmentPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowResearchDrawTabImages(dpi, w);
|
||||
|
@ -261,7 +261,7 @@ static void WindowResearchDevelopmentPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
WindowResearchDevelopmentPagePaint(w, dpi, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP);
|
||||
}
|
||||
|
||||
void WindowResearchDevelopmentPagePaint(rct_window* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex)
|
||||
void WindowResearchDevelopmentPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex)
|
||||
{
|
||||
baseWidgetIndex = baseWidgetIndex - WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP;
|
||||
|
||||
|
@ -391,7 +391,7 @@ void WindowResearchDevelopmentPagePaint(rct_window* w, DrawPixelInfo* dpi, Widge
|
|||
*
|
||||
* rct2: 0x0069DB3F
|
||||
*/
|
||||
static void WindowResearchFundingMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowResearchFundingMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -423,7 +423,7 @@ static void WindowResearchFundingMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
*
|
||||
* rct2: 0x0069DB66
|
||||
*/
|
||||
static void WindowResearchFundingMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowResearchFundingMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON)
|
||||
return;
|
||||
|
@ -447,7 +447,7 @@ static void WindowResearchFundingMousedown(rct_window* w, WidgetIndex widgetInde
|
|||
*
|
||||
* rct2: 0x0069DB6D
|
||||
*/
|
||||
static void WindowResearchFundingDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowResearchFundingDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON || dropdownIndex == -1)
|
||||
return;
|
||||
|
@ -460,7 +460,7 @@ static void WindowResearchFundingDropdown(rct_window* w, WidgetIndex widgetIndex
|
|||
*
|
||||
* rct2: 0x0069DC23
|
||||
*/
|
||||
static void WindowResearchFundingUpdate(rct_window* w)
|
||||
static void WindowResearchFundingUpdate(WindowBase* w)
|
||||
{
|
||||
// Tab animation
|
||||
if (++w->frame_no >= window_research_tab_animation_loops[w->page])
|
||||
|
@ -472,7 +472,7 @@ static void WindowResearchFundingUpdate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x0069DA64
|
||||
*/
|
||||
static void WindowResearchFundingInvalidate(rct_window* w)
|
||||
static void WindowResearchFundingInvalidate(WindowBase* w)
|
||||
{
|
||||
if (w->widgets != window_research_page_widgets[WINDOW_RESEARCH_PAGE_FUNDING])
|
||||
{
|
||||
|
@ -528,7 +528,7 @@ static void WindowResearchFundingInvalidate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x0069DAF0
|
||||
*/
|
||||
static void WindowResearchFundingPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowResearchFundingPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
WindowResearchDrawTabImages(dpi, w);
|
||||
|
@ -536,7 +536,7 @@ static void WindowResearchFundingPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
WindowResearchFundingPagePaint(w, dpi, WIDX_RESEARCH_FUNDING);
|
||||
}
|
||||
|
||||
void WindowResearchFundingPagePaint(rct_window* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex)
|
||||
void WindowResearchFundingPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex)
|
||||
{
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return;
|
||||
|
@ -555,7 +555,7 @@ void WindowResearchFundingPagePaint(rct_window* w, DrawPixelInfo* dpi, WidgetInd
|
|||
*
|
||||
* rct2: 0x0069CAC5
|
||||
*/
|
||||
static void WindowResearchSetPage(rct_window* w, int32_t page)
|
||||
static void WindowResearchSetPage(WindowBase* w, int32_t page)
|
||||
{
|
||||
w->page = page;
|
||||
w->frame_no = 0;
|
||||
|
@ -585,7 +585,7 @@ static void WindowResearchSetPage(rct_window* w, int32_t page)
|
|||
w->Invalidate();
|
||||
}
|
||||
|
||||
static void WindowResearchSetPressedTab(rct_window* w)
|
||||
static void WindowResearchSetPressedTab(WindowBase* w)
|
||||
{
|
||||
int32_t i;
|
||||
for (i = 0; i < WINDOW_RESEARCH_PAGE_COUNT; i++)
|
||||
|
@ -593,7 +593,7 @@ static void WindowResearchSetPressedTab(rct_window* w)
|
|||
w->pressed_widgets |= 1LL << (WIDX_TAB_1 + w->page);
|
||||
}
|
||||
|
||||
static void WindowResearchDrawTabImage(DrawPixelInfo* dpi, rct_window* w, int32_t page, int32_t spriteIndex)
|
||||
static void WindowResearchDrawTabImage(DrawPixelInfo* dpi, WindowBase* w, int32_t page, int32_t spriteIndex)
|
||||
{
|
||||
WidgetIndex widgetIndex = WIDX_TAB_1 + page;
|
||||
|
||||
|
@ -613,7 +613,7 @@ static void WindowResearchDrawTabImage(DrawPixelInfo* dpi, rct_window* w, int32_
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, rct_window* w)
|
||||
static void WindowResearchDrawTabImages(DrawPixelInfo* dpi, WindowBase* w)
|
||||
{
|
||||
WindowResearchDrawTabImage(dpi, w, WINDOW_RESEARCH_PAGE_DEVELOPMENT, SPR_TAB_FINANCES_RESEARCH_0);
|
||||
WindowResearchDrawTabImage(dpi, w, WINDOW_RESEARCH_PAGE_FUNDING, SPR_TAB_FINANCES_SUMMARY_0);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -179,7 +179,7 @@ static int32_t RideGetAlternativeType(const Ride& ride)
|
|||
/* move to ride.c */
|
||||
static void CloseRideWindowForConstruction(RideId rideId)
|
||||
{
|
||||
rct_window* w = WindowFindByNumber(WindowClass::Ride, rideId.ToUnderlying());
|
||||
WindowBase* w = WindowFindByNumber(WindowClass::Ride, rideId.ToUnderlying());
|
||||
if (w != nullptr && w->page == 1)
|
||||
WindowClose(*w);
|
||||
}
|
||||
|
@ -2192,7 +2192,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
const rct_preview_track* trackBlock;
|
||||
const PreviewTrack* trackBlock;
|
||||
|
||||
const auto& ted = GetTrackElementDescriptor(trackType);
|
||||
trackBlock = ted.Block;
|
||||
|
@ -2363,7 +2363,7 @@ private:
|
|||
}
|
||||
|
||||
const auto& ted = GetTrackElementDescriptor(tileElement->AsTrack()->GetTrackType());
|
||||
const rct_preview_track* trackBlock = ted.Block;
|
||||
const PreviewTrack* trackBlock = ted.Block;
|
||||
newCoords->z = (tileElement->GetBaseZ()) - trackBlock->z;
|
||||
_gotoStartPlacementMode = true;
|
||||
|
||||
|
@ -2761,7 +2761,7 @@ static void WindowRideConstructionUpdateDisabledPieces(ObjectEntryIndex rideType
|
|||
*
|
||||
* rct2: 0x006CB481
|
||||
*/
|
||||
rct_window* WindowRideConstructionOpen()
|
||||
WindowBase* WindowRideConstructionOpen()
|
||||
{
|
||||
RideId rideIndex = _currentRideIndex;
|
||||
CloseRideWindowForConstruction(rideIndex);
|
||||
|
@ -3210,7 +3210,7 @@ void UpdateGhostTrackAndArrow()
|
|||
void RideConstructionToolupdateConstruct(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t z;
|
||||
const rct_preview_track* trackBlock;
|
||||
const PreviewTrack* trackBlock;
|
||||
|
||||
MapInvalidateMapSelectionTiles();
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||
|
@ -3475,7 +3475,7 @@ void RideConstructionTooldownConstruct(const ScreenCoordsXY& screenCoords)
|
|||
{
|
||||
const CursorState* state = ContextGetCursorState();
|
||||
|
||||
rct_window* w;
|
||||
WindowBase* w;
|
||||
|
||||
MapInvalidateMapSelectionTiles();
|
||||
RideConstructionInvalidateCurrentTrack();
|
||||
|
@ -3526,7 +3526,7 @@ void RideConstructionTooldownConstruct(const ScreenCoordsXY& screenCoords)
|
|||
if (_trackPlaceZ == 0)
|
||||
{
|
||||
const auto& ted = GetTrackElementDescriptor(_currentTrackPieceType);
|
||||
const rct_preview_track* trackBlock = ted.Block;
|
||||
const PreviewTrack* trackBlock = ted.Block;
|
||||
int32_t bx = 0;
|
||||
do
|
||||
{
|
||||
|
@ -3679,7 +3679,7 @@ void RideConstructionTooldownConstruct(const ScreenCoordsXY& screenCoords)
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutTurnLeft()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -3925,7 +3925,7 @@ void WindowRideConstructionKeyboardShortcutTurnLeft()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutTurnRight()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4171,7 +4171,7 @@ void WindowRideConstructionKeyboardShortcutTurnRight()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutUseTrackDefault()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4201,7 +4201,7 @@ void WindowRideConstructionKeyboardShortcutUseTrackDefault()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutSlopeDown()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4311,7 +4311,7 @@ void WindowRideConstructionKeyboardShortcutSlopeDown()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutSlopeUp()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4417,7 +4417,7 @@ void WindowRideConstructionKeyboardShortcutSlopeUp()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutChainLiftToggle()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_CHAIN_LIFT) || w->widgets[WIDX_CHAIN_LIFT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4428,7 +4428,7 @@ void WindowRideConstructionKeyboardShortcutChainLiftToggle()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutBankLeft()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT)
|
||||
|| w->widgets[WIDX_BANK_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
|
@ -4464,7 +4464,7 @@ void WindowRideConstructionKeyboardShortcutBankLeft()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutBankRight()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_BANK_STRAIGHT)
|
||||
|| w->widgets[WIDX_BANK_STRAIGHT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
|
@ -4500,7 +4500,7 @@ void WindowRideConstructionKeyboardShortcutBankRight()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutPreviousTrack()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_PREVIOUS_SECTION)
|
||||
|| w->widgets[WIDX_PREVIOUS_SECTION].type == WindowWidgetType::Empty)
|
||||
{
|
||||
|
@ -4512,7 +4512,7 @@ void WindowRideConstructionKeyboardShortcutPreviousTrack()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutNextTrack()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_NEXT_SECTION)
|
||||
|| w->widgets[WIDX_NEXT_SECTION].type == WindowWidgetType::Empty)
|
||||
{
|
||||
|
@ -4524,7 +4524,7 @@ void WindowRideConstructionKeyboardShortcutNextTrack()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutBuildCurrent()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_CONSTRUCT) || w->widgets[WIDX_CONSTRUCT].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
@ -4535,7 +4535,7 @@ void WindowRideConstructionKeyboardShortcutBuildCurrent()
|
|||
|
||||
void WindowRideConstructionKeyboardShortcutDemolishCurrent()
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::RideConstruction);
|
||||
if (w == nullptr || WidgetIsDisabled(*w, WIDX_DEMOLISH) || w->widgets[WIDX_DEMOLISH].type == WindowWidgetType::Empty)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -954,7 +954,7 @@ private:
|
|||
*
|
||||
* rct2: 0x006B30BC
|
||||
*/
|
||||
rct_window* WindowRideListOpen()
|
||||
WindowBase* WindowRideListOpen()
|
||||
{
|
||||
// Check if window is already open
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::RideList);
|
||||
|
@ -965,7 +965,7 @@ rct_window* WindowRideListOpen()
|
|||
return window;
|
||||
}
|
||||
|
||||
void WindowRideListRefreshList(rct_window* w)
|
||||
void WindowRideListRefreshList(WindowBase* w)
|
||||
{
|
||||
dynamic_cast<RideListWindow*>(w)->RefreshListWrapper();
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowSavePromptOpen()
|
||||
WindowBase* WindowSavePromptOpen()
|
||||
{
|
||||
PromptMode prompt_mode = gSavePromptMode;
|
||||
if (prompt_mode == PromptMode::Quit)
|
||||
|
@ -218,7 +218,7 @@ rct_window* WindowSavePromptOpen()
|
|||
}
|
||||
|
||||
// Check if window is already open
|
||||
rct_window* window = WindowBringToFrontByClass(WindowClass::SavePrompt);
|
||||
WindowBase* window = WindowBringToFrontByClass(WindowClass::SavePrompt);
|
||||
if (window != nullptr)
|
||||
{
|
||||
WindowClose(*window);
|
||||
|
|
|
@ -112,17 +112,17 @@ static constexpr const StringId ScenarioOriginStringIds[] = {
|
|||
STR_SCENARIO_CATEGORY_OTHER_PARKS,
|
||||
};
|
||||
|
||||
static void WindowScenarioselectInitTabs(rct_window *w);
|
||||
static void WindowScenarioselectInitTabs(WindowBase *w);
|
||||
|
||||
static void WindowScenarioselectClose(rct_window *w);
|
||||
static void WindowScenarioselectMouseup(rct_window *w, WidgetIndex widgetIndex);
|
||||
static void WindowScenarioselectMousedown(rct_window *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowScenarioselectScrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowScenarioselectScrollmousedown(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowScenarioselectScrollmouseover(rct_window *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowScenarioselectInvalidate(rct_window *w);
|
||||
static void WindowScenarioselectPaint(rct_window *w, DrawPixelInfo *dpi);
|
||||
static void WindowScenarioselectScrollpaint(rct_window *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
static void WindowScenarioselectClose(WindowBase *w);
|
||||
static void WindowScenarioselectMouseup(WindowBase *w, WidgetIndex widgetIndex);
|
||||
static void WindowScenarioselectMousedown(WindowBase *w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowScenarioselectScrollgetsize(WindowBase *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void WindowScenarioselectScrollmousedown(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowScenarioselectScrollmouseover(WindowBase *w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowScenarioselectInvalidate(WindowBase *w);
|
||||
static void WindowScenarioselectPaint(WindowBase *w, DrawPixelInfo *dpi);
|
||||
static void WindowScenarioselectScrollpaint(WindowBase *w, DrawPixelInfo *dpi, int32_t scrollIndex);
|
||||
|
||||
static bool ScenarioSelectUseSmallFont()
|
||||
{
|
||||
|
@ -143,17 +143,17 @@ static WindowEventList window_scenarioselect_events([](auto& events)
|
|||
});
|
||||
// clang-format on
|
||||
|
||||
static void DrawCategoryHeading(rct_window* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId);
|
||||
static void InitialiseListItems(rct_window* w);
|
||||
static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenario);
|
||||
static bool IsLockingEnabled(rct_window* w);
|
||||
static void DrawCategoryHeading(WindowBase* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId);
|
||||
static void InitialiseListItems(WindowBase* w);
|
||||
static bool IsScenarioVisible(WindowBase* w, const scenario_index_entry* scenario);
|
||||
static bool IsLockingEnabled(WindowBase* w);
|
||||
|
||||
static std::function<void(std::string_view)> _callback;
|
||||
static bool _showLockedInformation = false;
|
||||
static bool _titleEditor = false;
|
||||
static bool _disableLocking{};
|
||||
|
||||
rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor)
|
||||
WindowBase* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor)
|
||||
{
|
||||
if (_titleEditor != titleEditor)
|
||||
{
|
||||
|
@ -173,9 +173,9 @@ rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titl
|
|||
*
|
||||
* rct2: 0x006781B5
|
||||
*/
|
||||
rct_window* WindowScenarioselectOpen(std::function<void(std::string_view)> callback, bool titleEditor, bool disableLocking)
|
||||
WindowBase* WindowScenarioselectOpen(std::function<void(std::string_view)> callback, bool titleEditor, bool disableLocking)
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
_callback = callback;
|
||||
_disableLocking = disableLocking;
|
||||
|
@ -200,7 +200,7 @@ rct_window* WindowScenarioselectOpen(std::function<void(std::string_view)> callb
|
|||
*
|
||||
* rct2: 0x00677C8A
|
||||
*/
|
||||
static void WindowScenarioselectInitTabs(rct_window* w)
|
||||
static void WindowScenarioselectInitTabs(WindowBase* w)
|
||||
{
|
||||
int32_t showPages = 0;
|
||||
size_t numScenarios = ScenarioRepositoryGetCount();
|
||||
|
@ -254,13 +254,13 @@ static void WindowScenarioselectInitTabs(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowScenarioselectClose(rct_window* w)
|
||||
static void WindowScenarioselectClose(WindowBase* w)
|
||||
{
|
||||
_listItems.clear();
|
||||
_listItems.shrink_to_fit();
|
||||
}
|
||||
|
||||
static void WindowScenarioselectMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowScenarioselectMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
if (widgetIndex == WIDX_CLOSE)
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ static void WindowScenarioselectMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowScenarioselectMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowScenarioselectMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
if (widgetIndex >= WIDX_TAB1 && widgetIndex <= WIDX_TAB10)
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ static int32_t GetScenarioListItemSize()
|
|||
return lineHeight;
|
||||
}
|
||||
|
||||
static void WindowScenarioselectScrollgetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
static void WindowScenarioselectScrollgetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
const int32_t scenarioItemHeight = GetScenarioListItemSize();
|
||||
|
||||
|
@ -323,7 +323,7 @@ static void WindowScenarioselectScrollgetsize(rct_window* w, int32_t scrollIndex
|
|||
*
|
||||
* rct2: 0x6780FE
|
||||
*/
|
||||
static void WindowScenarioselectScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowScenarioselectScrollmousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
const int32_t scenarioItemHeight = GetScenarioListItemSize();
|
||||
|
||||
|
@ -360,7 +360,7 @@ static void WindowScenarioselectScrollmousedown(rct_window* w, int32_t scrollInd
|
|||
*
|
||||
* rct2: 0x678162
|
||||
*/
|
||||
static void WindowScenarioselectScrollmouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowScenarioselectScrollmouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
const int32_t scenarioItemHeight = GetScenarioListItemSize();
|
||||
|
||||
|
@ -407,7 +407,7 @@ static void WindowScenarioselectScrollmouseover(rct_window* w, int32_t scrollInd
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowScenarioselectInvalidate(rct_window* w)
|
||||
static void WindowScenarioselectInvalidate(WindowBase* w)
|
||||
{
|
||||
w->pressed_widgets &= ~(
|
||||
(1uLL << WIDX_CLOSE) | (1uLL << WIDX_TAB1) | (1uLL << WIDX_TAB2) | (1uLL << WIDX_TAB3) | (1uLL << WIDX_TAB4)
|
||||
|
@ -423,7 +423,7 @@ static void WindowScenarioselectInvalidate(rct_window* w)
|
|||
window_scenarioselect_widgets[WIDX_SCENARIOLIST].bottom = w->height - bottomMargin;
|
||||
}
|
||||
|
||||
static void WindowScenarioselectPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowScenarioselectPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
int32_t format;
|
||||
const scenario_index_entry* scenario;
|
||||
|
@ -552,7 +552,7 @@ static void WindowScenarioselectPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowScenarioselectScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
static void WindowScenarioselectScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light;
|
||||
GfxClear(dpi, paletteIndex);
|
||||
|
@ -645,7 +645,7 @@ static void WindowScenarioselectScrollpaint(rct_window* w, DrawPixelInfo* dpi, i
|
|||
}
|
||||
}
|
||||
|
||||
static void DrawCategoryHeading(rct_window* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId)
|
||||
static void DrawCategoryHeading(WindowBase* w, DrawPixelInfo* dpi, int32_t left, int32_t right, int32_t y, StringId stringId)
|
||||
{
|
||||
colour_t baseColour = w->colours[1];
|
||||
colour_t lightColour = ColourMapA[baseColour].lighter;
|
||||
|
@ -684,7 +684,7 @@ static void DrawCategoryHeading(rct_window* w, DrawPixelInfo* dpi, int32_t left,
|
|||
GfxDrawLine(dpi, { darkLineLeftTop2, darkLineRightBottom2 }, darkColour);
|
||||
}
|
||||
|
||||
static void InitialiseListItems(rct_window* w)
|
||||
static void InitialiseListItems(WindowBase* w)
|
||||
{
|
||||
size_t numScenarios = ScenarioRepositoryGetCount();
|
||||
_listItems.clear();
|
||||
|
@ -810,7 +810,7 @@ static void InitialiseListItems(rct_window* w)
|
|||
}
|
||||
}
|
||||
|
||||
static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenario)
|
||||
static bool IsScenarioVisible(WindowBase* w, const scenario_index_entry* scenario)
|
||||
{
|
||||
if (gConfigGeneral.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN || _titleEditor)
|
||||
{
|
||||
|
@ -834,7 +834,7 @@ static bool IsScenarioVisible(rct_window* w, const scenario_index_entry* scenari
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool IsLockingEnabled(rct_window* w)
|
||||
static bool IsLockingEnabled(WindowBase* w)
|
||||
{
|
||||
if (gConfigGeneral.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN)
|
||||
return false;
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
void OnUpdate() override
|
||||
{
|
||||
const CursorState* state = ContextGetCursorState();
|
||||
rct_window* other = WindowFindFromPoint(state->position);
|
||||
WindowBase* other = WindowFindFromPoint(state->position);
|
||||
if (other == this)
|
||||
{
|
||||
ScreenCoordsXY window = state->position - ScreenCoordsXY{ windowPos.x - 26, windowPos.y };
|
||||
|
@ -1347,7 +1347,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowSceneryOpen()
|
||||
WindowBase* WindowSceneryOpen()
|
||||
{
|
||||
auto* w = static_cast<SceneryWindow*>(WindowBringToFrontByClass(WindowClass::Scenery));
|
||||
if (w == nullptr)
|
||||
|
|
|
@ -52,7 +52,7 @@ static Widget window_scenery_scatter_widgets[] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
class SceneryScatterWindow final : public rct_window
|
||||
class SceneryScatterWindow final : public WindowBase
|
||||
{
|
||||
public:
|
||||
void OnOpen() override
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowSceneryScatterOpen()
|
||||
WindowBase* WindowSceneryScatterOpen()
|
||||
{
|
||||
// Check if window is already open
|
||||
auto* window = WindowFindByClass(WindowClass::SceneryScatter);
|
||||
|
|
|
@ -73,19 +73,19 @@ static Widget window_server_list_widgets[] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
static void WindowServerListClose(rct_window* w);
|
||||
static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowServerListResize(rct_window* w);
|
||||
static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowServerListUpdate(rct_window* w);
|
||||
static void WindowServerListScrollGetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height);
|
||||
static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, char* text);
|
||||
static OpenRCT2String WindowServerListTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback);
|
||||
static void WindowServerListInvalidate(rct_window* w);
|
||||
static void WindowServerListPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowServerListScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex);
|
||||
static void WindowServerListClose(WindowBase* w);
|
||||
static void WindowServerListMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowServerListResize(WindowBase* w);
|
||||
static void WindowServerListDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowServerListUpdate(WindowBase* w);
|
||||
static void WindowServerListScrollGetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height);
|
||||
static void WindowServerListScrollMousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowServerListScrollMouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowServerListTextinput(WindowBase* w, WidgetIndex widgetIndex, char* text);
|
||||
static OpenRCT2String WindowServerListTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback);
|
||||
static void WindowServerListInvalidate(WindowBase* w);
|
||||
static void WindowServerListPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
static void WindowServerListScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex);
|
||||
|
||||
static WindowEventList window_server_list_events([](auto& events) {
|
||||
events.close = &WindowServerListClose;
|
||||
|
@ -114,11 +114,11 @@ static std::string _version;
|
|||
|
||||
static void JoinServer(std::string address);
|
||||
static void ServerListFetchServersBegin();
|
||||
static void ServerListFetchServersCheck(rct_window* w);
|
||||
static void ServerListFetchServersCheck(WindowBase* w);
|
||||
|
||||
rct_window* WindowServerListOpen()
|
||||
WindowBase* WindowServerListOpen()
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
// Check if window is already open
|
||||
window = WindowBringToFrontByClass(WindowClass::ServerList);
|
||||
|
@ -153,13 +153,13 @@ rct_window* WindowServerListOpen()
|
|||
return window;
|
||||
}
|
||||
|
||||
static void WindowServerListClose(rct_window* w)
|
||||
static void WindowServerListClose(WindowBase* w)
|
||||
{
|
||||
_serverList = {};
|
||||
_fetchFuture = {};
|
||||
}
|
||||
|
||||
static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowServerListMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -200,12 +200,12 @@ static void WindowServerListMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowServerListResize(rct_window* w)
|
||||
static void WindowServerListResize(WindowBase* w)
|
||||
{
|
||||
WindowSetResize(*w, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX);
|
||||
}
|
||||
|
||||
static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowServerListDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
auto serverIndex = w->selected_list_item;
|
||||
if (serverIndex >= 0 && serverIndex < static_cast<int32_t>(_serverList.GetCount()))
|
||||
|
@ -235,7 +235,7 @@ static void WindowServerListDropdown(rct_window* w, WidgetIndex widgetIndex, int
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowServerListUpdate(rct_window* w)
|
||||
static void WindowServerListUpdate(WindowBase* w)
|
||||
{
|
||||
if (gCurrentTextBox.window.classification == w->classification && gCurrentTextBox.window.number == w->number)
|
||||
{
|
||||
|
@ -245,13 +245,13 @@ static void WindowServerListUpdate(rct_window* w)
|
|||
ServerListFetchServersCheck(w);
|
||||
}
|
||||
|
||||
static void WindowServerListScrollGetsize(rct_window* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
static void WindowServerListScrollGetsize(WindowBase* w, int32_t scrollIndex, int32_t* width, int32_t* height)
|
||||
{
|
||||
*width = 0;
|
||||
*height = w->no_list_items * ITEM_HEIGHT;
|
||||
}
|
||||
|
||||
static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowServerListScrollMousedown(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
int32_t serverIndex = w->selected_list_item;
|
||||
if (serverIndex >= 0 && serverIndex < static_cast<int32_t>(_serverList.GetCount()))
|
||||
|
@ -275,7 +275,7 @@ static void WindowServerListScrollMousedown(rct_window* w, int32_t scrollIndex,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowServerListScrollMouseover(WindowBase* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
auto& listWidget = w->widgets[WIDX_LIST];
|
||||
|
||||
|
@ -303,7 +303,7 @@ static void WindowServerListScrollMouseover(rct_window* w, int32_t scrollIndex,
|
|||
}
|
||||
}
|
||||
|
||||
static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, char* text)
|
||||
static void WindowServerListTextinput(WindowBase* w, WidgetIndex widgetIndex, char* text)
|
||||
{
|
||||
if (text == nullptr || text[0] == 0)
|
||||
return;
|
||||
|
@ -343,14 +343,14 @@ static void WindowServerListTextinput(rct_window* w, WidgetIndex widgetIndex, ch
|
|||
}
|
||||
}
|
||||
|
||||
static OpenRCT2String WindowServerListTooltip(rct_window* const w, const WidgetIndex widgetIndex, StringId fallback)
|
||||
static OpenRCT2String WindowServerListTooltip(WindowBase* const w, const WidgetIndex widgetIndex, StringId fallback)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<char*>(_version.c_str());
|
||||
return { fallback, ft };
|
||||
}
|
||||
|
||||
static void WindowServerListInvalidate(rct_window* w)
|
||||
static void WindowServerListInvalidate(WindowBase* w)
|
||||
{
|
||||
w->ResizeFrame();
|
||||
|
||||
|
@ -374,7 +374,7 @@ static void WindowServerListInvalidate(rct_window* w)
|
|||
w->no_list_items = static_cast<uint16_t>(_serverList.GetCount());
|
||||
}
|
||||
|
||||
static void WindowServerListPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowServerListPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
WindowDrawWidgets(*w, dpi);
|
||||
|
||||
|
@ -394,7 +394,7 @@ static void WindowServerListPaint(rct_window* w, DrawPixelInfo* dpi)
|
|||
DrawTextBasic(dpi, w->windowPos + ScreenCoordsXY{ 8, w->height - 15 }, _statusText, ft, { COLOUR_WHITE });
|
||||
}
|
||||
|
||||
static void WindowServerListScrollpaint(rct_window* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
static void WindowServerListScrollpaint(WindowBase* w, DrawPixelInfo* dpi, int32_t scrollIndex)
|
||||
{
|
||||
uint8_t paletteIndex = ColourMapA[w->colours[1]].mid_light;
|
||||
GfxClear(dpi, paletteIndex);
|
||||
|
@ -566,7 +566,7 @@ static void ServerListFetchServersBegin()
|
|||
});
|
||||
}
|
||||
|
||||
static void ServerListFetchServersCheck(rct_window* w)
|
||||
static void ServerListFetchServersCheck(WindowBase* w)
|
||||
{
|
||||
if (_fetchFuture.valid())
|
||||
{
|
||||
|
|
|
@ -299,7 +299,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowServerStartOpen()
|
||||
WindowBase* WindowServerStartOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<ServerStartWindow>(WindowClass::ServerStart, WW, WH, WF_CENTRE_SCREEN);
|
||||
}
|
||||
|
|
|
@ -546,7 +546,7 @@ void ChangeShortcutWindow::NotifyShortcutKeysWindow()
|
|||
}
|
||||
}
|
||||
|
||||
rct_window* WindowShortcutKeysOpen()
|
||||
WindowBase* WindowShortcutKeysOpen()
|
||||
{
|
||||
auto w = WindowBringToFrontByClass(WindowClass::KeyboardShortcutList);
|
||||
if (w == nullptr)
|
||||
|
|
|
@ -316,7 +316,7 @@ public:
|
|||
*
|
||||
* rct2: 0x006BA305
|
||||
*/
|
||||
rct_window* WindowSignOpen(rct_windownumber number)
|
||||
WindowBase* WindowSignOpen(rct_windownumber number)
|
||||
{
|
||||
auto* w = static_cast<SignWindow*>(WindowBringToFrontByNumber(WindowClass::Banner, number));
|
||||
|
||||
|
@ -339,7 +339,7 @@ rct_window* WindowSignOpen(rct_windownumber number)
|
|||
*
|
||||
* rct2: 0x6E5F52
|
||||
*/
|
||||
rct_window* WindowSignSmallOpen(rct_windownumber number)
|
||||
WindowBase* WindowSignSmallOpen(rct_windownumber number)
|
||||
{
|
||||
auto* w = static_cast<SignWindow*>(WindowBringToFrontByNumber(WindowClass::Banner, number));
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ private:
|
|||
pickupAction.SetCallback([peepnum = number](const GameAction* ga, const GameActions::Result* result) {
|
||||
if (result->Error != GameActions::Status::Ok)
|
||||
return;
|
||||
rct_window* wind = WindowFindByNumber(WindowClass::Peep, peepnum);
|
||||
WindowBase* wind = WindowFindByNumber(WindowClass::Peep, peepnum);
|
||||
if (wind != nullptr)
|
||||
{
|
||||
ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker);
|
||||
|
@ -1189,7 +1189,7 @@ private:
|
|||
|
||||
void FollowPeep()
|
||||
{
|
||||
rct_window* main = WindowGetMain();
|
||||
WindowBase* main = WindowGetMain();
|
||||
WindowFollowSprite(*main, EntityId::FromUnderlying(number));
|
||||
}
|
||||
|
||||
|
@ -1233,7 +1233,7 @@ private:
|
|||
static constexpr int32_t TabAnimationFrames = 7;
|
||||
};
|
||||
|
||||
rct_window* WindowStaffOpen(Peep* peep)
|
||||
WindowBase* WindowStaffOpen(Peep* peep)
|
||||
{
|
||||
auto w = static_cast<StaffWindow*>(WindowBringToFrontByNumber(WindowClass::Peep, peep->sprite_index.ToUnderlying()));
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowStaffFirePromptOpen(Peep* peep)
|
||||
WindowBase* WindowStaffFirePromptOpen(Peep* peep)
|
||||
{
|
||||
// Check if the confirm window already exists
|
||||
auto* window = WindowFocusOrCreate<StaffFirePromptWindow>(
|
||||
|
|
|
@ -702,7 +702,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowStaffListOpen()
|
||||
WindowBase* WindowStaffListOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<StaffListWindow>(WindowClass::StaffList, WW, WH, WF_10 | WF_RESIZABLE);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ static Widget window_text_input_widgets[] = {
|
|||
class TextInputWindow final : public Window
|
||||
{
|
||||
private:
|
||||
widget_identifier _parentWidget{};
|
||||
WidgetIdentifier _parentWidget{};
|
||||
|
||||
std::string _title;
|
||||
StringId _titleStringId = STR_NONE;
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
SetParentWindow(nullptr, 0);
|
||||
}
|
||||
|
||||
void SetParentWindow(rct_window* parentWindow, WidgetIndex widgetIndex)
|
||||
void SetParentWindow(WindowBase* parentWindow, WidgetIndex widgetIndex)
|
||||
{
|
||||
// Save calling window details so that the information can be passed back to the correct window & widget
|
||||
if (parentWindow == nullptr)
|
||||
|
@ -364,7 +364,7 @@ private:
|
|||
return _parentWidget.window.classification != WindowClass::Null;
|
||||
}
|
||||
|
||||
rct_window* GetParentWindow() const
|
||||
WindowBase* GetParentWindow() const
|
||||
{
|
||||
return HasParentWindow() ? WindowFindByNumber(_parentWidget.window.classification, _parentWidget.window.number)
|
||||
: nullptr;
|
||||
|
@ -372,7 +372,7 @@ private:
|
|||
};
|
||||
|
||||
void WindowTextInputRawOpen(
|
||||
rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
const_utf8string existing_text, int32_t maxLength)
|
||||
{
|
||||
WindowCloseByClass(WindowClass::Textinput);
|
||||
|
@ -402,14 +402,14 @@ void WindowTextInputOpen(
|
|||
}
|
||||
|
||||
void WindowTextInputOpen(
|
||||
rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
StringId existing_text, uintptr_t existing_args, int32_t maxLength)
|
||||
{
|
||||
auto existingText = FormatStringID(existing_text, &existing_args);
|
||||
WindowTextInputRawOpen(call_w, call_widget, title, description, descriptionArgs, existingText.c_str(), maxLength);
|
||||
}
|
||||
|
||||
void WindowTextInputKey(rct_window* w, uint32_t keycode)
|
||||
void WindowTextInputKey(WindowBase* w, uint32_t keycode)
|
||||
{
|
||||
const auto wndNumber = w->number;
|
||||
const auto wndClass = w->classification;
|
||||
|
|
|
@ -882,9 +882,9 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowThemesOpen()
|
||||
WindowBase* WindowThemesOpen()
|
||||
{
|
||||
rct_window* window;
|
||||
WindowBase* window;
|
||||
|
||||
// Check if window is already open
|
||||
window = WindowBringToFrontByClass(WindowClass::Themes);
|
||||
|
|
|
@ -2337,9 +2337,9 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowTileInspectorOpen()
|
||||
WindowBase* WindowTileInspectorOpen()
|
||||
{
|
||||
rct_window* window = WindowBringToFrontByClass(WindowClass::TileInspector);
|
||||
WindowBase* window = WindowBringToFrontByClass(WindowClass::TileInspector);
|
||||
if (window == nullptr)
|
||||
window = WindowCreate<TileInspector>(WindowClass::TileInspector, ScreenCoordsXY(0, 29), WW, WH, WF_RESIZABLE);
|
||||
return window;
|
||||
|
|
|
@ -58,7 +58,7 @@ class TitleExitWindow final : public Window
|
|||
* Creates the window containing the exit button on the title screen.
|
||||
* rct2: 0x0066B624 (part of 0x0066B3E8)
|
||||
*/
|
||||
rct_window* WindowTitleExitOpen()
|
||||
WindowBase* WindowTitleExitOpen()
|
||||
{
|
||||
return WindowCreate<TitleExitWindow>(
|
||||
WindowClass::TitleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), 40, 64,
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowTitleLogoOpen()
|
||||
WindowBase* WindowTitleLogoOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::TitleLogo);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
void OnMouseUp(WidgetIndex widgetIndex) override
|
||||
{
|
||||
rct_window* windowToOpen = nullptr;
|
||||
WindowBase* windowToOpen = nullptr;
|
||||
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -279,7 +279,7 @@ public:
|
|||
/**
|
||||
* Creates the window containing the menu buttons on the title screen.
|
||||
*/
|
||||
rct_window* WindowTitleMenuOpen()
|
||||
WindowBase* WindowTitleMenuOpen()
|
||||
{
|
||||
const uint16_t windowHeight = MenuButtonDims.height + UpdateButtonDims.height;
|
||||
return WindowCreate<TitleMenuWindow>(
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
/**
|
||||
* Creates the window containing the options button on the title screen.
|
||||
*/
|
||||
rct_window* WindowTitleOptionsOpen()
|
||||
WindowBase* WindowTitleOptionsOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::TitleOptions);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -146,7 +146,7 @@ void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoord
|
|||
WindowCreate(std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height, WF_TRANSPARENT | WF_STICK_TO_FRONT);
|
||||
}
|
||||
|
||||
void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (widgetWindow == nullptr || widgetIndex == -1)
|
||||
return;
|
||||
|
|
|
@ -278,16 +278,16 @@ static Widget window_top_toolbar_widgets[] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
static void WindowTopToolbarMouseup(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowTopToolbarMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowTopToolbarDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowTopToolbarToolUpdate(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolDown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolUp(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoordsy);
|
||||
static void WindowTopToolbarToolAbort(rct_window* w, WidgetIndex widgetIndex);
|
||||
static void WindowTopToolbarInvalidate(rct_window* w);
|
||||
static void WindowTopToolbarPaint(rct_window* w, DrawPixelInfo* dpi);
|
||||
static void WindowTopToolbarMouseup(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowTopToolbarMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget);
|
||||
static void WindowTopToolbarDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex);
|
||||
static void WindowTopToolbarToolUpdate(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolDown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolDrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
static void WindowTopToolbarToolUp(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoordsy);
|
||||
static void WindowTopToolbarToolAbort(WindowBase* w, WidgetIndex widgetIndex);
|
||||
static void WindowTopToolbarInvalidate(WindowBase* w);
|
||||
static void WindowTopToolbarPaint(WindowBase* w, DrawPixelInfo* dpi);
|
||||
|
||||
static WindowEventList window_top_toolbar_events([](auto& events) {
|
||||
events.mouse_up = &WindowTopToolbarMouseup;
|
||||
|
@ -302,25 +302,25 @@ static WindowEventList window_top_toolbar_events([](auto& events) {
|
|||
events.paint = &WindowTopToolbarPaint;
|
||||
});
|
||||
|
||||
static void TopToolbarInitViewMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitViewMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarViewMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitMapMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitMapMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarMapMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitFastforwardMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitFastforwardMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarFastforwardMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitRotateMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitRotateMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarRotateMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitCheatsMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitCheatsMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarCheatsMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitDebugMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitDebugMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarDebugMenuDropdown(int16_t dropdownIndex);
|
||||
static void TopToolbarInitNetworkMenu(rct_window* window, Widget* widget);
|
||||
static void TopToolbarInitNetworkMenu(WindowBase* window, Widget* widget);
|
||||
static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex);
|
||||
|
||||
static void ToggleFootpathWindow();
|
||||
static void ToggleLandWindow(rct_window* topToolbar, WidgetIndex widgetIndex);
|
||||
static void ToggleClearSceneryWindow(rct_window* topToolbar, WidgetIndex widgetIndex);
|
||||
static void ToggleWaterWindow(rct_window* topToolbar, WidgetIndex widgetIndex);
|
||||
static void ToggleLandWindow(WindowBase* topToolbar, WidgetIndex widgetIndex);
|
||||
static void ToggleClearSceneryWindow(WindowBase* topToolbar, WidgetIndex widgetIndex);
|
||||
static void ToggleWaterWindow(WindowBase* topToolbar, WidgetIndex widgetIndex);
|
||||
|
||||
static money64 SelectionLowerLand(uint8_t flags);
|
||||
static money64 SelectionRaiseLand(uint8_t flags);
|
||||
|
@ -335,9 +335,9 @@ static int16_t _unkF64F0A;
|
|||
* Creates the main game top toolbar window.
|
||||
* rct2: 0x0066B485 (part of 0x0066B3E8)
|
||||
*/
|
||||
rct_window* WindowTopToolbarOpen()
|
||||
WindowBase* WindowTopToolbarOpen()
|
||||
{
|
||||
rct_window* window = WindowCreate(
|
||||
WindowBase* window = WindowCreate(
|
||||
ScreenCoordsXY(0, 0), ContextGetWidth(), TOP_TOOLBAR_HEIGHT + 1, &window_top_toolbar_events, WindowClass::TopToolbar,
|
||||
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND);
|
||||
window->widgets = window_top_toolbar_widgets;
|
||||
|
@ -351,9 +351,9 @@ rct_window* WindowTopToolbarOpen()
|
|||
*
|
||||
* rct2: 0x0066C957
|
||||
*/
|
||||
static void WindowTopToolbarMouseup(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowTopToolbarMouseup(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
rct_window* mainWindow;
|
||||
WindowBase* mainWindow;
|
||||
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -435,7 +435,7 @@ static void WindowTopToolbarMouseup(rct_window* w, WidgetIndex widgetIndex)
|
|||
*
|
||||
* rct2: 0x0066CA3B
|
||||
*/
|
||||
static void WindowTopToolbarMousedown(rct_window* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
static void WindowTopToolbarMousedown(WindowBase* w, WidgetIndex widgetIndex, Widget* widget)
|
||||
{
|
||||
int32_t numItems = 0;
|
||||
|
||||
|
@ -536,7 +536,7 @@ static void WindowTopToolbarMousedown(rct_window* w, WidgetIndex widgetIndex, Wi
|
|||
*
|
||||
* rct2: 0x0066C9EA
|
||||
*/
|
||||
static void WindowTopToolbarDropdown(rct_window* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
static void WindowTopToolbarDropdown(WindowBase* w, WidgetIndex widgetIndex, int32_t dropdownIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -657,7 +657,7 @@ static void WindowTopToolbarDropdown(rct_window* w, WidgetIndex widgetIndex, int
|
|||
*
|
||||
* rct2: 0x0066C810
|
||||
*/
|
||||
static void WindowTopToolbarInvalidate(rct_window* w)
|
||||
static void WindowTopToolbarInvalidate(WindowBase* w)
|
||||
{
|
||||
int32_t x, widgetIndex, widgetWidth, firstAlignment;
|
||||
Widget* widget;
|
||||
|
@ -870,7 +870,7 @@ static void WindowTopToolbarInvalidate(rct_window* w)
|
|||
*
|
||||
* rct2: 0x0066C8EC
|
||||
*/
|
||||
static void WindowTopToolbarPaint(rct_window* w, DrawPixelInfo* dpi)
|
||||
static void WindowTopToolbarPaint(WindowBase* w, DrawPixelInfo* dpi)
|
||||
{
|
||||
int32_t imgId;
|
||||
|
||||
|
@ -1234,7 +1234,7 @@ static void Sub6E1F34SmallScenery(
|
|||
const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outQuadrant,
|
||||
Direction* outRotation)
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
|
@ -1430,7 +1430,7 @@ static void Sub6E1F34SmallScenery(
|
|||
static void Sub6E1F34PathItem(
|
||||
const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ)
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
|
@ -1463,7 +1463,7 @@ static void Sub6E1F34PathItem(
|
|||
static void Sub6E1F34Wall(
|
||||
const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outEdges)
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
|
@ -1552,7 +1552,7 @@ static void Sub6E1F34Wall(
|
|||
static void Sub6E1F34LargeScenery(
|
||||
const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, Direction* outDirection)
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
|
@ -1652,7 +1652,7 @@ static void Sub6E1F34Banner(
|
|||
const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ,
|
||||
Direction* outDirection)
|
||||
{
|
||||
rct_window* w = WindowFindByClass(WindowClass::Scenery);
|
||||
WindowBase* w = WindowFindByClass(WindowClass::Scenery);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
|
@ -1701,7 +1701,7 @@ static void Sub6E1F34Banner(
|
|||
*
|
||||
* rct2: 0x006E2CC6
|
||||
*/
|
||||
static void WindowTopToolbarSceneryToolDown(const ScreenCoordsXY& windowPos, rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowTopToolbarSceneryToolDown(const ScreenCoordsXY& windowPos, WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
SceneryRemoveGhostToolPlacement();
|
||||
if (gWindowSceneryPaintEnabled & 1)
|
||||
|
@ -2904,7 +2904,7 @@ static void TopToolbarToolUpdateScenery(const ScreenCoordsXY& screenPos)
|
|||
*
|
||||
* rct2: 0x0066CB25
|
||||
*/
|
||||
static void WindowTopToolbarToolUpdate(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowTopToolbarToolUpdate(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -2939,7 +2939,7 @@ static void WindowTopToolbarToolUpdate(rct_window* w, WidgetIndex widgetIndex, c
|
|||
*
|
||||
* rct2: 0x0066CB73
|
||||
*/
|
||||
static void WindowTopToolbarToolDown(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowTopToolbarToolDown(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -3060,7 +3060,7 @@ static money64 SelectionLowerLand(uint8_t flags)
|
|||
*/
|
||||
static void WindowTopToolbarLandToolDrag(const ScreenCoordsXY& screenPos)
|
||||
{
|
||||
rct_window* window = WindowFindFromPoint(screenPos);
|
||||
WindowBase* window = WindowFindFromPoint(screenPos);
|
||||
if (window == nullptr)
|
||||
return;
|
||||
WidgetIndex widget_index = WindowFindWidgetFromPoint(*window, screenPos);
|
||||
|
@ -3069,7 +3069,7 @@ static void WindowTopToolbarLandToolDrag(const ScreenCoordsXY& screenPos)
|
|||
const auto& widget = window->widgets[widget_index];
|
||||
if (widget.type != WindowWidgetType::Viewport)
|
||||
return;
|
||||
rct_viewport* viewport = window->viewport;
|
||||
Viewport* viewport = window->viewport;
|
||||
if (viewport == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -3103,7 +3103,7 @@ static void WindowTopToolbarLandToolDrag(const ScreenCoordsXY& screenPos)
|
|||
*/
|
||||
static void WindowTopToolbarWaterToolDrag(const ScreenCoordsXY& screenPos)
|
||||
{
|
||||
rct_window* window = WindowFindFromPoint(screenPos);
|
||||
WindowBase* window = WindowFindFromPoint(screenPos);
|
||||
if (!window)
|
||||
return;
|
||||
WidgetIndex widget_index = WindowFindWidgetFromPoint(*window, screenPos);
|
||||
|
@ -3112,7 +3112,7 @@ static void WindowTopToolbarWaterToolDrag(const ScreenCoordsXY& screenPos)
|
|||
const auto& widget = window->widgets[widget_index];
|
||||
if (widget.type != WindowWidgetType::Viewport)
|
||||
return;
|
||||
rct_viewport* viewport = window->viewport;
|
||||
Viewport* viewport = window->viewport;
|
||||
if (viewport == nullptr)
|
||||
return;
|
||||
|
||||
|
@ -3154,7 +3154,7 @@ static void WindowTopToolbarWaterToolDrag(const ScreenCoordsXY& screenPos)
|
|||
*
|
||||
* rct2: 0x0066CB4E
|
||||
*/
|
||||
static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowTopToolbarToolDrag(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -3219,7 +3219,7 @@ static void WindowTopToolbarToolDrag(rct_window* w, WidgetIndex widgetIndex, con
|
|||
*
|
||||
* rct2: 0x0066CC5B
|
||||
*/
|
||||
static void WindowTopToolbarToolUp(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
static void WindowTopToolbarToolUp(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
_landToolBlocked = false;
|
||||
switch (widgetIndex)
|
||||
|
@ -3255,7 +3255,7 @@ static void WindowTopToolbarToolUp(rct_window* w, WidgetIndex widgetIndex, const
|
|||
*
|
||||
* rct2: 0x0066CA58
|
||||
*/
|
||||
static void WindowTopToolbarToolAbort(rct_window* w, WidgetIndex widgetIndex)
|
||||
static void WindowTopToolbarToolAbort(WindowBase* w, WidgetIndex widgetIndex)
|
||||
{
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -3277,7 +3277,7 @@ static void WindowTopToolbarToolAbort(rct_window* w, WidgetIndex widgetIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void TopToolbarInitMapMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitMapMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
auto i = 0;
|
||||
gDropdownItems[i++].Format = STR_SHORTCUT_SHOW_MAP;
|
||||
|
@ -3355,7 +3355,7 @@ static void TopToolbarMapMenuDropdown(int16_t dropdownIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void TopToolbarInitFastforwardMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitFastforwardMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
int32_t num_items = 4;
|
||||
gDropdownItems[0].Format = STR_TOGGLE_OPTION;
|
||||
|
@ -3405,7 +3405,7 @@ static void TopToolbarInitFastforwardMenu(rct_window* w, Widget* widget)
|
|||
|
||||
static void TopToolbarFastforwardMenuDropdown(int16_t dropdownIndex)
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w)
|
||||
{
|
||||
if (dropdownIndex >= 0 && dropdownIndex <= 5)
|
||||
|
@ -3418,7 +3418,7 @@ static void TopToolbarFastforwardMenuDropdown(int16_t dropdownIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void TopToolbarInitRotateMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitRotateMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
gDropdownItems[0].Format = STR_ROTATE_CLOCKWISE;
|
||||
gDropdownItems[1].Format = STR_ROTATE_ANTI_CLOCKWISE;
|
||||
|
@ -3431,7 +3431,7 @@ static void TopToolbarInitRotateMenu(rct_window* w, Widget* widget)
|
|||
|
||||
static void TopToolbarRotateMenuDropdown(int16_t dropdownIndex)
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w)
|
||||
{
|
||||
if (dropdownIndex == 0)
|
||||
|
@ -3447,7 +3447,7 @@ static void TopToolbarRotateMenuDropdown(int16_t dropdownIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void TopToolbarInitCheatsMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitCheatsMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
using namespace Dropdown;
|
||||
|
||||
|
@ -3539,7 +3539,7 @@ static void TopToolbarCheatsMenuDropdown(int16_t dropdownIndex)
|
|||
}
|
||||
}
|
||||
|
||||
static void TopToolbarInitDebugMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitDebugMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
gDropdownItems[DDIDX_CONSOLE].Format = STR_TOGGLE_OPTION;
|
||||
gDropdownItems[DDIDX_CONSOLE].Args = STR_DEBUG_DROPDOWN_CONSOLE;
|
||||
|
@ -3553,7 +3553,7 @@ static void TopToolbarInitDebugMenu(rct_window* w, Widget* widget)
|
|||
Dropdown::SetChecked(DDIDX_DEBUG_PAINT, WindowFindByClass(WindowClass::DebugPaint) != nullptr);
|
||||
}
|
||||
|
||||
static void TopToolbarInitNetworkMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitNetworkMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
gDropdownItems[DDIDX_MULTIPLAYER].Format = STR_MULTIPLAYER;
|
||||
gDropdownItems[DDIDX_MULTIPLAYER_RECONNECT].Format = STR_MULTIPLAYER_RECONNECT;
|
||||
|
@ -3569,7 +3569,7 @@ static void TopToolbarInitNetworkMenu(rct_window* w, Widget* widget)
|
|||
|
||||
static void TopToolbarDebugMenuDropdown(int16_t dropdownIndex)
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w != nullptr)
|
||||
{
|
||||
switch (dropdownIndex)
|
||||
|
@ -3596,7 +3596,7 @@ static void TopToolbarDebugMenuDropdown(int16_t dropdownIndex)
|
|||
|
||||
static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex)
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w != nullptr)
|
||||
{
|
||||
switch (dropdownIndex)
|
||||
|
@ -3615,7 +3615,7 @@ static void TopToolbarNetworkMenuDropdown(int16_t dropdownIndex)
|
|||
*
|
||||
* rct2: 0x0066CDE4
|
||||
*/
|
||||
static void TopToolbarInitViewMenu(rct_window* w, Widget* widget)
|
||||
static void TopToolbarInitViewMenu(WindowBase* w, Widget* widget)
|
||||
{
|
||||
using namespace Dropdown;
|
||||
constexpr ItemExt items[] = {
|
||||
|
@ -3652,7 +3652,7 @@ static void TopToolbarInitViewMenu(rct_window* w, Widget* widget)
|
|||
TOP_TOOLBAR_VIEW_MENU_COUNT);
|
||||
|
||||
// Set checkmarks
|
||||
rct_viewport* mainViewport = WindowGetMain()->viewport;
|
||||
Viewport* mainViewport = WindowGetMain()->viewport;
|
||||
if (mainViewport->flags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
Dropdown::SetChecked(DDIDX_UNDERGROUND_INSIDE, true);
|
||||
if (gConfigGeneral.TransparentWater)
|
||||
|
@ -3703,7 +3703,7 @@ static void TopToolbarInitViewMenu(rct_window* w, Widget* widget)
|
|||
*/
|
||||
static void TopToolbarViewMenuDropdown(int16_t dropdownIndex)
|
||||
{
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
if (w != nullptr)
|
||||
{
|
||||
switch (dropdownIndex)
|
||||
|
@ -3799,7 +3799,7 @@ static void ToggleFootpathWindow()
|
|||
*
|
||||
* rct2: 0x0066CD54
|
||||
*/
|
||||
static void ToggleLandWindow(rct_window* topToolbar, WidgetIndex widgetIndex)
|
||||
static void ToggleLandWindow(WindowBase* topToolbar, WidgetIndex widgetIndex)
|
||||
{
|
||||
if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar
|
||||
&& gCurrentToolWidget.widget_index == WIDX_LAND)
|
||||
|
@ -3820,7 +3820,7 @@ static void ToggleLandWindow(rct_window* topToolbar, WidgetIndex widgetIndex)
|
|||
*
|
||||
* rct2: 0x0066CD0C
|
||||
*/
|
||||
static void ToggleClearSceneryWindow(rct_window* topToolbar, WidgetIndex widgetIndex)
|
||||
static void ToggleClearSceneryWindow(WindowBase* topToolbar, WidgetIndex widgetIndex)
|
||||
{
|
||||
if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar
|
||||
&& gCurrentToolWidget.widget_index == WIDX_CLEAR_SCENERY))
|
||||
|
@ -3840,7 +3840,7 @@ static void ToggleClearSceneryWindow(rct_window* topToolbar, WidgetIndex widgetI
|
|||
*
|
||||
* rct2: 0x0066CD9C
|
||||
*/
|
||||
static void ToggleWaterWindow(rct_window* topToolbar, WidgetIndex widgetIndex)
|
||||
static void ToggleWaterWindow(WindowBase* topToolbar, WidgetIndex widgetIndex)
|
||||
{
|
||||
if ((InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) && gCurrentToolWidget.window_classification == WindowClass::TopToolbar
|
||||
&& gCurrentToolWidget.widget_index == WIDX_WATER)
|
||||
|
|
|
@ -89,7 +89,7 @@ static void WindowTrackDesignListReloadTracks();
|
|||
*
|
||||
* rct2: 0x006D348F
|
||||
*/
|
||||
rct_window* WindowTrackManageOpen(TrackDesignFileRef* tdFileRef)
|
||||
WindowBase* WindowTrackManageOpen(TrackDesignFileRef* tdFileRef)
|
||||
{
|
||||
WindowCloseByClass(WindowClass::ManageTrackDesign);
|
||||
auto trackDesignManageWindow = std::make_unique<TrackDesignManageWindow>(tdFileRef);
|
||||
|
@ -114,7 +114,7 @@ void TrackDesignManageWindow::OnOpen()
|
|||
|
||||
void TrackDesignManageWindow::OnClose()
|
||||
{
|
||||
rct_window* trackDesignListWindow = WindowFindByClass(WindowClass::TrackDesignList);
|
||||
WindowBase* trackDesignListWindow = WindowFindByClass(WindowClass::TrackDesignList);
|
||||
if (trackDesignListWindow != nullptr)
|
||||
{
|
||||
trackDesignListWindow->track_list.track_list_being_updated = false;
|
||||
|
@ -236,7 +236,7 @@ void TrackDeletePromptWindow::OnDraw(DrawPixelInfo& dpi)
|
|||
|
||||
static void WindowTrackDesignListReloadTracks()
|
||||
{
|
||||
rct_window* trackListWindow = WindowFindByClass(WindowClass::TrackDesignList);
|
||||
WindowBase* trackListWindow = WindowFindByClass(WindowClass::TrackDesignList);
|
||||
if (trackListWindow != nullptr)
|
||||
{
|
||||
trackListWindow->track_list.reload_track_designs = true;
|
||||
|
|
|
@ -444,7 +444,7 @@ private:
|
|||
|
||||
// Follow a single track piece shape
|
||||
const auto& ted = GetTrackElementDescriptor(trackType);
|
||||
const rct_preview_track* trackBlock = ted.Block;
|
||||
const PreviewTrack* trackBlock = ted.Block;
|
||||
while (trackBlock->index != 255)
|
||||
{
|
||||
auto rotatedAndOffsetTrackBlock = curTrackStart
|
||||
|
@ -489,7 +489,7 @@ private:
|
|||
// Change rotation and next position based on track curvature
|
||||
curTrackRotation &= 3;
|
||||
|
||||
const rct_track_coordinates* track_coordinate = &ted.Coordinates;
|
||||
const TrackCoordinates* track_coordinate = &ted.Coordinates;
|
||||
|
||||
curTrackStart += CoordsXY{ track_coordinate->x, track_coordinate->y }.Rotate(curTrackRotation);
|
||||
curTrackRotation += track_coordinate->rotation_end - track_coordinate->rotation_begin;
|
||||
|
@ -612,7 +612,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef)
|
||||
WindowBase* WindowTrackPlaceOpen(const TrackDesignFileRef* tdFileRef)
|
||||
{
|
||||
std::unique_ptr<TrackDesign> openTrackDesign = TrackDesignImport(tdFileRef->path.c_str());
|
||||
|
||||
|
|
|
@ -743,7 +743,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowTrackListOpen(const RideSelection item)
|
||||
WindowBase* WindowTrackListOpen(const RideSelection item)
|
||||
{
|
||||
WindowCloseConstructionWindows();
|
||||
ScreenCoordsXY screenPos{};
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
void OnPrepareDraw() override
|
||||
{
|
||||
uint32_t wflags = 0;
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
|
||||
pressed_widgets = 0;
|
||||
disabled_widgets = 0;
|
||||
|
@ -170,7 +170,7 @@ private:
|
|||
void ToggleViewportFlag(WidgetIndex widgetIndex)
|
||||
{
|
||||
uint32_t wflags = 0;
|
||||
rct_window* w = WindowGetMain();
|
||||
WindowBase* w = WindowGetMain();
|
||||
|
||||
if (w == nullptr)
|
||||
return;
|
||||
|
@ -244,7 +244,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowTransparencyOpen()
|
||||
WindowBase* WindowTransparencyOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::Transparency);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
case WIDX_CLIP_CHECKBOX_ENABLE:
|
||||
{
|
||||
// Toggle height clipping.
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
mainWindow->viewport->flags ^= VIEWPORT_FLAG_CLIP_VIEW;
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
|
||||
void OnMouseDown(WidgetIndex widgetIndex) override
|
||||
{
|
||||
rct_window* mainWindow;
|
||||
WindowBase* mainWindow;
|
||||
|
||||
switch (widgetIndex)
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
void OnUpdate() override
|
||||
{
|
||||
const auto& widget = widgets[WIDX_CLIP_HEIGHT_SLIDER];
|
||||
const rct_scroll* const scroll = &this->scrolls[0];
|
||||
const ScrollBar* const scroll = &this->scrolls[0];
|
||||
const int16_t scroll_width = widget.width() - 1;
|
||||
const uint8_t clip_height = static_cast<uint8_t>(
|
||||
(static_cast<float>(scroll->h_left) / (scroll->h_right - scroll_width)) * 255);
|
||||
|
@ -173,7 +173,7 @@ public:
|
|||
gClipHeight = clip_height;
|
||||
|
||||
// Update the main window accordingly.
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
mainWindow->Invalidate();
|
||||
|
@ -256,7 +256,7 @@ public:
|
|||
{
|
||||
WidgetScrollUpdateThumbs(*this, WIDX_CLIP_HEIGHT_SLIDER);
|
||||
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
WidgetSetCheckboxValue(*this, WIDX_CLIP_CHECKBOX_ENABLE, mainWindow->viewport->flags & VIEWPORT_FLAG_CLIP_VIEW);
|
||||
|
@ -355,7 +355,7 @@ public:
|
|||
WindowPushOthersBelow(*this);
|
||||
|
||||
// Get the main viewport to set the view clipping flag.
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
|
||||
// Turn on view clipping when the window is opened.
|
||||
if (mainWindow != nullptr)
|
||||
|
@ -369,7 +369,7 @@ private:
|
|||
void OnClose() override
|
||||
{
|
||||
// Turn off view clipping when the window is closed.
|
||||
rct_window* mainWindow = WindowGetMain();
|
||||
WindowBase* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
mainWindow->viewport->flags &= ~VIEWPORT_FLAG_CLIP_VIEW;
|
||||
|
@ -396,7 +396,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowViewClippingOpen()
|
||||
WindowBase* WindowViewClippingOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::ViewClipping);
|
||||
if (window == nullptr)
|
||||
|
|
|
@ -59,7 +59,7 @@ private:
|
|||
void GetFreeViewportNumber()
|
||||
{
|
||||
number = 1;
|
||||
WindowVisitEach([&](rct_window* w) {
|
||||
WindowVisitEach([&](WindowBase* w) {
|
||||
if (w != nullptr && w != this && w->classification == WindowClass::Viewport)
|
||||
{
|
||||
if (w->number >= number)
|
||||
|
@ -87,7 +87,7 @@ public:
|
|||
auto* mainWindow = WindowGetMain();
|
||||
if (mainWindow != nullptr)
|
||||
{
|
||||
rct_viewport* mainViewport = mainWindow->viewport;
|
||||
Viewport* mainViewport = mainWindow->viewport;
|
||||
int32_t x = mainViewport->viewPos.x + (mainViewport->view_width / 2);
|
||||
int32_t y = mainViewport->viewPos.y + (mainViewport->view_height / 2);
|
||||
savedViewPos = { x - (viewport->view_width / 2), y - (viewport->view_height / 2) };
|
||||
|
@ -208,7 +208,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowViewportOpen()
|
||||
WindowBase* WindowViewportOpen()
|
||||
{
|
||||
int32_t screenWidth = ContextGetWidth();
|
||||
int32_t screenHeight = ContextGetHeight();
|
||||
|
|
|
@ -185,7 +185,7 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
rct_window* WindowWaterOpen()
|
||||
WindowBase* WindowWaterOpen()
|
||||
{
|
||||
return WindowFocusOrCreate<WaterWindow>(WindowClass::Water, ScreenCoordsXY(ContextGetWidth() - WW, 29), WW, WH, 0);
|
||||
}
|
||||
|
|
|
@ -34,147 +34,147 @@ extern colour_t gWindowScenerySecondaryColour;
|
|||
extern colour_t gWindowSceneryTertiaryColour;
|
||||
extern bool gWindowSceneryEyedropperEnabled;
|
||||
|
||||
rct_window* WindowAboutOpen();
|
||||
WindowBase* WindowAboutOpen();
|
||||
void WindowCampaignRefreshRides();
|
||||
rct_window* WindowChangelogOpen(int personality);
|
||||
rct_window* WindowCheatsOpen();
|
||||
rct_window* WindowClearSceneryOpen();
|
||||
rct_window* CustomCurrencyWindowOpen();
|
||||
rct_window* WindowDebugPaintOpen();
|
||||
rct_window* WindowEditorInventionsListOpen();
|
||||
rct_window* WindowEditorMainOpen();
|
||||
rct_window* WindowEditorObjectiveOptionsOpen();
|
||||
rct_window* WindowEditorScenarioOptionsOpen();
|
||||
rct_window* WindowFootpathOpen();
|
||||
WindowBase* WindowChangelogOpen(int personality);
|
||||
WindowBase* WindowCheatsOpen();
|
||||
WindowBase* WindowClearSceneryOpen();
|
||||
WindowBase* CustomCurrencyWindowOpen();
|
||||
WindowBase* WindowDebugPaintOpen();
|
||||
WindowBase* WindowEditorInventionsListOpen();
|
||||
WindowBase* WindowEditorMainOpen();
|
||||
WindowBase* WindowEditorObjectiveOptionsOpen();
|
||||
WindowBase* WindowEditorScenarioOptionsOpen();
|
||||
WindowBase* WindowFootpathOpen();
|
||||
void WindowFootpathResetSelectedPath();
|
||||
rct_window* WindowGuestOpen(Peep* peep);
|
||||
rct_window* WindowLandOpen();
|
||||
rct_window* WindowLandRightsOpen();
|
||||
rct_window* WindowMainOpen();
|
||||
rct_window* WindowMapgenOpen();
|
||||
rct_window* WindowMultiplayerOpen();
|
||||
rct_window* WindowNewsOpen();
|
||||
rct_window* WindowNewsOptionsOpen();
|
||||
rct_window* WindowOptionsOpen();
|
||||
rct_window* WindowSavePromptOpen();
|
||||
WindowBase* WindowGuestOpen(Peep* peep);
|
||||
WindowBase* WindowLandOpen();
|
||||
WindowBase* WindowLandRightsOpen();
|
||||
WindowBase* WindowMainOpen();
|
||||
WindowBase* WindowMapgenOpen();
|
||||
WindowBase* WindowMultiplayerOpen();
|
||||
WindowBase* WindowNewsOpen();
|
||||
WindowBase* WindowNewsOptionsOpen();
|
||||
WindowBase* WindowOptionsOpen();
|
||||
WindowBase* WindowSavePromptOpen();
|
||||
#ifndef DISABLE_NETWORK
|
||||
rct_window* WindowServerListOpen();
|
||||
rct_window* WindowServerStartOpen();
|
||||
WindowBase* WindowServerListOpen();
|
||||
WindowBase* WindowServerStartOpen();
|
||||
#endif
|
||||
rct_window* WindowShortcutKeysOpen();
|
||||
rct_window* WindowStaffListOpen();
|
||||
rct_window* WindowStaffOpen(Peep* peep);
|
||||
WindowBase* WindowShortcutKeysOpen();
|
||||
WindowBase* WindowStaffListOpen();
|
||||
WindowBase* WindowStaffOpen(Peep* peep);
|
||||
void WindowStaffListRefresh();
|
||||
rct_window* WindowThemesOpen();
|
||||
rct_window* WindowTitleExitOpen();
|
||||
rct_window* WindowTitleLogoOpen();
|
||||
rct_window* WindowTitleMenuOpen();
|
||||
rct_window* WindowTitleOptionsOpen();
|
||||
rct_window* WindowViewportOpen();
|
||||
rct_window* WindowWaterOpen();
|
||||
rct_window* WindowViewClippingOpen();
|
||||
rct_window* WindowTransparencyOpen();
|
||||
rct_window* WindowAssetPacksOpen();
|
||||
WindowBase* WindowThemesOpen();
|
||||
WindowBase* WindowTitleExitOpen();
|
||||
WindowBase* WindowTitleLogoOpen();
|
||||
WindowBase* WindowTitleMenuOpen();
|
||||
WindowBase* WindowTitleOptionsOpen();
|
||||
WindowBase* WindowViewportOpen();
|
||||
WindowBase* WindowWaterOpen();
|
||||
WindowBase* WindowViewClippingOpen();
|
||||
WindowBase* WindowTransparencyOpen();
|
||||
WindowBase* WindowAssetPacksOpen();
|
||||
|
||||
// WC_FINANCES
|
||||
rct_window* WindowFinancesOpen();
|
||||
rct_window* WindowFinancesResearchOpen();
|
||||
rct_window* WindowFinancesMarketingOpen();
|
||||
WindowBase* WindowFinancesOpen();
|
||||
WindowBase* WindowFinancesResearchOpen();
|
||||
WindowBase* WindowFinancesMarketingOpen();
|
||||
|
||||
// WC_PARK_INFORMATION
|
||||
rct_window* WindowParkAwardsOpen();
|
||||
rct_window* WindowParkEntranceOpen();
|
||||
rct_window* WindowParkGuestsOpen();
|
||||
rct_window* WindowParkObjectiveOpen();
|
||||
rct_window* WindowParkRatingOpen();
|
||||
WindowBase* WindowParkAwardsOpen();
|
||||
WindowBase* WindowParkEntranceOpen();
|
||||
WindowBase* WindowParkGuestsOpen();
|
||||
WindowBase* WindowParkObjectiveOpen();
|
||||
WindowBase* WindowParkRatingOpen();
|
||||
|
||||
rct_window* WindowBannerOpen(rct_windownumber number);
|
||||
rct_window* WindowRideDemolishPromptOpen(const Ride& ride);
|
||||
rct_window* WindowRideRefurbishPromptOpen(const Ride& ride);
|
||||
rct_window* WindowSignOpen(rct_windownumber number);
|
||||
rct_window* WindowSignSmallOpen(rct_windownumber number);
|
||||
rct_window* WindowPlayerOpen(uint8_t id);
|
||||
rct_window* WindowNewCampaignOpen(int16_t campaignType);
|
||||
WindowBase* WindowBannerOpen(rct_windownumber number);
|
||||
WindowBase* WindowRideDemolishPromptOpen(const Ride& ride);
|
||||
WindowBase* WindowRideRefurbishPromptOpen(const Ride& ride);
|
||||
WindowBase* WindowSignOpen(rct_windownumber number);
|
||||
WindowBase* WindowSignSmallOpen(rct_windownumber number);
|
||||
WindowBase* WindowPlayerOpen(uint8_t id);
|
||||
WindowBase* WindowNewCampaignOpen(int16_t campaignType);
|
||||
|
||||
rct_window* WindowInstallTrackOpen(const utf8* path);
|
||||
WindowBase* WindowInstallTrackOpen(const utf8* path);
|
||||
void WindowGuestListRefreshList();
|
||||
rct_window* WindowGuestListOpen();
|
||||
rct_window* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index);
|
||||
rct_window* WindowStaffFirePromptOpen(Peep* peep);
|
||||
rct_window* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor);
|
||||
rct_window* WindowScenarioselectOpen(std::function<void(std::string_view)> callback, bool titleEditor, bool disableLocking);
|
||||
WindowBase* WindowGuestListOpen();
|
||||
WindowBase* WindowGuestListOpenWithFilter(GuestListFilterType type, int32_t index);
|
||||
WindowBase* WindowStaffFirePromptOpen(Peep* peep);
|
||||
WindowBase* WindowScenarioselectOpen(scenarioselect_callback callback, bool titleEditor);
|
||||
WindowBase* WindowScenarioselectOpen(std::function<void(std::string_view)> callback, bool titleEditor, bool disableLocking);
|
||||
|
||||
rct_window* WindowErrorOpen(StringId title, StringId message, const class Formatter& formatter);
|
||||
rct_window* WindowErrorOpen(std::string_view title, std::string_view message);
|
||||
WindowBase* WindowErrorOpen(StringId title, StringId message, const class Formatter& formatter);
|
||||
WindowBase* WindowErrorOpen(std::string_view title, std::string_view message);
|
||||
struct TrackDesign;
|
||||
rct_window* WindowLoadsaveOpen(
|
||||
WindowBase* WindowLoadsaveOpen(
|
||||
int32_t type, std::string_view defaultPath, std::function<void(int32_t result, std::string_view)> callback,
|
||||
TrackDesign* trackDesign);
|
||||
rct_window* WindowTrackPlaceOpen(const struct TrackDesignFileRef* tdFileRef);
|
||||
rct_window* WindowTrackManageOpen(struct TrackDesignFileRef* tdFileRef);
|
||||
WindowBase* WindowTrackPlaceOpen(const struct TrackDesignFileRef* tdFileRef);
|
||||
WindowBase* WindowTrackManageOpen(struct TrackDesignFileRef* tdFileRef);
|
||||
|
||||
void TrackPlaceClearProvisionalTemporarily();
|
||||
void TrackPlaceRestoreProvisional();
|
||||
|
||||
rct_window* WindowMapOpen();
|
||||
WindowBase* WindowMapOpen();
|
||||
void WindowMapReset();
|
||||
|
||||
rct_window* WindowResearchOpen();
|
||||
void WindowResearchDevelopmentPagePaint(rct_window* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex);
|
||||
void WindowResearchFundingPagePaint(rct_window* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex);
|
||||
WindowBase* WindowResearchOpen();
|
||||
void WindowResearchDevelopmentPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex);
|
||||
void WindowResearchFundingPagePaint(WindowBase* w, DrawPixelInfo* dpi, WidgetIndex baseWidgetIndex);
|
||||
|
||||
rct_window* WindowNewRideOpen();
|
||||
rct_window* WindowNewRideOpenResearch();
|
||||
WindowBase* WindowNewRideOpen();
|
||||
WindowBase* WindowNewRideOpenResearch();
|
||||
void WindowNewRideInitVars();
|
||||
void WindowNewRideFocus(RideSelection rideItem);
|
||||
|
||||
rct_window* WindowRideListOpen();
|
||||
void WindowRideListRefreshList(rct_window* w);
|
||||
WindowBase* WindowRideListOpen();
|
||||
void WindowRideListRefreshList(WindowBase* w);
|
||||
|
||||
rct_window* WindowRideMainOpen(const Ride& ride);
|
||||
rct_window* WindowRideOpenTrack(TileElement* tileElement);
|
||||
rct_window* WindowRideOpenVehicle(Vehicle* vehicle);
|
||||
WindowBase* WindowRideMainOpen(const Ride& ride);
|
||||
WindowBase* WindowRideOpenTrack(TileElement* tileElement);
|
||||
WindowBase* WindowRideOpenVehicle(Vehicle* vehicle);
|
||||
void WindowRideMeasurementsDesignCancel();
|
||||
|
||||
// rct2: 0x00F635EE
|
||||
extern RideSelection _window_track_list_item;
|
||||
rct_window* WindowTrackListOpen(RideSelection item);
|
||||
WindowBase* WindowTrackListOpen(RideSelection item);
|
||||
|
||||
void SetMapTooltip(Formatter& ft);
|
||||
const Formatter& GetMapTooltip();
|
||||
void WindowMapTooltipUpdateVisibility();
|
||||
|
||||
rct_window* WindowMazeConstructionOpen();
|
||||
WindowBase* WindowMazeConstructionOpen();
|
||||
void WindowMazeConstructionUpdatePressedWidgets();
|
||||
|
||||
rct_window* WindowNetworkStatusOpen(const std::string& text, close_callback onClose);
|
||||
rct_window* WindowNetworkStatusOpenPassword();
|
||||
WindowBase* WindowNetworkStatusOpen(const std::string& text, close_callback onClose);
|
||||
WindowBase* WindowNetworkStatusOpenPassword();
|
||||
void WindowNetworkStatusClose();
|
||||
|
||||
void WindowTextInputKey(rct_window* w, uint32_t keycode);
|
||||
void WindowTextInputKey(WindowBase* w, uint32_t keycode);
|
||||
void WindowTextInputOpen(
|
||||
rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
StringId existing_text, uintptr_t existing_args, int32_t maxLength);
|
||||
void WindowTextInputRawOpen(
|
||||
rct_window* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
WindowBase* call_w, WidgetIndex call_widget, StringId title, StringId description, const Formatter& descriptionArgs,
|
||||
const_utf8string existing_text, int32_t maxLength);
|
||||
|
||||
void WindowTextInputOpen(
|
||||
std::string_view title, std::string_view description, std::string_view initialValue, size_t maxLength,
|
||||
std::function<void(std::string_view)> okCallback, std::function<void()> cancelCallback);
|
||||
|
||||
rct_window* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects);
|
||||
WindowBase* WindowObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects);
|
||||
|
||||
rct_window* WindowRideConstructionOpen();
|
||||
WindowBase* WindowRideConstructionOpen();
|
||||
void WindowRideConstructionUpdateActiveElementsImpl();
|
||||
void WindowRideConstructionUpdateEnabledTrackPieces();
|
||||
|
||||
rct_window* WindowTopToolbarOpen();
|
||||
WindowBase* WindowTopToolbarOpen();
|
||||
bool LandToolIsActive();
|
||||
bool ClearSceneryToolIsActive();
|
||||
bool WaterToolIsActive();
|
||||
|
||||
rct_window* WindowSceneryOpen();
|
||||
WindowBase* WindowSceneryOpen();
|
||||
void WindowScenerySetSelectedItem(
|
||||
const ScenerySelection& sceneryconst, std::optional<colour_t> primary, const std::optional<colour_t> secondary,
|
||||
const std::optional<colour_t> tertiary, const std::optional<colour_t> rotation);
|
||||
|
@ -185,23 +185,23 @@ void WindowSceneryResetSelectedSceneryItems();
|
|||
const ScenerySelection WindowSceneryGetTabSelection();
|
||||
|
||||
extern uint8_t gToolbarDirtyFlags;
|
||||
rct_window* WindowGameBottomToolbarOpen();
|
||||
WindowBase* WindowGameBottomToolbarOpen();
|
||||
void WindowGameBottomToolbarInvalidateNewsItem();
|
||||
|
||||
rct_window* WindowEditorBottomToolbarOpen();
|
||||
WindowBase* WindowEditorBottomToolbarOpen();
|
||||
|
||||
rct_window* WindowTileInspectorOpen();
|
||||
WindowBase* WindowTileInspectorOpen();
|
||||
void WindowTileInspectorClearClipboard();
|
||||
|
||||
rct_window* WindowEditorObjectSelectionOpen();
|
||||
WindowBase* WindowEditorObjectSelectionOpen();
|
||||
|
||||
void WindowTooltipReset(const ScreenCoordsXY& screenCoords);
|
||||
void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoords);
|
||||
void WindowTooltipOpen(rct_window* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
void WindowTooltipClose();
|
||||
|
||||
rct_window* WindowSceneryScatterOpen();
|
||||
rct_window* WindowPatrolAreaOpen(EntityId staffId);
|
||||
WindowBase* WindowSceneryScatterOpen();
|
||||
WindowBase* WindowPatrolAreaOpen(EntityId staffId);
|
||||
EntityId WindowPatrolAreaGetCurrentStaffId();
|
||||
|
||||
// clang-format off
|
||||
|
|
|
@ -1490,25 +1490,25 @@ void ContextSetCursorTrap(bool value)
|
|||
GetContext()->GetUiContext()->SetCursorTrap(value);
|
||||
}
|
||||
|
||||
rct_window* ContextOpenWindow(WindowClass wc)
|
||||
WindowBase* ContextOpenWindow(WindowClass wc)
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
return windowManager->OpenWindow(wc);
|
||||
}
|
||||
|
||||
rct_window* ContextOpenWindowView(uint8_t wc)
|
||||
WindowBase* ContextOpenWindowView(uint8_t wc)
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
return windowManager->OpenView(wc);
|
||||
}
|
||||
|
||||
rct_window* ContextOpenDetailWindow(uint8_t type, int32_t id)
|
||||
WindowBase* ContextOpenDetailWindow(uint8_t type, int32_t id)
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
return windowManager->OpenDetails(type, id);
|
||||
}
|
||||
|
||||
rct_window* ContextOpenIntent(Intent* intent)
|
||||
WindowBase* ContextOpenIntent(Intent* intent)
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
return windowManager->OpenIntent(intent);
|
||||
|
@ -1526,7 +1526,7 @@ void ContextForceCloseWindowByClass(WindowClass windowClass)
|
|||
windowManager->ForceClose(windowClass);
|
||||
}
|
||||
|
||||
rct_window* ContextShowError(StringId title, StringId message, const Formatter& args)
|
||||
WindowBase* ContextShowError(StringId title, StringId message, const Formatter& args)
|
||||
{
|
||||
auto windowManager = GetContext()->GetUiContext()->GetWindowManager();
|
||||
return windowManager->ShowError(title, message, args);
|
||||
|
|
|
@ -31,7 +31,7 @@ struct ITrackDesignRepository;
|
|||
struct IGameStateSnapshots;
|
||||
|
||||
class Intent;
|
||||
struct rct_window;
|
||||
struct WindowBase;
|
||||
struct NewVersionInfo;
|
||||
|
||||
struct TTFFontDescriptor;
|
||||
|
@ -210,11 +210,11 @@ int32_t ContextGetWidth();
|
|||
int32_t ContextGetHeight();
|
||||
bool ContextHasFocus();
|
||||
void ContextSetCursorTrap(bool value);
|
||||
rct_window* ContextOpenWindow(WindowClass wc);
|
||||
rct_window* ContextOpenDetailWindow(uint8_t type, int32_t id);
|
||||
rct_window* ContextOpenWindowView(uint8_t view);
|
||||
rct_window* ContextShowError(StringId title, StringId message, const class Formatter& args);
|
||||
rct_window* ContextOpenIntent(Intent* intent);
|
||||
WindowBase* ContextOpenWindow(WindowClass wc);
|
||||
WindowBase* ContextOpenDetailWindow(uint8_t type, int32_t id);
|
||||
WindowBase* ContextOpenWindowView(uint8_t view);
|
||||
WindowBase* ContextShowError(StringId title, StringId message, const class Formatter& args);
|
||||
WindowBase* ContextOpenIntent(Intent* intent);
|
||||
void ContextBroadcastIntent(Intent* intent);
|
||||
void ContextForceCloseWindowByClass(WindowClass wc);
|
||||
void ContextUpdateMapTooltip();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue