1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00
Commit Graph

104 Commits

Author SHA1 Message Date
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
ζeh Matt
c0474d2d27 Merge pull request #16466 from ZehMatt/refactor/identifier-rideid
Use TIdentifier for RideId
2022-02-12 11:23:54 -08:00
Michael Steenbeek
ee54603695 Rename value strings for spinners (#16637) 2022-02-12 20:17:37 +01:00
ζeh Matt
4554d6d883 Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt
a2470c0573 Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
frutiemax
adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05: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
Steve Blythe
b15dc66acb Part of #12098: Use ScreenRect in gfx_filter_rect() (#15603) 2021-10-20 19:43:32 -03: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
ζeh Matt
516232e0a7 Change static casts to EnumValue 2021-09-10 19:10:15 +03:00
ZehMatt
3ad72baaae Cast fixes 2021-09-10 19:10:12 +03: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
Ted John
5f853df1fd Remove gS6Info 2021-08-02 20:38:02 +02:00
Gymnasiast
676ef7205e Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Ted John
58ae6bbd8a Fix money64 issue in scenario options 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
bb8c275df6 Remove raw coords gfx_fill_rect_inset overload 2021-03-29 09:34:11 -03: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
c40701d997 Make gfx_draw_string() take a TextPaint argument 2021-02-28 00:26:20 +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
Gymnasiast
2477933c51 Turn font sprite base into a strong enum 2021-02-28 00:23:00 +01:00
Adam
f09b14ef2b Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Łukasz Pękalski
4adf745237 Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03: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
maksimdrachov
1815a094bb Fix #13426: Typo in "repay loan" 2020-11-19 19:45:40 +01:00
pizza2004
2015acd4c0 Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004
68bd035f12 Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
evilclownattack
3e7ff12a72 Fix #13292: Impossible excitement rating requirements
Incorrect argument was used when drawing the minimum excitement rating in the Objective Selection window.
2020-10-28 23:55:29 +01:00
Gymnasiast
eb2f40f35c Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
Aaron van Geffen
d27e14f45b Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
Duncan
4ec10837a6 Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required

* Remove common from Guest window where possible
2020-09-27 21:09:08 -03:00
Matt
ccde06ab0f Explicitly pass formatter arguments to ShowError and family 2020-09-17 22:14:36 +03:00
Matt
2639349925 Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Gymnasiast
b788a099b5 Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Gymnasiast
6e22eade67 Create Objective struct and use it for global objective 2020-09-09 15:38:03 +02:00
Tulio Leao
731a93dc39 Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Aaron van Geffen
be626d0b7c Refactor Editor*, Finances, Guest* to use MakeTab 2020-08-17 20:59:17 +02:00
Aaron van Geffen
eda8e31055 Refactor widget defs in EditorObjectiveOptions window (#12672) 2020-08-13 23:07:19 -03:00
Michael Steenbeek
68ce06e833 Refactor objective handling in Scenario Editor
This moves some knowledge out of the window and into the main code and also cleans up the window a bit.

This also allows setting the "x guests by the end of year y" goal for no money scenarios, which was not the case previously.
2020-08-12 22:10:47 +02:00
Michael Steenbeek
be0123decb Fix #12611: Bad check for pay-per-ride ability 2020-08-10 18:56:06 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
0e96674a46 Part of #12096: ScreenRect w/ gfx_fill_rect in libopenrct2ui (#12188) 2020-07-10 13:59:08 -03:00
Aaron van Geffen
681b8d7938 Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
frutiemax
14a07359b3 Part of #11389: Use formatter class for Ride::FormatNameTo (#12041) 2020-06-24 21:02:08 -03:00
TomasZilinek
9d965ccfb6 Part of #12017 - create gfx_draw_sprite overload (#12026)
* Part of #12017 - create gfx_draw_sprite overload

Part 1. Creates the overload and replaces about a half of the calls since there are too many for one PR.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-23 18:32:34 -03:00
TomasZilinek
e93e32d139 Part of #11571: create gfx_draw_string_left() overload (#11984)
Replaces a third of all occurrences of the old function
2020-06-20 00:22:01 -03:00
Sohil Adwani
310ff84b23 Part of #11562: gfx_draw_string_left_wrapped() overload
* gfx_draw_string_left_wrapped overload added


Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-18 22:52:49 -03:00