Commit Graph
239 Commits
Author SHA1 Message Date
Gymnasiast 83cbac90ec Move stuff that affects the whole screen/viewport out of Drawing.{cpp,h} 2026-09-06 19:40:56 +02:00
Harry Hopkinson b95d24bb68 Remove openrct2-ui/windows includes 2026-08-11 22:57:19 +01:00
Harry Hopkinson d6863ccf99 Remove openrct2-ui/interface includes 2026-08-11 10:16:19 +01:00
Gymnasiast 0c4322a982 Rename members of ResizeDirection 2026-08-07 06:57:35 +02:00
Michael Steenbeek 0284f9cda6 Refactor dropdown flag to FlagHolder, reverse "stay open" flag (#26855) 2026-08-02 19:22:52 +02:00
Aaron van Geffen d517f19ce2 Use flags for widget visibility instead of empty widget type (#26801)
* Use widget visibility instead of empty widget type

* Add widget visibility helper functions

* Remove ::empty type from Banner window

* Remove ::empty type from EditorBottomToolbar window

* Remove ::empty type from ToolbarTop window

* Remove ::empty type from EditorInventionsList window

* Remove ::empty type from EditorObjectSelection window

* Remove ::empty type from EditorScenarioOptions window

* Remove ::empty type from Finances window

* Remove ::empty type from Footpath window

* Remove ::empty type from TrackList window

* Remove ::empty type from TitleMenu window

* Remove ::empty type from ProgressWindow window

* Remove ::empty type from MapGen window

* Remove ::empty type from Map window

* Remove ::empty type from Sign window

* Remove ::empty type from LoadSave window

* Remove ::empty type from GameBottomToolbar window

* Remove ::empty type from GuestList window

* Remove ::empty type from TileInspector window

* Remove ::empty type from Themes window

* Remove ::empty type from ScenarioSelect window

* Remove ::empty type from Staff window

* Remove ::empty type from StaffList window

* Remove ::empty type from Options window

* Remove ::empty type from Scenery window

* Remove ::empty type from RideList window

* Remove ::empty type from NewCampaign window

* Remove ::empty type from NewRide window

* Remove ::empty type from Research window

* Remove ::empty type from RideConstruction window

* Remove ::empty type from Multiplayer window

* Remove ::empty type from Park window

* Remove ::empty type from Ride window

* Remove ::empty type from LandRights window
2026-08-02 17:48:50 +02:00
Harry Hopkinson 8ce9661dc9 Rename more enum members to lowerCamelCase (#26608)
* Rename enums in Cheats.h

* Rename enums in Diagnostic.h

* Rename enums in Editor.h

* Rename enums in Input.h

* Rename enums in OpenRCT2.h

* Rename enums in ConfigTypes.h

* Rename enums in Identifier.hpp
2026-05-28 10:54:24 +00:00
Marino Rottier 93435462de Migrate remaining spinner widgets to makeHoldableSpinnerWidgets (#26499) 2026-05-17 12:56:56 +02:00
Michał Janiszewski b8f638f5a3 Unify widget idx types 2026-05-05 21:38:25 +02:00
Marino Rottier 45ff80d890 Refactor widget state to single storage model (#26443)
* Allow flag/bitmask coexistence in readers

* Add factory helpers and bulk setters for per-widget flags

* Switch coexistence from OR-both to per-window opt-in

* Migrate seven small windows to per-widget flags

* Migrate seven more windows to per-widget flags

* Migrate Cheats, MapGen and Footpath to per-widget flags

* Fix #26421: scenery tab highlight wraps when there are 64+ groups

* Migrate Ride window to per-widget flags

* Migrate ride and maze construction windows to per-widget flags

* Migrate six more windows to per-widget flags

* Migrate Banner, EditorScenarioOptions and RideList to per-widget flags

* Migrate SceneryScatter and LoadSave to per-widget flags

* Migrate EditorObjectSelection, GameBottomToolbar, Guest, Map, NewRide and Park to per-widget flags

* Migrate TopToolbar, TrackList, Research, Player and Options to per-widget flags

* Opt in remaining windows to per-widget flags

* Narrow getters and setters to per-widget flags

* Remove bitmask fields and useWidgetFlags switch

* Restore switch statements for tab/density pressed state

* Add makeHoldableSpinnerWidgets to drop per-page loops

* Update tests for per-widget flag storage

* Add changelog entry for #26421

* Reword narrative-tense comments from the migration

* Fix clang-format violations

* Remove dead holdable-widget tables from Park and Finances
2026-04-28 09:26:02 +02:00
Gymnasiast 49fa735600 Do not run drawText* through formatter if there are no arguments 2026-03-26 16:00:06 +01:00
Aaron van Geffen 8ed4b34907 Move includes out of Drawing.h and into their actual users 2026-03-26 12:55:37 +01:00
Gymnasiast a5c32ab60c Rename DrawText* to drawText* 2026-03-25 23:16:25 +01:00
Gymnasiast 2398d91fb2 Rename DrawTextBasic() to DrawText() 2026-03-25 23:15:49 +01:00
Michael Steenbeek decc6631d5 Remove Formatter::Common() (#26197) 2026-03-16 13:01:38 +00:00
Aaron van Geffen 0ef38bc902 Fix mapgen window size in enlarged UI mode (#26159)
The mapgen window was not getting the right window size in enlarged UI mode.
2026-03-09 11:07:39 +01:00
Aaron van Geffen 3014621495 Resize dropdowns in mapgen window (#26148) 2026-03-06 21:56:58 +01:00
Michael Steenbeek 343c7a70d7 Change colour to a strong enum (#25873) 2026-01-28 10:06:45 +01:00
Gymnasiast e46d2eba9e Move colour map to its own file 2026-01-17 18:46:54 +01:00
Gymnasiast 04a3d02023 Rename members of ColourShadeMap 2026-01-16 19:25:58 +01:00
Gymnasiast a13b1c4e11 Make PaletteIndex into a strong enum and move into namespace 2026-01-07 23:55:30 +01:00
Aaron van Geffen 40aaf97c07 Update copyright years to 2026 (#25741) 2026-01-05 13:42:59 +00:00
Aaron van Geffen 8a0a655025 Unwrangle Drawing.h and Paint.h (#25706)
* Drop Drawing.h include from Paint.h

* Split off RenderTarget to its own header/unit

* Move FilterPaletteID to its own header
2025-12-26 12:58:33 +01:00
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 daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +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 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
Aaron van Geffen 5b8fedd5b2 Rework Map.h includes (remove transitive header includes) 2025-09-04 22:16:53 +02:00
Gymnasiast ff896787ac Replace dropdown disabled/checked functions 2025-08-24 11:30:58 +02:00
Michael Steenbeek 577c3336c6 Create struct for all dropdown-related globals (#25023) 2025-08-23 13:56:13 +02:00
Michael Steenbeek 7b322d825a Refactor constants in window .cpp files 2025-06-16 23:10:47 +02:00
Gymnasiast 81e3181ebb Pass ScreenSize to makeWindowShim() 2025-06-10 23:21:15 +02:00
Gymnasiast bdba89f428 Pass ScreenSize to window creation functions 2025-06-10 23:20:28 +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
Gymnasiast 149468406b Update WindowColour enum for new code style 2025-06-10 19:53:12 +02:00
Gymnasiast 86e265f093 Make widget creation functions lowerCamelCase 2025-06-10 19:51:21 +02:00
Aaron van Geffen 0779b9f0ab Replace window shim and widget macros with constexpr functions (#24566) 2025-06-07 23:02:14 +02: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 3f87e2b67a Centralise ResizeFrame in WindowBase and call when setting widgets or resizing 2025-04-11 20:37:54 +02:00
Aaron van Geffen 47795f398c Adjust more hardcoded top positions 2025-04-06 11:53:29 +02:00
Michael Steenbeek 70bdddcf36 Reduce object casting (#24072) 2025-03-25 08:51:44 +01:00
Aaron van Geffen 92212369d4 Skip setting page/widgets if we're already on the page (#23975) 2025-03-12 19:50:19 +01:00
Michael Steenbeek 8266447904 Split LOADSAVETYPE_* into LoadSaveAction and LoadSaveType 2025-03-06 21:06:39 +00:00
Gymnasiast 9cf02f3635 Refactor MODAL_RESULT_* to enum 2025-03-01 20:12:11 +01:00
Aaron van Geffen bb94ee8bc0 Rename ObjectType enum to follow recent code style (#23810) 2025-02-13 23:07:55 +01:00
73 b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +00:00