Michael Steenbeek
5edc561715
Close #11437 : Migrate old platform methods
2022-02-18 21:57:00 +01:00
Sam Atkins
2b4579bd93
Use labels for OptionsWindow text
...
This lets us show tooltips for them. Most of the FooDraw() methods are
now empty and have been deleted.
2022-02-17 23:09:39 +01: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
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
Michael Steenbeek
ee54603695
Rename value strings for spinners ( #16637 )
2022-02-12 20:17:37 +01:00
Silent
5028ce3bf6
Turn GeneralConfiguration::rct1_path into an u8string
...
Fixes a crash when opening Advanced Options on the first launch
2022-02-12 16:07:04 +01:00
Michael Steenbeek
63ed6c99a5
Make StrDecompToPrecomp() take C++ strings
2022-02-07 18:56:04 +01:00
Sam Atkins
99d3d17092
Clean-up OptionsWindow ( #16529 )
...
* Rename OptionsWindow tab constants for clarity
The new WIDX_FIRST_TAB constant can be used by code that just wants the
first tab without worrying about which it is.
* Remove use of this-> in OptionsWindow
* Replace widget_invalidate with InvalidateWidget
* WidgetSetCheckboxValue -> SetCheckboxValue
* Move repeated per-tab code into common methods
Previously, each FooPrepareDraw() method would call
CommonPrepareDrawBefore() at the start, and CommonPrepareDrawAfter() at
the end. Let's reduce this duplication by having OnPrepareDraw() call
these instead. :^)
The same goes for a few other repeated code snippets.
* Use WindowFocusOrCreate for OptionsWindow
* Fix #16504 : Display RCT1-path tooltip
When the OptionsWindow was first refactored into a Window class, the
AdvancedTooltip() method was created but never called. Hooking it up
fixes the crash and makes the path tooltip appear again. :^)
* Make MAIN_OPTIONS_ENABLED_WIDGETS a constexpr
* Move OptionsWindow constants into the class
* WindowInitScrollWidgets() -> InitScrollWidgets()
2022-01-29 21:52:33 +00:00
Michael Steenbeek
28b10f6787
Merge pull request #16498 from Gymnasiast/remove/scaling-dropdown
...
Always use SNN for non-integer scaling
2022-01-25 10:55:17 +01:00
Michael Steenbeek
c903d95512
Replace platform_open_directory_browser() with ShowDirectoryDialog()
2022-01-25 10:54:12 +01:00
Gymnasiast
9191a8f884
Fix positioning of Steam overlay option
2022-01-24 17:48:05 +01:00
Gymnasiast
98cd39a375
Always use SNN for non-integer scaling
2022-01-24 17:46:22 +01:00
Gymnasiast
6bcf848b2f
Use C++ filesystem for more file/path functions
2022-01-08 19:07:48 +01:00
frutiemax
adb692b74e
Forward declare Formatter
2021-12-30 12:17:51 -05:00
Duncan
90d2be3ddd
Clang tidy Part 3: Ui Project Enum Names ( #15986 )
...
* Enum constant case
* Apply enum names clang tidy
* Rename scoped enum missed by clang-tidy
2021-11-26 14:25:34 +00: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
Hielke Morsink
9dd20ec619
Improve array formatting
...
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
hjort96
eba2041aaa
Close #13791 : Refactor window to class Options ( #15558 )
...
* Create class OptionsWindow. Moving functions to class.
* Move functions to class OptionsWindow
* Fix coding style
Co-authored-by: hjort96 <jonathan.hjorth96@hotmail.com >
2021-10-15 10:41:30 +01:00
Hielke Morsink
5b9b52c028
Use (const) references to scrolls where possible
2021-10-01 15:21:01 +02:00
Hielke Morsink
94144bcd89
Remove some dead code
...
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
Hielke Morsink
9dd9b27db4
Make WIDGETS_END constexpr
2021-09-26 11:11:42 +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
Gymnasiast
676ef7205e
Change all calls to DrawTextBasic to use Formatter
2021-08-01 15:14:43 +02:00
Hielke Morsink
e54dc7e466
Use consistent left-shift notation for widgets ( #14956 )
2021-06-26 14:23:15 +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
Tulio Leao
efd5d7dfe7
Fix formatting on d309a7c
2021-05-16 21:11:42 -03:00
Dan Silk
05977e6d14
Fix #14468 : Cannot close Options window on Android
...
Issue was caused by the WIDX_ALWAYS_NATIVE_LOADSAVE flag not being enabled/disabled correctly.
2021-05-15 23:43:50 +02:00
Michael Steenbeek
a5a63f839a
Allow passing ImageId into gfx_draw_sprite()
2021-03-23 11:58:09 +01:00
Maximilian Bottin
6f28914f61
Fix #14296 : Allow early scenario completion in multiplayer
2021-03-18 20:30:11 +01:00
Gymnasiast
7fd049c22e
Remove last remnants of gCurrentFontSpriteBase
2021-02-28 00:26:53 +01:00
Gymnasiast
e2ebc9d43b
Replace gfx_draw_string_left() with DrawTextBasic()
2021-02-28 00:23:00 +01:00
Gymnasiast
2477933c51
Turn font sprite base into a strong enum
2021-02-28 00:23:00 +01:00
Michael Steenbeek
08f07e6135
Reduce usage of gCurrentFontSpriteBase ( #14178 )
2021-02-26 15:39:20 +01:00
Umdlye
2c408342d9
Create toggle for zoom toolbar button
2021-02-01 17:27:40 +01: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
Mathias Gibbens
b1e5a11bf3
Several more spelling fixes ( #13752 )
...
Signed-off-by: Mathias Gibbens <mathias@calenhad.com >
Co-authored-by: Mathias Gibbens <mathias@calenhad.com >
2021-01-10 18:23:35 +00:00
ffrogman
7ed1804e61
Fix #12410 : Refactor WINDOW_WIDGET_TYPES to use strong enum ( #13453 )
...
* Fix #12410 : Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
Gymnasiast
d963438c4f
Check if platform has a file picker
2020-11-08 14:06:42 +01:00
pizza2004
2015acd4c0
Refactor UI/Interface Window to Title Case ( #13367 )
2020-11-04 04:52:23 +00:00
pizza2004
a5607da09d
Refactor Widget to TitleCase ( #13355 )
2020-11-03 18:29:22 -03:00
pizza2004
b0fd5f93d7
Refactor UI/Interface misc to TitleCase ( #13354 )
...
* Refactor LandTool to Namespace
* Refactor Theme to TitleCase
* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
pizza2004
68bd035f12
Refactor Dropdown to TitleCase ( #13352 )
...
* Refactor Dropdown Namespace
* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
Bryan DiLaura
894be65b6d
Closes #12415 : Refactor CURRENCY_TYPE to strong enum ( #13276 )
...
* closes #12415 CURRENCY_TYPE enum refactor
* reverses unintended change in Linux.cpp
* closes #12415 CurrencyType strong enum
2020-10-25 01:33:06 -03:00
Łukasz Pękalski
9dcbf6d4e6
Close #4865 : Offer an option to disable inhibiting the monitor power ( #13243 )
...
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net >
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com >
2020-10-20 22:02:44 +02:00
Łukasz Pękalski
26720eb345
Fix #5178 : Lighting effects cannot be disabled in software mode ( #13206 )
...
Lighting effect are now automatically turned off when software renderer is selected.
2020-10-15 17:05:39 +02:00
Aaron van Geffen
a5a65fe974
Fix #13167 : Broken dropdown menu in rendering engine options ( #13169 )
2020-10-11 23:06:35 +02:00