1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-19 22:02:57 +01:00
Commit Graph

150 Commits

Author SHA1 Message Date
Aaron van Geffen
a8267412c2 Move title height helper functions to WindowBase and fix FlexUI plugins 2025-04-11 23:26:34 +02:00
Aaron van Geffen
3f87e2b67a Centralise ResizeFrame in WindowBase and call when setting widgets or resizing 2025-04-11 20:37:54 +02:00
Michael Steenbeek
8d1bb273d8 WIP: Make title bar bigger in Enlarged UI mode 2025-02-24 18:18:12 +01:00
Aaron van Geffen
30cd526325 Window: rename WindowResize to WindowResizeByDelta to prevent mistakes (#24145) 2025-04-04 09:30:09 +02:00
Gymnasiast
2002f697e0 Refactor INPUT_FLAGS into FlagHolder 2025-03-26 13:00:54 +01:00
Gymnasiast
4badffcdb6 Change GameState_t members to lowerCamelCase 2025-03-20 23:05:57 +01:00
Michael Steenbeek
06c1fed4f7 Refactor gScreenFlags to LegacyScene enum 2025-03-05 20:45:04 +00:00
Aaron van Geffen
7a823bf928 Use WindowSetResize to set min/max dimensions in most places (#23929)
* Refactor WindowSetResize to use ScreenSize structs

* Let WindowSetResize return whether or not window was resized

* Use WindowSetResize to set min/max dimensions in most places
2025-03-05 15:58:59 +00:00
Gymnasiast
9982f74cb7 Change CloseWindowModifier members to new codestyle 2025-03-01 20:12:12 +01:00
Michael Steenbeek
e0f9a33923 Rename kCloseButtonWidth to kCloseButtonSize 2025-02-26 21:05:57 +01:00
73
c7c703515e Rename audio.h to Audio.h (#23842) 2025-02-17 13:24:03 +01:00
73
b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +00:00
Aaron van Geffen
2302f0d2e3 Rework Localisation includes (#23789)
* Clean up internal localisation header includes

* Remove some external localisation includes

* Remove dependency on FormatCodes.h from InteractiveConsole.h

* Reduce Formatter.h, Localisation.Date.h includes
2025-02-07 22:36:42 +01:00
Matt
fa0e7342ec Fix #23701: Potential crash when using mouse wheel on some widgets 2025-01-25 15:33:14 +01:00
Aaron van Geffen
cf448753c1 Move WindowInvalidate and WidgetInvalidate families into WindowManager (#23692)
* Move WindowInvalidate and WidgetInvalidate families into WindowManager

* Use InvalidateWidget shorthand in more places

* Cut back on UiContext includes

* Cut back on Window.h includes

* Remove outdated parameter comments
2025-01-25 13:46:08 +01:00
ζeh Matt
fe950f75d1 Add some assertions 2025-01-23 11:05:20 +02:00
Aaron van Geffen
a8773dd805 Move WindowClose family into WindowManager (#23646)
* Replace WindowClose() calls with Close method calls where possible

* Move WindowClose family into WindowManager

* Remove UpdateSceneryGroupIndexes hack
2025-01-19 18:49:18 +01:00
Michael Steenbeek
be9f27e4f9 Mass rename constants (#23656) 2025-01-19 15:59:45 +00:00
Aaron van Geffen
5fbe8d0ae1 Centralise external window signatures in Windows.h (#23653) 2025-01-19 15:50:54 +01:00
Aaron van Geffen
bed4d5bdca Move WindowCreate and WindowFocusOrCreate into WindowManager (#23643)
* Move WindowBringToFront into WindowManager

* Move WindowCreate and WindowFocusOrCreate into WindowManager

* Cut back on Context/UiContext includes
2025-01-19 06:58:28 -03:00
Aaron van Geffen
e1fa0b539d Move Widget, Window, Intent, MouseInput into OpenRCT2 namespace (#23642) 2025-01-18 15:29:41 +02:00
Matt
b9f6b6f754 Refactor widgets state (#23621)
* Refactor windows to not share widget state

* First half of refactoring all the windows

* Refactor the remaining windows, compiles but has issues

* Fix drawing only every second widget

* Remove the need of an terminating widget

* Address WidgetIndex signedness issues; use kWidgetIndexNull more

* Address constexpr issue with Widget content union

* Fix tabs in scenery window

* Fix tabs in object selection window

* Adjust custom widget index for CustomTool events

* Use STR_NONE for default tooltip initialisation

* Adjustment for mingw compiler

* Fix bottom toolbar using the widget declaration not instance

* Remove pointless code in Guest window, handled by SetPage

* Prevent out of bounds crash

* Move scroll widgets initialization to SetPage in Cheats window

* Remove special logic in Options window

* Remove special logic in Park window

* Remove special logic for Player window

* Remove special logic for Research window

* Remove special logic for Ride window

* Remove special logic for Staff window

* Remove special logic for Finances window

* Remove special logic for MapGen window

* Remove special logic for editor objective options window

* Remove special logic for editor scenario options window

* Fix widgets not being set since page is initialized to 0

* Remove more redundant code

* Fix remaining access to widget declarations

* Remove unused variable

* Fix editor object selection tabs on successive windows

---------

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2025-01-18 13:45:17 +01:00
Aaron van Geffen
aa45247f21 Move WindowFind functions into WindowManager (#23517)
* Move WindowFind* functions into WindowManager

* Update parameter documentation where applicable
2025-01-08 21:12:11 +01:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Michael Bernardi
1b4e611e2e Window function parameters match underlying type 2024-12-10 01:59:50 +11:00
Michael Bernardi
09fa68a803 Revert DPI accessors 2024-09-27 02:50:50 +10:00
Michael Bernardi
8212c83965 Rewrite ViewportPaint to handle new DPI coords 2024-09-27 00:07:40 +10:00
Michael Bernardi
4cd5548352 Refactor DPI to distinguish screen and world coords 2024-09-27 00:07:40 +10:00
Aaron van Geffen
aa7eb18d78 Rename ScrollBar struct to ScrollArea and rename its properties (#22539) 2024-08-11 16:21:53 +02:00
Aaron van Geffen
03bc1e5707 Introduce isToolActive function as alternative for globals (#22430)
* Introduce isToolActive function
* Ride window: use isToolActive instead of gCurrentToolWidget
* Footpath window: use isToolActive instead of gCurrentToolWidget
* Staff window: use isToolActive instead of gCurrentToolWidget
* MazeConstruction window: use isToolActive instead of gCurrentToolWidget
* Guest window: use isToolActive instead of gCurrentToolWidget
* Map window: use isToolActive instead of gCurrentToolWidget
* LandRights window: use isToolActive instead of gCurrentToolWidget
* Replace SceneryToolIsActive legacy function with calls to isToolActive
* ClearScenery window: use isToolActive instead of gCurrentToolWidget
* Scenery window: use isToolActive instead of gCurrentToolWidget
* Water window: use isToolActive instead of gCurrentToolWidget
* Land window: use isToolActive instead of gCurrentToolWidget
* Widget: replace WidgetIsActiveTool with isToolActive
* RideConstruction window: use isToolActive instead of gCurrentToolWidget
* Ride: use isToolActive instead of gCurrentToolWidget
* TrackDesignPlace window: use isToolActive instead of gCurrentToolWidget
* StaffList window: use isToolActive instead of gCurrentToolWidget
* ViewClipping window: use isToolActive instead of gCurrentToolWidget
* PatrolArea window: use isToolActive instead of gCurrentToolWidget
* TileInspector window: use isToolActive instead of gCurrentToolWidget
* Park window: use isToolActive instead of gCurrentToolWidget
2024-08-05 10:47:36 +02:00
Duncan
144fa13a84 Move more Ui functions to Ui library (#22444)
* Move various methods into the ui library

* Move various zoom functions to ui
2024-08-01 19:09:06 +00:00
Duncan
3393fa36d3 Move Ui window functions into Ui library (#22426)
* Move scroll widget functions

* Move window move functions

* De-snake

* Move further functions to ui

* Move widget function to widget file

* Move window create to ui
2024-07-31 15:06:19 +01:00
Duncan
681b54dc87 Add Some Items to the OpenRCT2::Ui namespace (#22423)
* Put widget in the Ui namespace

* Put theme in the Ui namespace

* Put objective in Ui namespace
2024-07-31 05:26:53 +01:00
Aaron van Geffen
67fa13f4ac Move window shim definitions into Widget.h (#22412)
* Move window shim definitions into Widget.h

* Remove unnecessary TileInspectorGlobals.h include from Window.h

* Remove Ride.h include from Window.h
2024-07-29 22:31:57 +02:00
Gymnasiast
8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Aaron van Geffen
5462ea00cc Fix #22102: Inverted scrollwheel behaviour on terraform tools 2024-05-25 23:18:30 +02:00
Aaron van Geffen
57bdae9d49 Refactor WindowOtherWheelInput to be safer and script window compatible 2024-05-18 15:59:12 +02:00
Aaron van Geffen
ef4cad5ee3 Move UI exclusive string ids to UiStringIds.h 2024-05-10 23:24:46 +02:00
Aaron van Geffen
96ce7f706f Move widget constants from Windows.h to Widget.h 2024-05-10 22:14:10 +02:00
Aaron van Geffen
a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Michał Janiszewski
7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Harry-Hopkinson
8ce6ba7606 Rename WINDOW_LIMIT_RESERVED to kWindowLimitReserved 2024-04-26 17:55:23 +01:00
duncanspumpkin
34fa06cd29 Address review comments 2024-04-26 18:27:15 +02:00
duncanspumpkin
788878e7fc Add missing statics 2024-04-26 18:27:15 +02:00
duncanspumpkin
bd3ae5cbb9 Simplify setting existing text 2024-04-26 18:27:14 +02:00
duncanspumpkin
3448926251 Move text input widget code from game lib to ui lib 2024-04-26 18:25:44 +02:00
Harry-Hopkinson
cd9ca1debb Rename TOP_TOOLBAR_HEIGHT to kTopToolbarHeight 2024-04-14 18:12:58 +00:00
Duncan
5a70fd97fb Move vehicle sounds update into Ui library (#21577)
* Move vehicle sounds update into Ui library

* Add missing statics

* Apply review comments

* Sprinkle some const

* Clang format accumulate
2024-03-20 11:14:52 +00:00
Michael Steenbeek
24f5675cab Remove WindowBase::IsLegacy() function (#21572) 2024-03-10 18:48:06 +01:00
Duncan
7a60e7f2e0 OpenRCT2::Ui::Windows namespace for OpenRCT2 Ui Windows (#21559)
* Move all the windows into OpenRCT2::Ui::Windows namespace

* Fix missing symbol

* Clang format

* Call the correct FormatStringID
2024-03-10 13:52:35 +00:00