Commit Graph
173 Commits
Author SHA1 Message Date
Michael Steenbeek 5a547fc2bb Fix return value of Widget::height() 2025-12-12 18:26:05 +01:00
Michael Steenbeek 6f24577027 Fix return value of Widget::width() 2025-11-08 10:27:58 +01:00
Gymnasiast 7c51ccde1e Rename Rect namespace to Rectangle 2025-10-23 18:44:45 +02:00
Gymnasiast 298f3fdeb1 Replace remaining rectangle flags with Rect::FillMode enum 2025-10-23 18:42:50 +02:00
Gymnasiast 679064da77 Replace INSET_RECT_FLAG_FILL_MID_LIGHT with Rect::FillBrightness enum 2025-10-23 18:42:07 +02:00
Gymnasiast 93c3d99546 Move rectangle drawing into its own namespace 2025-10-23 18:41:08 +02:00
Gymnasiast 9e9b774266 Move rectangle drawing to Rect.{cpp,h} 2025-10-23 18:40:04 +02:00
Gymnasiast a5d173efda Create border style enum for GfxFillRectInset 2025-10-23 18:40:03 +02:00
Gymnasiast daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Gymnasiast a03613df35 Change FilterPaletteID to lowerCamelCase 2025-09-23 21:09:54 +02:00
Michael Steenbeek eb38b7227f Change WindowFlag to strong enum 2025-09-20 21:46:42 +02:00
Gymnasiast a662c5ef8e Change WindowClass members to use lowerCamelCase 2025-09-17 23:18:52 +02:00
Gymnasiast c94babb06e Rename g_window_list to gWindowList 2025-09-17 23:16:17 +02:00
Gymnasiast 3a803e13e2 Change window functions to use lowerCamelCase 2025-09-17 20:10:12 +02:00
Gymnasiast d4a0bca091 Rename Window fields 2025-09-17 20:10:12 +02:00
Gymnasiast 8a7a265639 Rename member of WidgetIdentifier and WidgetRef 2025-09-17 20:10:12 +02:00
Aaron van Geffen 99065960f2 Rename InputFlags::unk{4,5} to {left,right}MousePressed 2025-09-15 22:44:39 +02:00
Aaron van Geffen 832a1d1f74 Move localisation units into OpenRCT2 namespace 2025-09-11 22:11:12 +02:00
Gymnasiast bd6ae5848c Rename remaining methods in Widget.h to lowerCamelCase 2025-06-10 23:20:18 +02:00
Gymnasiast 650fa3ae2e Rename WindowWidgetType to WidgetType and change for new code style 2025-06-10 19:55:12 +02:00
mix c37fc885c5 Prevent windows invalidating every frame if any button is pressed 2025-05-22 20:58:54 +01:00
mix 0b5fb11be9 Remove unnecessary window OnResize calls 2025-05-22 20:58:54 +01:00
Matt 6335c31336 Rename DrawPixelInfo to RenderTarget (#24339)
* Begin backend separation, rename type DrawingPixelInfo to RenderTarget

* Rename dpi variables to rt
2025-05-04 22:06:46 +00: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 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
MattandAaron van Geffen 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