Commit Graph
172 Commits
Author SHA1 Message Date
Duncan 8a8d3105f3 Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +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
279675ba45 Add shift and control modifiers to close window button (#18537)
Shift closes all but current window.
Control closes all windows of the same window class/type.

Co-authored-by: Chris Higgins <chrissywissywoo@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-12-27 12:22:18 +00:00
Haven KimandTulio Leao 69e5439484 Fix #17067: Random Staff Patrol Area clicks (#18329)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2022-11-16 00:13:24 +00:00
Duncan 482971710d Apply code style to context functions 2022-11-06 21:49:07 +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
Hielke Morsink f91df4138c Merge pull request #18359 2022-10-18 23:39:49 +02:00
Hielke Morsink 3bb8ea3668 Better annotate some magic numbers in for loops 2022-10-17 16:08:55 +00:00
Hielke Morsink 5fa53ad528 Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02:00
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
Michael Steenbeekandleoleotte 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 ae8b2b8374 Remove unused window events 2022-08-27 16:50:02 +02:00
Gymnasiast 2f6b82b13f Remove gMaxTextBoxInputLength (only written to) 2022-08-21 18:54:51 +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 eec99b6fae Catch window refs by reference instead of copy 2022-08-02 21:55:23 +02:00
Gymnasiast d3fd31c611 Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink 5c6db6126d Take const reference in some window functions 2022-07-31 20:34:33 +02:00
Hielke Morsink d05d675ed9 Refactor window functions to take references 6 2022-07-31 17:23:17 +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
Michael Steenbeek 1a8660d59d Pass window reference to tool_set (#17625) 2022-07-27 22:22:22 -03: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
Hielke Morsink 5b2d1c2527 Use viewport flag constants in window_scroll_to_location (#17427) 2022-06-21 21:49:56 -03:00
Hielke Morsink ba85cf4873 Close #15896: Refactor out the ZoomLevel operators 2022-02-26 23:14:59 +01:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
ζeh Matt d7f5003943 Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00:00
Johan Mattsson c00cc90b1f Fix bounds checks and a nullptr check 2022-02-03 21:42:12 +01:00
Hielke Morsink 53d9bfa8b4 Update implicit zoom conversions 2021-12-01 00:08:35 +01:00
Hielke Morsink fdce5df6db Reduce nested ifs and remove ?: in main_window_zoom 2021-11-30 19:11:36 +01:00
Sijmen cec8447c6f Refactor Viewport.cpp to use ScreenRect (#15790) 2021-10-27 00:13:38 -03:00
Ted John 6b965074ec Merge pull request #15527 from hjort96/refactor-window-ViewClipping
Close #13813 : Refactor window to class: ViewClipping
2021-10-08 13:57:25 +01:00
Soham Roy 4d27417fd2 Fix #11354: Coding style causes undefined behaviour
An underscore followed by a capital letter used as a prefix might cause
undefined behaviour
2021-10-05 13:58:50 +02:00
Jonathan Hjorth 4fe21e3274 OnToolUpdate, OnToolDrag, OnToolUp now being used 2021-10-05 10:53:40 +02:00
Hielke Morsink 5b9b52c028 Use (const) references to scrolls where possible 2021-10-01 15:21:01 +02:00
Hielke Morsink 6de1868ad8 Use (const) references to widgets where possible
Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
2021-10-01 15:21:00 +02:00
Hielke Morsink 429e34d7f3 Make uses of window_get_main use (const) auto* 2021-09-30 14:36:06 +02:00
Hielke Morsink 53c22c9b4b Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt 59a6c34db4 Make use of std::optional strict 2021-09-13 20:02:32 +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
DuncanandTed John 940cab87d3 Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01:00
Ted John 5f853df1fd Remove gS6Info 2021-08-02 20:38:02 +02:00
Ted John 417c0f584f Handle > 255 rides in ride list window 2021-08-01 15:18:15 +02:00