Commit Graph

86 Commits

Author SHA1 Message Date
Duncan 406b73d904
Remove final snakes from map and world (#18304) 2022-10-12 09:14:45 -03:00
Duncan 7dd8989e70
Next chunk of World/Map.h snakes (#18296)
* Next chunk of World/Map.h snakes

* Apply clang-format
2022-10-12 06:35:20 +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 523bb8136e
Refactor window functions to take references 3 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 1a8660d59d
Pass window reference to tool_set (#17625) 2022-07-27 22:22:22 -03: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
hjort96 dba34d2c17 Removed a line 2021-10-07 22:38:12 +02:00
hjort96 9d57e93df9 Add suggestions from review. 2021-10-07 16:21:19 +02:00
hjort96 763c31ce5b Fix clang-format 2021-10-05 20:06:17 +02:00
Jonathan Hjorth 9a2a12af98 Cleaning code 2021-10-05 11:09:37 +02:00
Jonathan Hjorth 0195ce45a2 Added OnToolUpdate, OnToolDrag, OnToolUp, OnPrepareDraw to new window 2021-10-05 10:54:15 +02:00
Jonathan Hjorth dbe07554c9 Added OnOpen() to ViewClippingWindow 2021-10-05 10:52:14 +02:00
Jonathan Hjorth 762005f25a Fixed crash caused by window not being properly initialized 2021-10-05 10:51:24 +02:00
Jonathan Hjorth 419201f476 Work on refactoring ViewClipping.cpp to the new window framework. 2021-10-05 10:50:47 +02:00
Hielke Morsink 94144bcd89
Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
ζeh Matt 59a6c34db4
Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Gymnasiast 676ef7205e
Change all calls to DrawTextBasic to use Formatter 2021-08-01 15:14:43 +02:00
Gymnasiast e2ebc9d43b
Replace gfx_draw_string_left() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Tulio Leao 00483df2f2 Close #13625: Refactor TOOL_IDX to use strong enum 2020-12-23 20:07:54 -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
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
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +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
Matt Thomson a8f8f06e2d
Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum (#12642)
* Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum

* Remove redundant default branches

Co-authored-by: Matt Thomson <matt-thomson@users.noreply.github.com>
2020-08-13 21:51:28 +01:00
Aaron van Geffen 16ad1d18fb
Refactor another set of widget definitions (#12503)
* Refactor TopToolbar

* Refactor TrackDesignManage

* Refactor TrackDesignPlace

* Refactor TrackList

* Refactor ViewClipping

* Refactor Viewport

* Refactor TitleEditor

* Refactor TitleCommandEditor

* Refactor Themes

* Refactor TextInput
2020-07-30 22:58:49 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Aaron van Geffen 681b8d7938
Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
TomasZilinek c1546059ad
Close #11571 - Remove <x,y> gfx_draw_string_left overload (#12010)
Third and final part. replaces the rest of the calls to x,y overload
2020-06-20 16:09:45 -03:00
Gymnasiast 6fd83fd006
Make WW and WH static 2020-05-09 18:07:16 +02:00
Tulio Leao 935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Michael Steenbeek 9fda7762e5
Fix #10942: Cut-away view is broken (#10945) 2020-03-16 21:47:38 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Duncan 2c359736ee
Refactor to reduce usage of LocationXY8 and sLocationXY8 (#10479)
* Refactor to reduce LocationXY8 usage

* Further reduction of LocationXY usage and sLocationXY usage

* Reduce sLocationXY8 usage
2019-12-30 19:03:34 +00:00
Tulio Leao 98110c0544 Make Map::map_invalidate*() use CoordsXY (#10437)
* Make Map::map_invalidate_element() use CoordsXY

* Make Map::map_invalidate_tile_full() use CoordsXY

* Make Map::map_invalidate_tile_zoom0() use CoordsXY

* Make Map::map_invalidate_tile_zoom1() use CoordsXY

* Make Map::map_invalidate_tile() use CoordsXY

* Use CoordsXYRangedZ for map invalidation

* Fix vehicle tile invalidation use Z instead of Y coord

* Fix BannerRemoveAction sending Z TileCoords to invalidate tile

* Fix wrong tile invalidation on peep_update_walking_break_scenery

* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Tulio Leao 15f873c018 Remove LocationXY usage on openrct2-ui\windows\ViewClipping.cpp 2019-12-27 09:52:27 -03:00
Duncan e61401e48c Fix #10410: Tile Inspector does not hightlight tile correctly
Mistake made when refactoring not passing the error up through the chain and silently working.
2019-12-22 13:59:24 +01:00
duncanspumpkin f346e439fc Change type of map selection a and b 2019-12-21 12:18:34 +00:00