1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00
Commit Graph

255 Commits

Author SHA1 Message Date
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
Duncan
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
duncanspumpkin
98f9f24909 Remove sprite.h includes where possible 2021-05-29 08:54:33 +01:00
Daniel Karandikar
4c1d35478c Tidy Window.cpp 2021-03-22 19:23:31 +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
Ted John
b1a54fa7ba Fix #14264: [Plugin] Cannot modify the coordinate / size of the viewport 2021-03-08 19:52:26 +01: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
ac6e4fc0d6 Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes 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
Michael Steenbeek
7274c6a7e7 Remove some unused symbols 2021-02-18 21:15:50 +01:00
Ted John
17f4f3aaf8 Refactor text input window to class 2021-02-07 22:36:31 +01:00
Ted John
4a37f1479c Merge pull request #13927 from IntelOrca/plugin/extra-ui
* Add isVisible property to widgets so that you can easily show / hide widgets.
* Add new text box widget for text input
* Allow plugin windows to be transparent
* Add `textAlign` property to label widget
2021-01-29 20:55:25 +00:00
Ted John
a9755609c2 Move ride audio into own namespace 2021-01-27 18:45:28 +00:00
Ted John
2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
Ted John
c0d8786af8 Add text box widget 2021-01-27 00:28:59 +00:00
Ted John
be350f7e2e Add widget visible flag 2021-01-26 00:25:59 +00:00
Ted John
c9a07eaa84 Refactor staff window to class (#13819) 2021-01-25 21:57:06 +00:00
Ted John
3e75f23970 Refactor guest list window to a class 2021-01-11 21:56:48 +00:00