1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00
Commit Graph

366 Commits

Author SHA1 Message Date
ζeh Matt
e991cfb97e Fix assertion when plugins draw custom images 2025-04-25 17:48:38 +03:00
Gymnasiast
e9e0dc7905 Fix mixup between window and viewport flags
Viewport flag (1 << 3) corresponds with VIEWPORT_FLAG_HIDE_SUPPORTS. It is very likely that the author meant to unset the window flag (1 << 3), so change it to that.
2025-04-19 14:09:17 +02:00
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
883845bcf9 Use larger cross glyph for close button when title bar is enlarged 2025-04-11 20:39:26 +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
Aaron van Geffen
99836faeff Rename Window_internal unit to WindowBase for consistency (#24163) 2025-04-06 17:43:36 +02: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
b26a2953d7 Rename IMAGE_FORMAT and its members 2025-03-26 11:59:12 +01:00
Gymnasiast
a8982ac113 Rename SCENARIO_CATEGORY and turn into strong enum 2025-03-25 15:09:23 +01:00
Aaron van Geffen
472ab1996a Order custom menus consistently by label text (#24067) 2025-03-24 17:42:05 +00:00
Gymnasiast
4badffcdb6 Change GameState_t members to lowerCamelCase 2025-03-20 23:05:57 +01:00
Gymnasiast
835f45523d Create widget type for horizontal separator 2025-03-17 22:43:09 +01:00
Aaron van Geffen
2c8c37c09d Reduce Map.h includes (#24007) 2025-03-16 18:41:51 +01:00
Michael Steenbeek
8266447904 Split LOADSAVETYPE_* into LoadSaveAction and LoadSaveType 2025-03-06 21:06:39 +00: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
9cf02f3635 Refactor MODAL_RESULT_* to enum 2025-03-01 20:12:11 +01:00
Aaron van Geffen
a380413c56 Remove Scenario.h include from many units (#23901)
* Reduce includes/dependencies for Scenario.h

* Remove Scenario.h include from many units
2025-03-01 17:32:32 +01:00
Michael Steenbeek
87bb2f10dd Introduce WindowBase::canBeResized 2025-02-26 21:05:57 +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
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
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
805c8e2a11 Plugin: allow scripts to specify tab colour maps (#23583) 2025-01-13 23:47:30 +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
Aaron van Geffen
2a3a72396b Remove ImageId::FromUInt32 and ToUInt32 (#23415)
* Allow high image ids when rendering an inline sprite

* CustomWindow: refactor use of ImageId::FromUInt32

* Dropdown: refactor use of ImageId::FromUInt32, ToUInt32

* Remove ImageId::FromUInt32

* Fix typo in mechanic status string ids

* Rewrite InventoryFormatItem to not use inline sprites any more

* Widget: replace ImageId::ToUInt32 with ImageId::GetIndex

* Remove ImageId::ToUInt32
2024-12-17 21:26:11 +01:00
mrmbernardi
1e25472ec6 Merge pull request #23350 from mrmbernardi/resize-ride-graph
Increase the maximum width of the ride graph window
2024-12-12 20:17:19 +11:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
a24dc2e60a Reduce includes in and of Util.h/cpp 2024-12-11 20:42:43 +01:00
Aaron van Geffen
5442b20a7a Move StrLogicalCmp, SafeStrCpy, SafeStrCat to String.hpp 2024-12-11 20:42:43 +01:00
Michael Bernardi
e7ca356633 Replace big window size limits with int16_t max. 2024-12-10 02:09:05 +11:00
Aaron van Geffen
3685d1a24b clang-format: change IndentPPDirectives to BeforeHash (#23287) 2024-11-29 12:04:56 +09:00
Aaron van Geffen
80b63a5ae7 Add line breaks after template declarations (#23086)
* Add line breaks after template declarations

* Additional clang-format patches
2024-10-29 16:54:01 +01:00
Aaron van Geffen
5931996edc [Plugin] Invalidate window after changing its colours 2024-10-26 23:30:17 +02:00
Michael Bernardi
09fa68a803 Revert DPI accessors 2024-09-27 02:50:50 +10:00
Michael Bernardi
8cc53324b6 Remove view width and height from Viewport struct 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
97acb793e8 Rename InteractionInfo::SpriteType to interactionType 2024-09-22 16:53:43 +02:00
Aaron van Geffen
0c97e44be0 Move GetInputManager and GetShortcutManager declarations (#22565) 2024-08-14 14:15:44 +01:00
Aaron van Geffen
aa7eb18d78 Rename ScrollBar struct to ScrollArea and rename its properties (#22539) 2024-08-11 16:21:53 +02:00
Gymnasiast
d90897fbee Refactor import flags 2024-08-07 20:15:59 +02:00
Basssiiie
e2641668a4 Fix off-by-one pixel issue in active widget width and height setters 2024-08-02 19:16:22 +00:00
Duncan
a07b56a655 Move Viewport functions into Ui (#22454)
* Move viewport functions into ui

* Move footpath function to ui

* Don't include viewport in footpath.h

* Include missing includes
2024-08-02 06:01:31 +01:00