Commit Graph

289 Commits

Author SHA1 Message Date
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
Kane bd8d3934e0
Close #15143: Add a shortcut key for Giant Screenshot 2021-08-01 09:20:34 +02:00
Michael Steenbeek 9c2fb84a53
Invalidate screen when toggling transparent water flag
Pointed out here: https://github.com/OpenRCT2/OpenRCT2/issues/14753#issuecomment-849024680
2021-07-27 12:16:36 +02:00
ζeh Matt 751c419594
Minor cleanups (#14954)
* Fix uninitialized variables in InputManager

* Use constexpr for const values

* Add break statements instead of implicit fallthrough

* Default initialize variables in Cheats window

* Default initialize variables in News window

* Default initialize window event pointers
2021-06-26 01:43:05 -03:00
duncanspumpkin 98f9f24909 Remove sprite.h includes where possible 2021-05-29 08:54:33 +01:00
Gymnasiast 8f6713a4f1
Reverse option, add shortcut 2021-05-24 16:54:30 +02:00
Ted John b179f6e597
Merge pull request #13965 from telk5093/footpath_hotkeys
Make ride construction shortcuts work for footpath too
2021-03-06 01:27:18 +00:00
Ted John 083d22adf2 Fix #14195: Binding (NumPad) Enter to send message closes the chat 2021-02-28 14:08:16 +00:00
Ted John 789b04b4aa Fix #14194: Pressing WASD in text box moves main viewport, too 2021-02-28 14:07:56 +00:00