Commit Graph
92 Commits
Author SHA1 Message Date
Duncan 482971710d Apply code style to context functions 2022-11-06 21:49:07 +01: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
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
Hielke Morsink 76c1bc8980 Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +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
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05: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
Duncan dc6a8a6235 Refactor ObjectLoadError to class (#15573)
* Move into class

* Refactor names and const

* Apply review comments
2021-10-14 16:53:48 +01:00
Hielke Morsink 9dd9b27db4 Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Gymnasiast bdab3219cb Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
ζeh Matt 758ad547ce Remove strdup in ObjectLoadError.cpp fixing a memory leak (#15218) 2021-08-16 14:18:22 +01:00
Hielke Morsink c887a049d2 Fix various Cppcheck warnings (#15081) 2021-07-24 23:41:50 +02:00
Hielke Morsink e54dc7e466 Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02: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
Ted John 3f5698b1e0 Fix REPL write line on Linux 2021-02-16 20:24:51 +00: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
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
pizza2004 2015acd4c0 Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 a5607da09d Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Gymnasiast 13fb0b43da Refactor legacy GetSourceGame() to method 2020-10-17 22:45:12 +02:00
ζeh Matt 645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Duncan 2063aea5ef Remove common format formatter where possible (#13034)
* Remove common format formatter where possible

Eventually should have it limited to tooltips, window titles and widget args

* Remove remaining paint functions using common

* Remove misuse of gCommonFormatArgs
2020-09-30 22:42:04 +01:00
Aaron van Geffen d27e14f45b Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
Matt 2639349925 Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Simon Jarrett 2c92c652e2 Refactor ObjectLoadError to use new JSON library 2020-09-16 20:18:54 +01:00
Gymnasiast b788a099b5 Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +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 8325ec04ed Refactor ObjectLoadError 2020-07-30 22:05:11 +02:00
Aaron van Geffen 7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax c474f2ddc0 Close #12096: Use only ScreenRect on gfx_fill_rect (#12280) 2020-07-15 22:34:57 -03:00
Aaron van Geffen 681b8d7938 Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
TomasZilinek 9efe43fa59 Fix #11562 - gfx_draw_string_left_wrapped overload (#12015)
I created the overload, replaced remaining calls with the new function and removed the old function.
2020-06-21 06:25:31 -03:00
TomasZilinek 2264c5f7f1 Part of #11571 - Use gfx_draw_string_left with ScreenCoordsXY (#12008) 2020-06-20 11:56:36 -03:00
Gymnasiast f640446d58 Migrate 40 calls to set_format_arg() 2020-06-03 14:49:04 +02:00
Sohil Adwani d2565af867 Part of #11562: gfx_draw_string_left_wrapped() overload (#11784) 2020-05-19 21:57:11 -03:00
2cf95adc4b Fix #11565: gfx_draw_string_left_clipped to use ScreenCoordsXY (#11765)
* Issue #11565, created overload for gfx_draw_string_left_clipped

Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
TomasZilinek 9fde6a74c3 Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
Gymnasiast 6fd83fd006 Make WW and WH static 2020-05-09 18:07:16 +02:00
Breno Rodrigues Guimarães 2479256bc1 Adjust Formatter function names according to coding style (#11378) 2020-04-20 18:55:15 -03:00
Breno Rodrigues Guimarães d4a2a98e20 Replacing set_format_arg_on macro in favor of a more C++zy solution (#11350) 2020-04-20 07:10:33 +02:00
Tulio Leao 935cfe90fc Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00