Commit Graph

297 Commits

Author SHA1 Message Date
Duncan 67bbc8560d
Code style: Remove snakes from everything world apart from Map.h (#18273)
* Remove remaining snakes from world (outside of map)

* Initial few desnaking of Map.h
2022-10-11 19:39:24 +01:00
Rik Smeets 8e33cf580f Code style: Remove snakes from virtual floor 2022-10-08 20:50:59 +02: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
Hielke Morsink 43dbf9eb18
Fix #18032: non-interactive widgets produce sound 2022-09-19 20:38:34 +00:00
Gymnasiast ae8b2b8374
Remove unused window events 2022-08-27 16:50:02 +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
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink d6525e3cd0
Refactor window functions to take references 7 2022-07-31 17:23:18 +02:00
Hielke Morsink d05d675ed9
Refactor window functions to take references 6 2022-07-31 17:23:17 +02:00
Hielke Morsink 755deeef8e
Refactor window functions to take references 5 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
Hielke Morsink c8605a8763
Refactor window functions to take references 2 2022-07-31 17:23:15 +02:00
Hielke Morsink e2da19f0f7
Add missing includes 2022-07-29 18:45:10 +02:00
Hielke Morsink 95df149804
Fix: Ghosts and tooltips move when panning the viewport by right-click dragging
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2022-05-21 09:40:43 +02:00
Ted John f909be7a43
Merge pull request #16797 from IntelOrca/feature/enhanced-transparency
Introduce more transparency toggles and allow each one to be set to either an invisible or ghost state which is a persisted user setting.

A new window is introduced to control these settings and is inspired by OpenTTD.
2022-03-20 17:56:08 +00:00
Ted John 884ef6b8ac Change transparent trees to all vegetation 2022-03-19 00:07:06 +00:00
Gymnasiast ffe8b4b45d
Undo fspath() workaround for Android 2022-03-18 23:21:23 +01:00
duncanspumpkin f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Ted John 52e5d48501 Update shortcuts and toolbar menu 2022-03-14 21:57:05 +00:00
Ted John 61f1e13c0b Refactor viewport flags 2022-03-14 21:57:05 +00:00
Kane b83e21a953 Improve code readability (added parentheses) 2022-03-14 21:43:12 +00:00
Kane 3d3271a5ec Misc. clean ups
Define see-through paint colours in Paint.h for global use
Color staff sprite button
Change ride->is_visible bool to ignore_invisible_flag bool
Add shortcut to open transparency options (CTRL+T)
2022-03-14 21:41:49 +00:00
Kane 2e93e42a71 More finishing touches
- Changes all references of `VIEWPORT_FLAG_INVISIBLE_PEEPS` to `VIEWPORT_FLAG_INVISIBLE_GUESTS` and `VIEWPORT_FLAG_INVISIBLE_STAFF`
- Updates Invisible People menu item and shortcut.
- Added new viewport flags into the `viewport_set_visibility` function
- Invisible options only work if see-through is activated as well
- Added see-through supports

- Regression: Exclude ride from invisible no longer works (ride is still see-through)
2022-03-14 21:40:27 +00: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
Ted John 6c3a417af3
Merge pull request #16259 from IntelOrca/refactor/rectangle-maps
Refactor map size to allow for rectangle maps.
2022-02-15 19:08:37 +00:00
Michael Steenbeek ffe67ff33e
Merge pull request #16642 from Gymnasiast/refactor/dropdown
Create Dropdown::Item and use it for gDropdownItems
2022-02-15 18:50:26 +01:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00: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
Gymnasiast 723867e0a0
Create Dropdown::Item and use it for gDropdownItems 2022-02-12 23:57:22 +01:00
Silent 4621cc4264
Json: Fix wrong implicit path typecasts in ReadFromFile and WriteToFile
These functions accepted fs::path which meant passing a u8string to them
wrongly assumed an ANSI encoding and not UTF-8. This would be
a non-issue in C++20 where char8_t is separate, but until then it was an issue
causing incorrect character conversions, and thus an exception.
2022-02-12 14:36:37 +01:00
Gymnasiast 10301507a9
Fix Android 2022-01-08 16:58:57 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
Hielke Morsink 9615dda192
Reimplement hotkey handler for toggling visibility 2021-12-03 00:24:56 +01: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
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
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 a8b84989eb
Check for nullptr explicitly in operct2-ui (#15460) 2021-09-25 08:45:06 +02:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Hielke Morsink 28681eebc0
Merge pull request #15407 from ZehMatt/refactor/optional-use
Make use of std::optional strict
2021-09-14 17:45:18 +02:00
Hielke Morsink 2af5e0dc82
Remove unnecessary else block 2021-09-13 23:25:33 +02:00
Hielke Morsink cf78d6841d
return nullopt instead of {} 2021-09-13 23:24:57 +02:00
ζeh Matt 59a6c34db4
Make use of std::optional strict 2021-09-13 20:02:32 +03: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