2014-04-02 05:56:26 +02:00
|
|
|
/*****************************************************************************
|
2024-01-01 12:52:28 +01:00
|
|
|
* Copyright (c) 2014-2024 OpenRCT2 developers
|
2014-04-03 04:08:06 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2014-04-03 04:08:06 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2014-04-03 04:08:06 +02:00
|
|
|
*****************************************************************************/
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2021-08-21 12:55:28 +02:00
|
|
|
#pragma once
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2022-02-12 22:31:06 +01:00
|
|
|
#include "../Identifiers.h"
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../common.h"
|
2023-01-27 20:44:58 +01:00
|
|
|
#include "../drawing/ImageId.hpp"
|
2020-10-10 15:49:56 +02:00
|
|
|
#include "../localisation/Formatter.h"
|
2019-01-12 11:11:55 +01:00
|
|
|
#include "../ride/RideTypes.h"
|
2024-02-25 18:21:16 +01:00
|
|
|
#include "../util/Util.h"
|
|
|
|
#include "../windows/TileInspectorGlobals.h"
|
2019-10-19 13:07:03 +02:00
|
|
|
#include "../world/Location.hpp"
|
2020-03-15 13:19:26 +01:00
|
|
|
#include "../world/ScenerySelection.h"
|
2022-08-21 18:38:25 +02:00
|
|
|
#include "WindowClasses.h"
|
2020-11-07 13:42:04 +01:00
|
|
|
#include "ZoomLevel.h"
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2019-06-27 22:28:07 +02:00
|
|
|
#include <functional>
|
2018-06-22 22:59:46 +02:00
|
|
|
#include <limits>
|
2019-05-29 19:15:50 +02:00
|
|
|
#include <list>
|
|
|
|
#include <memory>
|
2022-10-04 23:59:46 +02:00
|
|
|
#include <utility>
|
2021-09-18 21:34:38 +02:00
|
|
|
#include <variant>
|
2018-06-22 22:59:46 +02:00
|
|
|
|
2023-01-19 09:16:44 +01:00
|
|
|
struct DrawPixelInfo;
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WindowBase;
|
2022-07-26 18:12:46 +02:00
|
|
|
struct TrackDesignFileRef;
|
2023-02-13 21:30:16 +01:00
|
|
|
struct ScenarioIndexEntry;
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WindowCloseModifier;
|
2016-10-22 18:06:27 +02:00
|
|
|
|
2020-10-10 00:12:14 +02:00
|
|
|
enum class VisibilityCache : uint8_t;
|
2020-10-11 18:01:14 +02:00
|
|
|
enum class CursorID : uint8_t;
|
2021-08-11 17:51:59 +02:00
|
|
|
enum class RideConstructionState : uint8_t;
|
2022-12-27 13:22:18 +01:00
|
|
|
enum class CloseWindowModifier : uint8_t;
|
2020-10-10 00:12:14 +02:00
|
|
|
|
2023-06-24 11:45:26 +02:00
|
|
|
constexpr uint8_t CloseButtonWidth = 10;
|
2023-05-19 10:17:38 +02:00
|
|
|
|
2024-04-14 19:27:32 +02:00
|
|
|
#define SCROLLABLE_ROW_HEIGHT 12
|
2024-04-14 18:37:01 +02:00
|
|
|
constexpr uint8_t kListRowHeight = 12;
|
2024-04-14 18:41:01 +02:00
|
|
|
constexpr uint8_t kTableCellHeight = 12;
|
2024-04-14 18:44:39 +02:00
|
|
|
constexpr uint8_t kButtonFaceHeight = 12;
|
2024-04-14 18:56:33 +02:00
|
|
|
constexpr uint8_t kSpinnerHeight = 12;
|
2024-04-14 19:27:32 +02:00
|
|
|
constexpr uint8_t kDropdownHeight = 12;
|
2017-10-17 14:23:11 +02:00
|
|
|
|
2024-04-14 19:41:28 +02:00
|
|
|
constexpr uint16_t kTextInputSize = 1024;
|
|
|
|
constexpr uint16_t kTopToolbarHeight = 27;
|
2017-04-14 19:17:38 +02:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
using rct_windownumber = uint16_t;
|
2022-08-21 18:49:23 +02:00
|
|
|
using WidgetIndex = int16_t;
|
2014-04-11 18:38:15 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WindowIdentifier
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2022-08-21 18:38:25 +02:00
|
|
|
WindowClass classification;
|
2017-06-06 23:24:18 +02:00
|
|
|
rct_windownumber number;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-11 18:38:15 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WidgetIdentifier
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowIdentifier window;
|
2022-08-21 18:49:23 +02:00
|
|
|
WidgetIndex widget_index;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-11 18:38:15 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
extern WindowCloseModifier gLastCloseModifier;
|
2015-06-06 23:04:53 +02:00
|
|
|
|
2018-07-31 16:25:50 +02:00
|
|
|
using WidgetFlags = uint32_t;
|
2018-03-25 23:04:36 +02:00
|
|
|
namespace WIDGET_FLAGS
|
|
|
|
{
|
2018-03-26 00:27:19 +02:00
|
|
|
const WidgetFlags TEXT_IS_STRING = 1 << 0;
|
2020-02-15 16:07:10 +01:00
|
|
|
const WidgetFlags IS_PRESSED = 1 << 2;
|
|
|
|
const WidgetFlags IS_DISABLED = 1 << 3;
|
2020-05-01 01:06:58 +02:00
|
|
|
const WidgetFlags TOOLTIP_IS_STRING = 1 << 4;
|
2021-01-23 13:21:18 +01:00
|
|
|
const WidgetFlags IS_HIDDEN = 1 << 5;
|
2021-02-04 01:25:34 +01:00
|
|
|
const WidgetFlags IS_HOLDABLE = 1 << 6;
|
2018-07-31 17:59:48 +02:00
|
|
|
} // namespace WIDGET_FLAGS
|
2018-03-25 23:04:36 +02:00
|
|
|
|
2020-11-27 04:14:20 +01:00
|
|
|
enum class WindowWidgetType : uint8_t;
|
|
|
|
|
2022-12-24 16:50:29 +01:00
|
|
|
struct Widget
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2022-12-24 16:50:29 +01:00
|
|
|
WindowWidgetType type;
|
|
|
|
uint8_t colour;
|
|
|
|
int16_t left;
|
|
|
|
int16_t right;
|
|
|
|
int16_t top;
|
|
|
|
int16_t bottom;
|
2018-06-22 22:59:46 +02:00
|
|
|
union
|
2022-12-24 16:50:29 +01:00
|
|
|
{
|
2018-06-20 17:28:51 +02:00
|
|
|
uint32_t content;
|
2022-12-24 17:47:22 +01:00
|
|
|
ImageId image;
|
|
|
|
StringId text;
|
2018-06-22 22:59:46 +02:00
|
|
|
utf8* string;
|
2017-06-06 23:24:18 +02:00
|
|
|
};
|
2022-12-24 16:50:29 +01:00
|
|
|
StringId tooltip;
|
2018-03-25 23:04:36 +02:00
|
|
|
|
|
|
|
// New properties
|
2020-02-22 19:04:27 +01:00
|
|
|
WidgetFlags flags{};
|
2020-05-01 01:06:58 +02:00
|
|
|
utf8* sztooltip{};
|
2020-06-25 03:44:00 +02:00
|
|
|
|
|
|
|
int16_t width() const
|
|
|
|
{
|
|
|
|
return right - left;
|
|
|
|
}
|
|
|
|
|
|
|
|
int16_t height() const
|
|
|
|
{
|
|
|
|
return bottom - top;
|
|
|
|
}
|
2020-06-25 10:31:15 +02:00
|
|
|
|
|
|
|
int16_t midX() const
|
|
|
|
{
|
|
|
|
return (left + right) / 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
int16_t midY() const
|
|
|
|
{
|
|
|
|
return (top + bottom) / 2;
|
|
|
|
}
|
2020-06-26 19:33:04 +02:00
|
|
|
|
|
|
|
int16_t textTop() const
|
|
|
|
{
|
|
|
|
if (height() >= 10)
|
|
|
|
return std::max<int32_t>(top, top + (height() / 2) - 5);
|
2021-09-15 22:22:15 +02:00
|
|
|
|
|
|
|
return top - 1;
|
2020-06-26 19:33:04 +02:00
|
|
|
}
|
2021-01-23 13:21:18 +01:00
|
|
|
|
2024-04-20 18:44:51 +02:00
|
|
|
void moveRight(int32_t amount)
|
|
|
|
{
|
|
|
|
left += amount;
|
|
|
|
right += amount;
|
|
|
|
}
|
|
|
|
|
|
|
|
void moveDown(int32_t amount)
|
|
|
|
{
|
|
|
|
top += amount;
|
|
|
|
bottom += amount;
|
|
|
|
}
|
|
|
|
|
2021-01-23 13:21:18 +01:00
|
|
|
bool IsVisible() const
|
|
|
|
{
|
|
|
|
return !(flags & WIDGET_FLAGS::IS_HIDDEN);
|
|
|
|
}
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-02 05:56:26 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-03 04:08:06 +02:00
|
|
|
* Viewport structure
|
|
|
|
*/
|
2023-01-21 20:57:17 +01:00
|
|
|
struct Viewport
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2024-02-18 01:42:52 +01:00
|
|
|
int32_t width{};
|
|
|
|
int32_t height{};
|
|
|
|
ScreenCoordsXY pos{};
|
|
|
|
ScreenCoordsXY viewPos{};
|
|
|
|
int32_t view_width{};
|
|
|
|
int32_t view_height{};
|
|
|
|
uint32_t flags{};
|
|
|
|
ZoomLevel zoom{};
|
|
|
|
uint8_t rotation{};
|
|
|
|
VisibilityCache visibility{};
|
2020-10-13 03:25:11 +02:00
|
|
|
|
|
|
|
// Use this function on coordinates that are relative to the viewport zoom i.e. a peeps x, y position after transforming
|
|
|
|
// from its x, y, z
|
|
|
|
[[nodiscard]] constexpr bool Contains(const ScreenCoordsXY& vpos) const
|
|
|
|
{
|
|
|
|
return (
|
|
|
|
vpos.y >= viewPos.y && vpos.y < viewPos.y + view_height && vpos.x >= viewPos.x && vpos.x < viewPos.x + view_width);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Use this function on coordinates that are relative to the screen that is been drawn i.e. the cursor position
|
|
|
|
[[nodiscard]] constexpr bool ContainsScreen(const ScreenCoordsXY& sPos) const
|
|
|
|
{
|
|
|
|
return (sPos.x >= pos.x && sPos.x < pos.x + width && sPos.y >= pos.y && sPos.y < pos.y + height);
|
|
|
|
}
|
|
|
|
|
|
|
|
[[nodiscard]] ScreenCoordsXY ScreenToViewportCoord(const ScreenCoordsXY& screenCoord) const;
|
2021-02-10 00:54:59 +01:00
|
|
|
|
|
|
|
void Invalidate() const;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2014-04-24 19:53:42 +02:00
|
|
|
/**
|
|
|
|
* Scroll structure
|
|
|
|
* size: 0x12
|
|
|
|
*/
|
2023-01-21 20:57:17 +01:00
|
|
|
struct ScrollBar
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2023-02-28 05:20:31 +01:00
|
|
|
uint16_t flags{};
|
|
|
|
int32_t h_left{};
|
|
|
|
int32_t h_right{};
|
|
|
|
int32_t h_thumb_left{};
|
|
|
|
int32_t h_thumb_right{};
|
|
|
|
int32_t v_top{};
|
|
|
|
int32_t v_bottom{};
|
|
|
|
int32_t v_thumb_top{};
|
|
|
|
int32_t v_thumb_bottom{};
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2023-02-28 05:20:31 +01:00
|
|
|
constexpr auto WINDOW_SCROLL_UNDEFINED = std::numeric_limits<int32_t>::max();
|
2018-05-16 22:22:17 +02:00
|
|
|
|
2021-09-21 11:06:04 +02:00
|
|
|
struct Focus
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2021-09-18 21:34:38 +02:00
|
|
|
using CoordinateFocus = CoordsXYZ;
|
2022-02-12 22:31:06 +01:00
|
|
|
using EntityFocus = EntityId;
|
2014-08-22 13:24:00 +02:00
|
|
|
|
2021-09-28 18:09:40 +02:00
|
|
|
ZoomLevel zoom{};
|
2021-09-18 21:34:38 +02:00
|
|
|
std::variant<CoordinateFocus, EntityFocus> data;
|
2014-08-22 13:24:00 +02:00
|
|
|
|
2021-09-28 18:09:40 +02:00
|
|
|
template<typename T> constexpr explicit Focus(T newValue, ZoomLevel newZoom = {})
|
2021-09-18 21:34:38 +02:00
|
|
|
{
|
|
|
|
data = newValue;
|
|
|
|
zoom = newZoom;
|
|
|
|
}
|
2014-08-22 13:24:00 +02:00
|
|
|
|
2021-09-18 21:34:38 +02:00
|
|
|
CoordsXYZ GetPos() const;
|
|
|
|
|
2021-09-21 11:06:04 +02:00
|
|
|
constexpr bool operator==(const Focus& other) const
|
2019-03-09 13:29:33 +01:00
|
|
|
{
|
2021-09-18 21:34:38 +02:00
|
|
|
if (zoom != other.zoom)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return data == other.data;
|
|
|
|
}
|
2021-09-21 11:06:04 +02:00
|
|
|
constexpr bool operator!=(const Focus& other) const
|
2021-09-18 21:34:38 +02:00
|
|
|
{
|
|
|
|
return !(*this == other);
|
|
|
|
}
|
2019-03-09 13:29:33 +01:00
|
|
|
};
|
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WindowCloseModifier
|
2022-12-27 13:22:18 +01:00
|
|
|
{
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowIdentifier window;
|
2022-12-27 13:22:18 +01:00
|
|
|
CloseWindowModifier modifier;
|
|
|
|
};
|
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
struct WindowBase;
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2020-03-01 20:32:35 +01:00
|
|
|
#define RCT_WINDOW_RIGHT(w) ((w)->windowPos.x + (w)->width)
|
|
|
|
#define RCT_WINDOW_BOTTOM(w) ((w)->windowPos.y + (w)->height)
|
2014-07-20 08:46:29 +02:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum WINDOW_FLAGS
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
/*
|
|
|
|
WF_TIMEOUT_SHL = 0,
|
|
|
|
WF_TIMEOUT_MASK = 7,
|
|
|
|
WF_DRAGGING = 1 << 3,
|
|
|
|
WF_SCROLLER_UP = 1 << 4,
|
|
|
|
WF_SCROLLER_DOWN = 1 << 5,
|
|
|
|
WF_SCROLLER_MIDDLE = 1 << 6,
|
|
|
|
WF_DISABLE_VP_SCROLL = 1 << 9,
|
|
|
|
*/
|
|
|
|
|
|
|
|
WF_STICK_TO_BACK = (1 << 0),
|
|
|
|
WF_STICK_TO_FRONT = (1 << 1),
|
|
|
|
WF_NO_SCROLLING = (1 << 2), // User is unable to scroll this viewport
|
|
|
|
WF_SCROLLING_TO_LOCATION = (1 << 3),
|
|
|
|
WF_TRANSPARENT = (1 << 4),
|
|
|
|
WF_NO_BACKGROUND = (1 << 5), // Instead of half transparency, completely remove the window background
|
2023-06-27 02:50:29 +02:00
|
|
|
WF_DEAD = (1U << 6), // Window is closed and will be deleted in the next update.
|
2017-06-06 23:24:18 +02:00
|
|
|
WF_7 = (1 << 7),
|
|
|
|
WF_RESIZABLE = (1 << 8),
|
|
|
|
WF_NO_AUTO_CLOSE = (1 << 9), // Don't auto close this window if too many windows are open
|
|
|
|
WF_10 = (1 << 10),
|
|
|
|
WF_WHITE_BORDER_ONE = (1 << 12),
|
|
|
|
WF_WHITE_BORDER_MASK = (1 << 12) | (1 << 13),
|
|
|
|
|
2021-01-10 22:50:04 +01:00
|
|
|
WF_NO_SNAPPING = (1 << 15),
|
|
|
|
|
|
|
|
// Create only flags
|
|
|
|
WF_AUTO_POSITION = (1 << 16),
|
|
|
|
WF_CENTRE_SCREEN = (1 << 17),
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2014-04-02 05:56:26 +02:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum SCROLL_FLAGS
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
HSCROLLBAR_VISIBLE = (1 << 0),
|
|
|
|
HSCROLLBAR_THUMB_PRESSED = (1 << 1),
|
|
|
|
HSCROLLBAR_LEFT_PRESSED = (1 << 2),
|
|
|
|
HSCROLLBAR_RIGHT_PRESSED = (1 << 3),
|
|
|
|
VSCROLLBAR_VISIBLE = (1 << 4),
|
|
|
|
VSCROLLBAR_THUMB_PRESSED = (1 << 5),
|
|
|
|
VSCROLLBAR_UP_PRESSED = (1 << 6),
|
|
|
|
VSCROLLBAR_DOWN_PRESSED = (1 << 7),
|
2014-04-11 18:38:15 +02:00
|
|
|
};
|
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
#define SCROLLBAR_SIZE 16
|
2014-04-11 18:38:15 +02:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
SCROLL_PART_NONE = -1,
|
|
|
|
SCROLL_PART_VIEW = 0,
|
|
|
|
SCROLL_PART_HSCROLLBAR_LEFT = 1,
|
|
|
|
SCROLL_PART_HSCROLLBAR_RIGHT = 2,
|
|
|
|
SCROLL_PART_HSCROLLBAR_LEFT_TROUGH = 3,
|
|
|
|
SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH = 4,
|
|
|
|
SCROLL_PART_HSCROLLBAR_THUMB = 5,
|
|
|
|
SCROLL_PART_VSCROLLBAR_TOP = 6,
|
|
|
|
SCROLL_PART_VSCROLLBAR_BOTTOM = 7,
|
|
|
|
SCROLL_PART_VSCROLLBAR_TOP_TROUGH = 8,
|
|
|
|
SCROLL_PART_VSCROLLBAR_BOTTOM_TROUGH = 9,
|
|
|
|
SCROLL_PART_VSCROLLBAR_THUMB = 10,
|
2014-04-11 18:38:15 +02:00
|
|
|
};
|
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-09-05 20:55:18 +02:00
|
|
|
WV_PARK_AWARDS,
|
|
|
|
WV_PARK_RATING,
|
|
|
|
WV_PARK_OBJECTIVE,
|
|
|
|
WV_PARK_GUESTS,
|
2017-10-07 01:28:00 +02:00
|
|
|
WV_FINANCES_RESEARCH,
|
|
|
|
WV_RIDE_RESEARCH,
|
2017-10-21 18:12:15 +02:00
|
|
|
WV_MAZE_CONSTRUCTION,
|
2017-10-21 19:30:03 +02:00
|
|
|
WV_NETWORK_PASSWORD,
|
2017-11-15 02:29:34 +01:00
|
|
|
WV_EDITOR_BOTTOM_TOOLBAR,
|
2020-08-13 22:57:14 +02:00
|
|
|
WV_CHANGELOG,
|
|
|
|
WV_NEW_VERSION_INFO,
|
2022-11-18 13:26:52 +01:00
|
|
|
WV_FINANCE_MARKETING,
|
2023-01-13 23:47:46 +01:00
|
|
|
WV_CONTRIBUTORS,
|
2017-09-05 20:55:18 +02:00
|
|
|
};
|
|
|
|
|
2022-08-21 18:38:25 +02:00
|
|
|
enum WindowDetail
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2017-09-06 15:09:18 +02:00
|
|
|
WD_BANNER,
|
2017-09-06 16:09:35 +02:00
|
|
|
WD_NEW_CAMPAIGN,
|
|
|
|
WD_DEMOLISH_RIDE,
|
2018-03-29 11:17:54 +02:00
|
|
|
WD_REFURBISH_RIDE,
|
2017-09-06 15:09:18 +02:00
|
|
|
WD_SIGN,
|
|
|
|
WD_SIGN_SMALL,
|
|
|
|
|
|
|
|
WD_PLAYER,
|
2017-10-21 16:03:33 +02:00
|
|
|
|
|
|
|
WD_VEHICLE,
|
|
|
|
WD_TRACK,
|
2022-08-21 18:38:25 +02:00
|
|
|
|
|
|
|
WD_NULL = 255,
|
2017-09-06 15:09:18 +02:00
|
|
|
};
|
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
#define validate_global_widx(wc, widx) \
|
|
|
|
static_assert(widx == wc##__##widx, "Global WIDX of " #widx " doesn't match actual value.")
|
|
|
|
|
2024-02-25 18:21:16 +01:00
|
|
|
constexpr int32_t WC_MAIN_WINDOW__0 = 0;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_PAUSE = 0;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_LAND = 8;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_WATER = 9;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_SCENERY = 10;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_PATH = 11;
|
|
|
|
constexpr int32_t WC_TOP_TOOLBAR__WIDX_CLEAR_SCENERY = 17;
|
|
|
|
constexpr int32_t WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT = 25;
|
|
|
|
constexpr int32_t WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE = 30;
|
|
|
|
constexpr int32_t WC_RIDE_CONSTRUCTION__WIDX_EXIT = 31;
|
|
|
|
constexpr int32_t WC_RIDE_CONSTRUCTION__WIDX_ROTATE = 32;
|
|
|
|
constexpr int32_t WC_MAZE_CONSTRUCTION__WIDX_MAZE_DIRECTION_GROUPBOX = WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT;
|
|
|
|
constexpr int32_t WC_MAZE_CONSTRUCTION__WIDX_MAZE_ENTRANCE = WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE;
|
|
|
|
constexpr int32_t WC_MAZE_CONSTRUCTION__WIDX_MAZE_EXIT = WC_RIDE_CONSTRUCTION__WIDX_EXIT;
|
2024-02-28 20:38:43 +01:00
|
|
|
constexpr int32_t WC_SCENERY__WIDX_SCENERY_TAB_1 = 15;
|
2024-02-25 18:21:16 +01:00
|
|
|
constexpr int32_t WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON = 5;
|
|
|
|
constexpr int32_t WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON = 10;
|
|
|
|
constexpr int32_t WC_PEEP__WIDX_PATROL = 10;
|
|
|
|
constexpr int32_t WC_PEEP__WIDX_ACTION_LBL = 13;
|
|
|
|
constexpr int32_t WC_PEEP__WIDX_PICKUP = 14;
|
|
|
|
constexpr int32_t WC_TRACK_DESIGN_LIST__WIDX_ROTATE = 8;
|
|
|
|
constexpr int32_t WC_TRACK_DESIGN_PLACE__WIDX_ROTATE = 3;
|
|
|
|
constexpr int32_t WC_MAP__WIDX_ROTATE_90 = 24;
|
|
|
|
constexpr int32_t WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 = 22;
|
|
|
|
constexpr int32_t WC_STAFF__WIDX_PICKUP = 9;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE = 13;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_COPY = 16;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE = 15;
|
2024-03-22 15:24:10 +01:00
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_SORT = 14;
|
2024-02-25 18:21:16 +01:00
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE = 10;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP = 11;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN = 12;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_INCREASE = 5;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_DECREASE = 6;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_INCREASE = 8;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_DECREASE = 9;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SURFACE = EnumValue(TileInspectorPage::Surface);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_PATH = EnumValue(TileInspectorPage::Path);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_PATH_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_PATH_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_TRACK = EnumValue(TileInspectorPage::Track);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_TRACK_SPINNER_HEIGHT_INCREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_TRACK_SPINNER_HEIGHT_DECREASE = 29;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SCENERY = EnumValue(TileInspectorPage::Scenery);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SCENERY_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SCENERY_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_ENTRANCE = EnumValue(TileInspectorPage::Entrance);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_ENTRANCE_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_ENTRANCE_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_WALL = EnumValue(TileInspectorPage::Wall);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_WALL_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_WALL_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_LARGE_SCENERY = EnumValue(TileInspectorPage::LargeScenery);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_LARGE_SCENERY_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_LARGE_SCENERY_SPINNER_HEIGHT_DECREASE = 28;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_BANNER = EnumValue(TileInspectorPage::Banner);
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BANNER_SPINNER_HEIGHT_INCREASE = 27;
|
|
|
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BANNER_SPINNER_HEIGHT_DECREASE = 28;
|
2018-06-22 22:59:46 +02:00
|
|
|
|
2020-10-03 04:04:59 +02:00
|
|
|
enum class PromptMode : uint8_t
|
2018-06-22 22:59:46 +02:00
|
|
|
{
|
2020-10-03 04:04:59 +02:00
|
|
|
SaveBeforeLoad = 0,
|
|
|
|
SaveBeforeQuit,
|
|
|
|
SaveBeforeQuit2,
|
2023-01-06 12:56:46 +01:00
|
|
|
SaveBeforeNewGame,
|
2020-10-03 04:04:59 +02:00
|
|
|
Quit
|
2014-05-24 01:00:58 +02:00
|
|
|
};
|
2014-05-07 22:16:57 +02:00
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum BTM_TOOLBAR_DIRTY_FLAGS
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
BTM_TB_DIRTY_FLAG_MONEY = (1 << 0),
|
|
|
|
BTM_TB_DIRTY_FLAG_DATE = (1 << 1),
|
|
|
|
BTM_TB_DIRTY_FLAG_PEEP_COUNT = (1 << 2),
|
|
|
|
BTM_TB_DIRTY_FLAG_CLIMATE = (1 << 3),
|
|
|
|
BTM_TB_DIRTY_FLAG_PARK_RATING = (1 << 4)
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2015-01-07 21:25:48 +01:00
|
|
|
|
2015-08-16 17:36:57 +02:00
|
|
|
// 000N_TTTL
|
2018-06-22 22:59:46 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
LOADSAVETYPE_LOAD = 0 << 0,
|
|
|
|
LOADSAVETYPE_SAVE = 1 << 0,
|
|
|
|
|
|
|
|
LOADSAVETYPE_GAME = 0 << 1,
|
|
|
|
LOADSAVETYPE_LANDSCAPE = 1 << 1,
|
|
|
|
LOADSAVETYPE_SCENARIO = 2 << 1,
|
|
|
|
LOADSAVETYPE_TRACK = 3 << 1,
|
2018-08-15 22:23:33 +02:00
|
|
|
LOADSAVETYPE_HEIGHTMAP = 4 << 1,
|
2015-02-14 03:16:03 +01:00
|
|
|
};
|
|
|
|
|
2018-06-22 22:59:46 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
MODAL_RESULT_FAIL = -1,
|
|
|
|
MODAL_RESULT_CANCEL,
|
|
|
|
MODAL_RESULT_OK
|
2015-11-02 21:43:55 +01:00
|
|
|
};
|
2015-06-24 18:22:12 +02:00
|
|
|
|
2020-10-10 00:12:14 +02:00
|
|
|
enum class VisibilityCache : uint8_t
|
2016-07-06 00:02:23 +02:00
|
|
|
{
|
2020-10-10 00:12:14 +02:00
|
|
|
Unknown,
|
|
|
|
Visible,
|
|
|
|
Covered
|
2016-07-06 00:02:23 +02:00
|
|
|
};
|
|
|
|
|
2022-12-27 13:22:18 +01:00
|
|
|
enum class CloseWindowModifier : uint8_t
|
|
|
|
{
|
|
|
|
None,
|
|
|
|
Shift,
|
|
|
|
Control
|
|
|
|
};
|
|
|
|
|
2020-09-02 17:50:16 +02:00
|
|
|
enum class GuestListFilterType : int32_t
|
2016-09-03 14:54:59 +02:00
|
|
|
{
|
2020-09-02 17:50:16 +02:00
|
|
|
GuestsOnRide,
|
|
|
|
GuestsInQueue,
|
|
|
|
GuestsThinkingAboutRide,
|
|
|
|
GuestsThinkingX,
|
2016-09-03 14:54:59 +02:00
|
|
|
};
|
|
|
|
|
2020-12-23 05:11:15 +01:00
|
|
|
enum class Tool
|
|
|
|
{
|
|
|
|
Arrow = 0,
|
|
|
|
UpArrow = 2,
|
|
|
|
UpDownArrow = 3,
|
|
|
|
Picker = 7,
|
|
|
|
Crosshair = 12,
|
|
|
|
PathDown = 17,
|
|
|
|
DigDown = 18,
|
|
|
|
WaterDown = 19,
|
|
|
|
WalkDown = 22,
|
|
|
|
PaintDown = 23,
|
|
|
|
EntranceDown = 24,
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2015-11-02 21:43:55 +01:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
using modal_callback = void (*)(int32_t result);
|
2018-02-14 09:42:26 +01:00
|
|
|
using close_callback = void (*)();
|
2016-03-23 00:27:49 +01:00
|
|
|
|
2024-04-26 17:28:16 +02:00
|
|
|
constexpr int8_t kWindowLimitMin = 4;
|
2024-04-26 17:35:42 +02:00
|
|
|
constexpr int8_t kWindowLimitMax = 64;
|
2024-04-26 17:51:20 +02:00
|
|
|
constexpr int8_t kWindowLimitReserved = 4; // Used to reserve room for the main viewport, toolbars, etc.
|
2016-04-14 23:53:00 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
extern WindowBase* gWindowAudioExclusive;
|
2018-01-15 06:34:56 +01:00
|
|
|
|
2024-02-13 20:03:30 +01:00
|
|
|
extern uint32_t gWindowUpdateTicks;
|
2021-01-23 07:45:14 +01:00
|
|
|
namespace MapFlashingFlags
|
|
|
|
{
|
|
|
|
constexpr uint16_t GuestListOpen = (1 << 0);
|
|
|
|
constexpr uint16_t FlashGuests = (1 << 1);
|
|
|
|
constexpr uint16_t StaffListOpen = (1 << 2);
|
|
|
|
constexpr uint16_t FlashStaff = (1 << 3);
|
|
|
|
constexpr uint16_t SwitchColour = (1 << 15); // Every couple ticks the colour switches
|
|
|
|
} // namespace MapFlashingFlags
|
2018-06-20 17:28:51 +02:00
|
|
|
extern uint16_t gWindowMapFlashingFlags;
|
2016-04-24 22:49:09 +02:00
|
|
|
|
2016-08-06 02:32:40 +02:00
|
|
|
extern colour_t gCurrentWindowColours[4];
|
|
|
|
|
2016-09-03 15:22:03 +02:00
|
|
|
extern bool gDisableErrorWindowSound;
|
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
std::list<std::shared_ptr<WindowBase>>::iterator WindowGetIterator(const WindowBase* w);
|
|
|
|
void WindowVisitEach(std::function<void(WindowBase*)> func);
|
2019-05-29 19:15:50 +02:00
|
|
|
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowDispatchUpdateAll();
|
|
|
|
void WindowUpdateAllViewports();
|
|
|
|
void WindowUpdateAll();
|
2024-02-25 23:18:38 +01:00
|
|
|
void WindowNotifyLanguageChange();
|
2016-05-30 19:13:54 +02:00
|
|
|
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowSetWindowLimit(int32_t value);
|
2016-05-30 19:13:54 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowBase* WindowBringToFront(WindowBase& w);
|
|
|
|
WindowBase* WindowBringToFrontByClass(WindowClass cls);
|
|
|
|
WindowBase* WindowBringToFrontByClassWithFlags(WindowClass cls, uint16_t flags);
|
|
|
|
WindowBase* WindowBringToFrontByNumber(WindowClass cls, rct_windownumber number);
|
2021-01-25 22:57:06 +01:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowBase* WindowCreate(
|
|
|
|
std::unique_ptr<WindowBase>&& w, WindowClass cls, ScreenCoordsXY pos, int32_t width, int32_t height, uint32_t flags);
|
2023-04-11 23:47:53 +02:00
|
|
|
template<typename T, typename... TArgs, typename std::enable_if<std::is_base_of<WindowBase, T>::value>::type* = nullptr>
|
|
|
|
T* WindowCreate(
|
|
|
|
WindowClass cls, const ScreenCoordsXY& pos = {}, int32_t width = 0, int32_t height = 0, uint32_t flags = 0, TArgs&&... args)
|
2021-01-10 12:41:55 +01:00
|
|
|
{
|
2023-04-11 23:47:53 +02:00
|
|
|
return static_cast<T*>(WindowCreate(std::make_unique<T>(std::forward<TArgs>(args)...), cls, pos, width, height, flags));
|
2021-01-10 12:41:55 +01:00
|
|
|
}
|
2023-01-21 20:57:17 +01:00
|
|
|
template<typename T, typename... TArgs, typename std::enable_if<std::is_base_of<WindowBase, T>::value>::type* = nullptr>
|
2023-04-06 16:35:02 +02:00
|
|
|
T* WindowCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags, TArgs&&... args)
|
2021-01-10 22:50:04 +01:00
|
|
|
{
|
2022-10-04 23:59:46 +02:00
|
|
|
return static_cast<T*>(
|
|
|
|
WindowCreate(std::make_unique<T>(std::forward<TArgs>(args)...), cls, {}, width, height, flags | WF_AUTO_POSITION));
|
2021-01-10 22:50:04 +01:00
|
|
|
}
|
2023-01-21 20:57:17 +01:00
|
|
|
template<typename T, typename std::enable_if<std::is_base_of<WindowBase, T>::value>::type* = nullptr>
|
2022-08-21 18:38:25 +02:00
|
|
|
T* WindowFocusOrCreate(WindowClass cls, const ScreenCoordsXY& pos, int32_t width, int32_t height, uint32_t flags = 0)
|
2021-02-01 14:33:22 +01:00
|
|
|
{
|
2023-01-16 21:13:42 +01:00
|
|
|
auto* w = WindowBringToFrontByClass(cls);
|
2021-02-01 14:33:22 +01:00
|
|
|
if (w == nullptr)
|
|
|
|
{
|
|
|
|
w = WindowCreate<T>(cls, pos, width, height, flags);
|
|
|
|
}
|
|
|
|
return static_cast<T*>(w);
|
|
|
|
}
|
2023-01-21 20:57:17 +01:00
|
|
|
template<typename T, typename std::enable_if<std::is_base_of<WindowBase, T>::value>::type* = nullptr>
|
2022-08-21 18:38:25 +02:00
|
|
|
T* WindowFocusOrCreate(WindowClass cls, int32_t width, int32_t height, uint32_t flags = 0)
|
2021-01-25 22:57:06 +01:00
|
|
|
{
|
2023-01-16 21:13:42 +01:00
|
|
|
auto* w = WindowBringToFrontByClass(cls);
|
2021-01-25 22:57:06 +01:00
|
|
|
if (w == nullptr)
|
|
|
|
{
|
|
|
|
w = WindowCreate<T>(cls, width, height, flags);
|
|
|
|
}
|
|
|
|
return static_cast<T*>(w);
|
|
|
|
}
|
2021-01-10 12:41:55 +01:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowClose(WindowBase& window);
|
2023-06-27 02:50:29 +02:00
|
|
|
void WindowFlushDead();
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowCloseByClass(WindowClass cls);
|
|
|
|
void WindowCloseByNumber(WindowClass cls, rct_windownumber number);
|
|
|
|
void WindowCloseByNumber(WindowClass cls, EntityId number);
|
|
|
|
void WindowCloseTop();
|
|
|
|
void WindowCloseAll();
|
|
|
|
void WindowCloseAllExceptClass(WindowClass cls);
|
|
|
|
void WindowCloseAllExceptFlags(uint16_t flags);
|
|
|
|
void WindowCloseAllExceptNumberAndClass(rct_windownumber number, WindowClass cls);
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowBase* WindowFindByClass(WindowClass cls);
|
|
|
|
WindowBase* WindowFindByNumber(WindowClass cls, rct_windownumber number);
|
|
|
|
WindowBase* WindowFindByNumber(WindowClass cls, EntityId id);
|
|
|
|
WindowBase* WindowFindFromPoint(const ScreenCoordsXY& screenCoords);
|
|
|
|
WidgetIndex WindowFindWidgetFromPoint(WindowBase& w, const ScreenCoordsXY& screenCoords);
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowInvalidateByClass(WindowClass cls);
|
|
|
|
void WindowInvalidateByNumber(WindowClass cls, rct_windownumber number);
|
|
|
|
void WindowInvalidateByNumber(WindowClass cls, EntityId id);
|
|
|
|
void WindowInvalidateAll();
|
2023-01-21 20:57:17 +01:00
|
|
|
void WidgetInvalidate(WindowBase& w, WidgetIndex widgetIndex);
|
2023-01-16 21:13:42 +01:00
|
|
|
void WidgetInvalidateByClass(WindowClass cls, WidgetIndex widgetIndex);
|
|
|
|
void WidgetInvalidateByNumber(WindowClass cls, rct_windownumber number, WidgetIndex widgetIndex);
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowInitScrollWidgets(WindowBase& w);
|
|
|
|
void WindowUpdateScrollWidgets(WindowBase& w);
|
|
|
|
int32_t WindowGetScrollDataIndex(const WindowBase& w, WidgetIndex widget_index);
|
2018-06-22 22:59:46 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowPushOthersRight(WindowBase& w);
|
|
|
|
void WindowPushOthersBelow(WindowBase& w1);
|
2018-06-22 22:59:46 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
WindowBase* WindowGetMain();
|
2018-06-22 22:59:46 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowScrollToLocation(WindowBase& w, const CoordsXYZ& coords);
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowViewportGetMapCoordsByCursor(
|
2023-01-21 20:57:17 +01:00
|
|
|
const WindowBase& w, int32_t* map_x, int32_t* map_y, int32_t* offset_x, int32_t* offset_y);
|
|
|
|
void WindowViewportCentreTileAroundCursor(WindowBase& w, int32_t map_x, int32_t map_y, int32_t offset_x, int32_t offset_y);
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowCheckAllValidZoom();
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowZoomSet(WindowBase& w, ZoomLevel zoomLevel, bool atCursor);
|
|
|
|
void WindowZoomIn(WindowBase& w, bool atCursor);
|
|
|
|
void WindowZoomOut(WindowBase& w, bool atCursor);
|
2023-01-16 21:13:42 +01:00
|
|
|
void MainWindowZoom(bool zoomIn, bool atCursor);
|
|
|
|
|
2023-04-03 21:21:52 +02:00
|
|
|
void WindowDrawAll(DrawPixelInfo& dpi, int32_t left, int32_t top, int32_t right, int32_t bottom);
|
|
|
|
void WindowDraw(DrawPixelInfo& dpi, WindowBase& w, int32_t left, int32_t top, int32_t right, int32_t bottom);
|
|
|
|
void WindowDrawWidgets(WindowBase& w, DrawPixelInfo& dpi);
|
|
|
|
void WindowDrawViewport(DrawPixelInfo& dpi, WindowBase& w);
|
2014-04-08 18:52:39 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowSetPosition(WindowBase& w, const ScreenCoordsXY& screenCoords);
|
|
|
|
void WindowMovePosition(WindowBase& w, const ScreenCoordsXY& screenCoords);
|
|
|
|
void WindowResize(WindowBase& w, int32_t dw, int32_t dh);
|
|
|
|
void WindowSetResize(WindowBase& w, int32_t minWidth, int32_t minHeight, int32_t maxWidth, int32_t maxHeight);
|
2014-04-18 01:07:06 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
bool ToolSet(const WindowBase& w, WidgetIndex widgetIndex, Tool tool);
|
2023-01-16 21:13:42 +01:00
|
|
|
void ToolCancel();
|
2014-04-30 17:57:27 +02:00
|
|
|
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowCloseConstructionWindows();
|
2014-09-27 01:41:24 +02:00
|
|
|
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowUpdateViewportRideMusic();
|
2014-11-02 15:03:28 +01:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
Viewport* WindowGetViewport(WindowBase* window);
|
2018-01-05 23:31:19 +01:00
|
|
|
|
2014-04-13 23:23:56 +02:00
|
|
|
// Open window functions
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowRelocateWindows(int32_t width, int32_t height);
|
|
|
|
void WindowResizeGui(int32_t width, int32_t height);
|
|
|
|
void WindowResizeGuiScenarioEditor(int32_t width, int32_t height);
|
|
|
|
|
2020-11-04 05:52:23 +01:00
|
|
|
void InvalidateAllWindowsAfterInput();
|
2023-01-16 21:13:42 +01:00
|
|
|
void TextinputCancel();
|
2014-10-15 23:59:26 +02:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowMoveAndSnap(WindowBase& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity);
|
|
|
|
int32_t WindowCanResize(const WindowBase& w);
|
2014-11-09 18:18:51 +01:00
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
bool WindowIsVisible(WindowBase& w);
|
2023-01-16 21:13:42 +01:00
|
|
|
|
|
|
|
bool SceneryToolIsActive();
|
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
Viewport* WindowGetPreviousViewport(Viewport* current);
|
2023-01-16 21:13:42 +01:00
|
|
|
void WindowResetVisibilities();
|
|
|
|
void WindowInitAll();
|
|
|
|
|
2023-01-21 20:57:17 +01:00
|
|
|
void WindowFollowSprite(WindowBase& w, EntityId spriteIndex);
|
|
|
|
void WindowUnfollowSprite(WindowBase& w);
|
2023-01-16 21:13:42 +01:00
|
|
|
|
|
|
|
bool WindowRideConstructionUpdateState(
|
2022-01-19 17:36:26 +01:00
|
|
|
int32_t* trackType, int32_t* trackDirection, RideId* rideIndex, int32_t* _liftHillAndAlternativeState, CoordsXYZ* trackPos,
|
|
|
|
int32_t* properties);
|
2023-03-02 22:55:42 +01:00
|
|
|
money64 PlaceProvisionalTrackPiece(
|
2022-01-19 14:17:11 +01:00
|
|
|
RideId rideIndex, int32_t trackType, int32_t trackDirection, int32_t liftHillAndAlternativeState,
|
2020-05-02 14:20:00 +02:00
|
|
|
const CoordsXYZ& trackPos);
|
2017-08-02 00:20:32 +02:00
|
|
|
|
2021-08-11 17:51:59 +02:00
|
|
|
extern RideConstructionState _rideConstructionState2;
|