Commit Graph

73 Commits

Author SHA1 Message Date
Gymnasiast 79302e88a5
Rename _tileElement to _bannerElement 2021-04-03 22:43:57 +02:00
Gymnasiast f5ec127eaf
Fix #14409: NPE when demolishing banner 2021-04-03 22:09:24 +02:00
Gymnasiast 943e89d5a6
Use BannerElement instead of TileElement 2021-04-03 22:07:11 +02:00
Daniel Karandikar d4efbdf531 Refactor InitTileElement
Break loop when going to go outside of Tile
2021-03-22 19:23:36 +00:00
Daniel Karandikar 5ef750a879 Tidy up BannerWindow::Initialise 2021-03-22 19:23:34 +00:00
Daniel Karandikar 1551389bf5 camelCase for local vars 2021-03-22 19:23:28 +00:00
Daniel Karandikar 248d6a0683 Prepend _ to private member fields 2021-03-22 19:23:20 +00:00
Daniel Karandikar 1229ce6b22 Refactor Banner to use new Window framework
Also tidy up a couple of bits of duplicated code
Pulled out into CreateViewport method and tileElement member
2021-03-15 22:59:19 +00:00
ζeh Matt 40a23db14b
Fix #13871: Crash on banner window invalidation 2021-01-19 22:44:22 +01:00
ζeh Matt a6080b7996
Refactor code to dynamically add and remove viewports (#13687) 2021-01-07 19:06:49 +00: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
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 68bd035f12
Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00: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
Aaron van Geffen 205fc3332b
Refactor more widget definitions
* Increase height for changelog button in about window
* Tackle banner window
* Tackle changelog window
* Tackle custom currency window
* Tackle finance summary
* Tackle quit prompt widgets
* Tackle debug paint widgets
* Tackle demolish and refurbish prompt widgets
2020-07-21 17:38:57 +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
Gymnasiast 6fd83fd006
Make WW and WH static 2020-05-09 18:07:16 +02:00
Gymnasiast f8aeb70398
Apply review requests 2020-05-09 18:07:16 +02:00
Gymnasiast 9e4c664944
Replace defines with constexpr 2020-05-09 18:07:16 +02:00
Gymnasiast 96fe3d3b3c
Make WINDOW_SKELETON take a title, height and width 2020-05-09 18:07:16 +02:00
tassaron2 559ede5d14
Add compile option to move close box to the left 2020-05-09 18:07:16 +02:00
Tulio Leao 4933785b1c Make window_dropdown_show_text_custom_width() use ScreenCoordsXY 2020-05-01 15:48:20 -03:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 87f724d038 Use Coords objects for viewport_create() 2020-03-02 20:49:59 -03:00
Tulio Leao 1ea9015315
Use CoordsXY(Z) in more places 2020-02-22 14:20:28 +01:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 85ecb52e7c
Manually replace more Z occurrences 2019-12-23 20:05:26 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
Tulio Leao d1cec43065 Use constexpr on openrct2-ui/* 2019-10-29 18:48:04 -03:00
Tulio Leao 35577f5b19 Avoid dereferencing invalid map_get_first_element_at return 2019-10-19 07:54:31 -03:00
Matt cc6321048f
Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Ted John 93789b9034
Add nullptr checks for get_ride in libopenrct2ui (#9795) 2019-08-09 08:06:25 +01:00
Ted John 7287b8cf1a Fix formatting 2019-07-29 20:40:25 +01:00
Ted John 61d64ab8c5 Do not use user strings for banners 2019-07-29 19:18:16 +01:00
Ted John 0b4d989a67 Rename get_banner to GetBanner 2019-07-26 17:24:19 +01:00
Ted John 3bff25ab22 Use TileCoordsXY 2019-07-26 17:14:09 +01:00
Ted John 5c07c53faf Refactor get banner 2019-07-25 22:21:19 +01:00
Ted John 85543bd1c8 Separate RCT2 and OpenRCT2 banner struct 2019-07-25 22:21:19 +01:00
duncanspumpkin d14637e1ca Fix narrowing and formatting 2019-05-02 17:47:01 +01:00
duncanspumpkin f6b610c325 Implement Banner Place/Remove Actions 2019-05-02 17:47:01 +01:00
duncanspumpkin aa65e25c6b Implement banner set style action 2019-04-07 10:10:36 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John ca023f7c5e Fix #8829: invalid read in window_guest_open 2019-03-09 13:05:12 +00:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michael Steenbeek f8483b4726 Fix formatting 2018-09-27 22:15:04 +02:00
Michael Steenbeek 3b7fc4cf8c Port rest of banner functions 2018-09-27 22:15:04 +02:00