Commit Graph
405 Commits
Author SHA1 Message Date
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 2e7e429516 Replace drawText* calls that pass STR_STRING + formatter 2026-03-26 17:10:50 +01: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
Gymnasiast 38adb756ee Make DrawText() internal again 2026-03-22 13:21:15 +01:00
Michael Steenbeek decc6631d5 Remove Formatter::Common() (#26197) 2026-03-16 13:01:38 +00:00
Gymnasiast 43357cf4aa Draw filter dropdown without common formatter 2026-03-09 23:14:57 +01:00
Gymnasiast 6ec870e96f Fix odd text appearing in sources dropdown 2026-03-09 23:14:27 +01:00
Gymnasiast f999cab0a7 Stop using common formatter for window captions 2026-03-03 14:47:00 +01:00
matheusvb3 0271639f6d Rename OpenRCT2String to StringWithArgs (#26112) 2026-03-01 10:46:37 +00:00
Aaron van Geffen 1cc7006127 Reorganise game actions into folders (#25987) 2026-02-10 08:57:40 +01:00
matheusvb3 e7246eb2f1 Remove redundant negation in a few expressions (#25940) 2026-02-03 20:51:12 +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
matheusvb3 bba937a03d Remove more redundant namespace qualifiers (#25828) 2026-01-16 08:38:20 +01:00
Michael Steenbeek 78a654fcbd Rename missed occurrences of DrawPixelInfo/DPI to RenderTarget/RT (#25768) 2026-01-07 19:58:49 +00:00
Gymnasiast 8861833292 Pass PaletteIndex to Rectangle::fill() and IDrawingContext::FillRect() 2026-01-07 12:48:01 +01:00
Aaron van Geffen 6a6bd8e1aa Reduce dependencies for Ride.h (#25757) 2026-01-06 20:03:31 +00:00
Aaron van Geffen b5cd780b3e Rework drawing header includes (#25744)
* Move Csg unit into OpenRCT2 namespace

* Move G1Element into its own header file

* Clean up SpriteCommands.h

* Add trailing namespace comment to Csg.cpp

* Remove Drawing.h dependency from Graph.h

* Add <memory> include to G1Element.h

* Remove Drawing.h include from ImageTable.h (used by all objects!)

* Drop Drawing.h dependency from OpenGLFramebuffer.h

* Drop Drawing.h dependency from TextureCache.h

* Drop Drawing.h include from TitleScene.h

* Drop Drawing.h dependency from Widget.h

* Add <optional> include to SpriteFile.h

* Add Drawing.h to PlayTests, S6ImportExportTests

* Include <cstdint> in TitleScene.h for SIZE_MAX
2026-01-05 19:09:34 +00: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
matheusvb3 490bf3ec30 Remove redundant parentheses around FlagHolder method invocations (#25695) 2025-12-23 18:16:44 +01:00
Michael Steenbeek 13795ce082 Close #25244: Unify kImageIndexUndefined and kSpriteIdNull (#25683) 2025-12-21 16:19:35 +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 64ef3da5a4 Use FlagHolder in ColourWithFlags 2025-11-03 23:25:31 +01:00
Gymnasiast 0ec4e3353b Update members of FontStyle 2025-11-03 23:25:30 +01:00
Gymnasiast 124352c922 Update members of TextAlignment 2025-11-03 23:25:29 +01:00
Gymnasiast 5e6f5ceb6f Update members of TextDarkness 2025-11-03 23:25:29 +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 e045126fe3 Rename members of ObjectSourceGame 2025-10-07 22:00:53 +02:00
Gymnasiast daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Gymnasiast 524646e32a Rename members of ShopItem 2025-10-05 15:06:24 +02:00
Gymnasiast ee67a827c0 Rename members of AnimationPeepType 2025-10-05 01:10:06 +02:00
Gymnasiast 45912ec9a3 Rename members of SoundId 2025-10-01 20:35:34 +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 aab21c4747 Rename validate_global_widx to VALIDATE_GLOBAL_WIDX 2025-09-17 23:50:28 +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 9b7ee06e0f Move Context fully into OpenRCT2 namespace; types into Input.h 2025-09-12 14:03:44 +02:00