Commit Graph
83 Commits
Author SHA1 Message Date
Gymnasiast 0ec4e3353b Update members of FontStyle 2025-11-03 23:25:30 +01:00
ζeh Matt 88623be8da Add force redraw debug paint option 2025-10-02 17:30:31 +03: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
Michael Steenbeek 7b322d825a Refactor constants in window .cpp files 2025-06-16 23:10:47 +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
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
Michael Steenbeek 078ba79cb8 Introduce WF_NO_TITLE_BAR and apply to windows 2025-02-26 21:09:54 +01: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
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 fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Matt 7154e85c0a Add stable paint sort (as a debug option) 2024-12-07 13:08:00 +01:00
Aaron van Geffen b971d1596e Indent window widget definitions (#22700)
* Indent definitions in About, AssetPacks windows

* Indent definitions in Banner, Changelog, CustomCurrency windows

* Indent DebugPaint, DemolishRidePrompt windows

* Indent EditorBottomToolbar, EditorInventionsList

* Indent EditorObjectiveOptions, EditorScenarioOptions

* Indent Finances

* Indent Footpath

* Indent GameBottomToolbar

* Indent Guest window

* Indent GuestList, InstallTrack windows

* Indent Land, LandRights windows

* Indent LoadSave, Main, MapGen, MapTooltip windows

* Indent MazeConstruction

* Indent Multiplayer

* Indent NetworkStatus

* Indent NewCampaign

* Indent NewRide window

* Indent News window

* Indent NewsOptions window

* Indent ObjectLoadError window

* Indent Options window

* Indent Park window

* Indent PatrolArea window

* Indent Player window

* Indent RefurbishRidePrompt window

* Indent Research window

* Indent Ride window

* Indent RideConstruction

* Indent RideList

* Indent SavePrompt

* Indent ScenarioSelect widgets

* Indent scenario window

* Indent scenery scatter window defs

* Indent server list window

* Indent server start window§

* Indent ShortcutKeys window

* Indent Sign window

* Indent Staff window

* Indent StaffFirePrompt window

* Indent StaffList window defs

* Indent Themes window defs

* Indent TileInspector window defs

* Indent TitleExit, TitleMenu, TitleOptions, Tooltip windows

* Indent TrackDesignManage window defs

* Indent TrackDesignPlace defs

* Indent TrackList def

* Indent Transparency window defs

* Indent ViewClipping window defs

* Indent Viewport window defs

* Indent Water window defs
2024-09-04 21:11:26 +02:00
Aaron van Geffen 3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02:00
Gymnasiast 8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Michał Janiszewski 7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
CoryYandTulio Leao 3f81a491b0 Close #21569: Remove 'Window' from Window Open function names (#21613)
* Close #21569: Remove 'Window' from Window Open function names

Windows are all under the OpenRCT2::Ui::Windows namespace. As such, "Window" is removed from the Open functions names.

* Update Contributors.md

* Fix formatting TrackMangeOpen

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Fix formatting TrackPlaceOpen

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

---------

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2024-03-17 06:37:46 +00: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
Duncan 3146d463bd Move Ui header items to OpenRCT2::Ui (#21546)
* Move ui definitions to ui project

* Enforce coding style

* Apply clang format

* Add clang tidy ignore

* Increase compiler happiness
2024-03-09 14:15:45 +00:00
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Duncan e09f27df3c Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Duncan 859b071ddc Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00:00
Hielke Morsink 6dafbbfb65 Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 7f5934cc95 Remove snake_case from second chunk of Drawing (#19166) 2023-01-16 18:52:17 +00:00
Duncan 8a8d3105f3 Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
James103 73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Gymnasiast 162b01204d Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Duncan 482971710d Apply code style to context functions 2022-11-06 21:49:07 +01:00
Gymnasiast 14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
73 b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast a088537b65 Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02:00
Hielke Morsink 7f29e4e39c Make rct_windowclass strong type WindowClass
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Hielke Morsink a258008bef Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Hielke Morsink c8605a8763 Refactor window functions to take references 2 2022-07-31 17:23:15 +02:00
Duncan 5349e6fe88 Window Class Refactor: DebugPaint (#17269)
* Move debug paint window to class

* Refactor global

* Use ref where possible
2022-05-22 23:15:39 +01:00
Ted John da89a4e413 Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
Duncan 90d2be3ddd Clang tidy Part 3: Ui Project Enum Names (#15986)
* Enum constant case

* Apply enum names clang tidy

* Rename scoped enum missed by clang-tidy
2021-11-26 14:25:34 +00:00
Duncan bb2c7dbaca Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
Hielke Morsink 9dd9b27db4 Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Hielke Morsink e54dc7e466 Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
Gymnasiast 503273793a Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
ffrogman 7ed1804e61 Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
pizza2004 2015acd4c0 Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00