Commit Graph

159 Commits

Author SHA1 Message Date
Stephan Spengler bfcf66a8f7
Rename ParkSetEntranceFee to fit naming pattern 2023-01-06 22:57:18 +01: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 38f7c2a159
Allow using ImageId in widgets directly 2022-12-31 15:18:22 +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
Michael Steenbeek 27f3a3a796
Create function to resize window frame 2022-11-06 10:29:40 +01:00
Hielke Morsink 31dd4bf604
Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Gymnasiast 14f9a75e0a
Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Hielke Morsink f91df4138c
Merge pull request #18359 2022-10-18 23:39:49 +02:00
Hielke Morsink 3bb8ea3668
Better annotate some magic numbers in for loops 2022-10-17 16:08:55 +00:00
Hielke Morsink abac080d3e
Rename public general config data members 2022-10-16 21:46:01 +02:00
Duncan 5dba30778d
Code style: Remove more snakes from the park, maphelper, scenery. (#18222) 2022-10-08 06:56:17 -03: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 5647fc8506
Fix flag usage 2022-08-27 16:52:29 +02: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
Michael Steenbeek 5661da1c68
Unwrap game action compat wrappers 2022-08-11 00:00:58 +02:00
Michael Steenbeek a7e66535d9
Change ‘restroom’ to ‘toilet’ in the code 2022-08-06 14:33:37 +00:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +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
Michael Steenbeek 30f477972c
Close #15358: Increase park name character limit 2022-07-27 17:35:15 +02:00
Hielke Morsink ac7331f878
Include <array> and use page count for size 2022-06-30 07:25:24 +00:00
Duncan d6e188d289
Park Window to class (#17364)
* Start base of class

* Start moving things into class

* Finish porting over

* Refactor to conform more with style

* Add no discard to imageid

* Fix objective window position

* Fix audio on viewport

* Make further fixes

* Move nodiscard again
2022-06-30 05:37:43 +01:00
Geoff Banh 85baa6f7ca Fix #14093: Replace MONEY macro with user defined literal 2022-03-29 07:23:35 -03:00
Michael Steenbeek ffe67ff33e
Merge pull request #16642 from Gymnasiast/refactor/dropdown
Create Dropdown::Item and use it for gDropdownItems
2022-02-15 18:50:26 +01:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00: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
Gymnasiast 723867e0a0
Create Dropdown::Item and use it for gDropdownItems 2022-02-12 23:57:22 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Duncan 3deaa1af2e
Fix #16197: Park award time and type accidentally swapped 2021-12-12 11:20:17 +01:00
Duncan 6dc1efde82
Make awards a vector (#16134)
* Make awards a vector

* Fix compiler and use one less branch
2021-12-11 14:45:50 +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 fccd298d2f
Clang tidy Part 2: Ui Project Class Names (#15976)
* Apply clang-tidy on class names in the ui project

* Rename classes to more appropriate names

* Adjust name again
2021-11-24 16:16:52 +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 9dd20ec619
Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Duncan a268350615
Fix #15439: Ride viewport is partially grey
The ride viewport does not work the same as other viewports due to the selection of views that it has. After refactoring the focus system to use a more streamlined approach the ride viewport lost its invalidation on resizing. If the ride window was to use the same viewport update code as say the guest window then the viewport focus still ends up incorrect due to it no longer centring the focus. Therefore the best approach was to lose the focus on resize and force a recalculation of it.

Also renamed Focus2 to Focus as Focus2 was meant to just be fill in whilst removing the original focus structs.
2021-09-21 11:06:04 +02:00
Duncan fa57b6aea0
Remove focus union and replace with typed focus (#15426)
* Remove focus union and replace with typed focus

This if for the NSF to allow for CoordsXYZ

* Remove legacy structures

* Rework viewport_create to deduplicate logic

* Simplify yet further

* Apply review comments

* Remove intermediate
2021-09-18 20:34:38 +01:00
IntelOrca 600ce959d7
Use real values for gGuestsInParkHistory 2021-09-03 23:43:43 +02:00
Duncan d2aca03ff6
Fix #15271. Use formatter to pass description args to text input (#15272)
* Fix #15271. Use formatter to pass description args to text input

Originally passed the variables via global vars which were not updated to 32bit during recent refactors. This removes the global and makes the interface cleaner and corrects the type

* Fix size of arguments
2021-08-24 19:12:05 +01:00
Gymnasiast 676ef7205e
Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Ted John 70d9c1438e
Change most things and formatting to money64 2021-08-01 15:14:42 +02:00
Hielke Morsink e54dc7e466
Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
Tulio Leao 08e182fba2 Use ScreenCoordsXY on Graph methods 2021-03-29 09:34:11 -03:00
Geoff B 6c8493cb69
Close #14253: Replace font size tokens with adjusted DrawText calls 2021-03-27 14:40:17 +01:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Gymnasiast 7fd049c22e
Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast 3e536e2711
Change gfx_draw_string_*_wrapped() to DrawTextWrapped() 2021-02-28 00:23:01 +01:00
Gymnasiast e2ebc9d43b
Replace gfx_draw_string_left() with DrawTextBasic() 2021-02-28 00:23:00 +01:00