1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00
Commit Graph

82 Commits

Author SHA1 Message Date
duncanspumpkin
5beadb4f17 Remove unused array 2023-07-03 08:14:03 +01:00
Duncan
0747ad7497 Remove even more window uncommon vars (#20495)
* Break uncommon union

* Move uncommon highlightedScenario into derived

* Split off multi use variable

* Adjust name
2023-06-27 22:33:26 +01:00
Duncan
d40102aa9d Remove some uncommon variables and break unions (#20440) 2023-06-27 06:34:06 +01:00
Duncan
0c5a35993e Remove union from window internal (#20429)
* Remove campaign vars from union

* Remove error union

* Remove new_ride union

* Remove Unknown5

* Update changelog
2023-06-26 16:31:04 +01:00
Duncan
4a3a1e4e7f Remove event handlers (#20439) 2023-06-23 08:31:31 +01:00
Duncan
a6d3dbc6d9 Remove player specific window vars from common 2023-06-23 00:44:17 +02:00
duncanspumpkin
9b8b672507 Finish linking up parts 2023-06-20 08:42:25 +01:00
Matthias Moninger
7b61c6352a Desnake some stuff, small string passing cleanup (#19388)
* Rename scenario_index_entry to ScenarioIndexEntry

* Desnake members of ScenarioIndexEntry

* Pass const u8string& instead of utf8 pointer
2023-02-13 20:30:16 +00:00
Duncan
e09f27df3c Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Duncan
9deed6d98a Replace snakes in Class names OpenRCT2/N*-P* (#19227)
* Replace snakes in Class names OpenRCT2/N*-P*

* Rename PODDate (and TimeOfDay for good measure)

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2023-01-20 05:24:44 +00:00
Duncan
859b071ddc Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00: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
162b01204d Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Michael Steenbeek
27f3a3a796 Create function to resize window frame 2022-11-06 10:29:40 +01:00
Raymond Zhao
0647d12de8 Close #18315: Refactor Error window to class (#18403) 2022-10-29 09:25:20 -03:00
leoleotte
0dee78bfe5 Close #13774: Refactor Footpath window to class 2022-10-06 19:41:31 +00:00
Michael Steenbeek
99e13e023e Name unknown_15 window event as ScrollSelect
Co-authored-by: leoleotte <leoleotte@users.noreply.github.com>
2022-10-05 21:59:20 +02: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
45e7ee6a73 Rename rct_window_event_list to WindowEventList 2022-08-27 16:56:52 +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
Hielke Morsink
faea1ca494 Make rct_window non-copyable and non-assignable 2022-08-03 21:35:25 +02:00
Gymnasiast
d3fd31c611 Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Michael Steenbeek
11614d7170 Merge pull request #17486 from duncanspumpkin/inventionWnd
Invention List Window Class Refactor
2022-07-12 19:49:03 +02:00
Duncan
5d896c65b5 Refactor Guest Window to Class 2022-07-03 22:00:37 +02:00
duncanspumpkin
8492453702 Refactor to conform to style. Move uncommon items out of rct_window 2022-07-02 07:53:46 +01:00
Duncan
43562a6899 Window Class Refactor: Invention List Drag (#17415)
* Start working on drag

* Finish moving invention drag into window class

* Refactor drag item into a window variable

* Remove rct2 comment
2022-06-30 10:25:18 +01: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
duncanspumpkin
249eaa989e Refactor sign internal variables 2022-06-07 22:35:06 +01:00
duncanspumpkin
8fb91c93aa Remove unused news_variables 2022-06-07 22:35:06 +01:00
duncanspumpkin
3dba3984bf Remove map_variables 2022-06-07 22:35:06 +01:00
ζeh Matt
d7f5003943 Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02: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
ζeh Matt
a2470c0573 Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
IntelOrca
34128dc262 Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Michael Steenbeek
15897c23a1 Merge pull request #15498 from duncanspumpkin/sceneryWindow
Backport scenery window from NSF
2021-10-09 17:13:36 +02:00
duncanspumpkin
fea69cc86c Backport scenery window from NSF
Co-authored-by: IntelOrca <IntelOrca@users.noreply.github.com>
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
2021-10-06 16:44:05 +01:00
Jonathan Hjorth
0a392841c2 Added functions OnToolUpdate, OnToolDrag, OnToolUp to rct_window 2021-10-05 10:52:44 +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
ζeh Matt
18af5d4950 Use union for window association to prevent casts 2021-09-10 19:10:13 +03:00
ZehMatt
b9c679d23e Fix window list only able to hold 255 indices 2021-09-10 19:10:12 +03: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
Ted John
49b677780f Merge pull request #14171 from IntelOrca/plugin/custom-widget
* Add API for getting network traffic statistics.
* Add API for creating custom widgets.
* Add API for drawing graphics for custom widgets.
* Add click event to spinners and allow them to be held down.
2021-02-27 01:31:00 +00:00
Michał Janiszewski
6baff43f52 Reduce inclusion of Sprite.h 2021-02-25 10:56:27 +01:00
Michał Janiszewski
8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Ted John
93f17f1175 Add custom widget logic and network stats API 2021-02-24 22:37:31 +00:00
Ted John
82b1a5eb6d Convert CustomWindow into a class 2021-02-24 22:37:31 +00:00
Ted John
17f4f3aaf8 Refactor text input window to class 2021-02-07 22:36:31 +01:00
Ted John
c9a07eaa84 Refactor staff window to class (#13819) 2021-01-25 21:57:06 +00:00