Hielke Morsink
c8605a8763
Refactor window functions to take references 2
2022-07-31 17:23:15 +02:00
Ted John
bd6817cb45
Fix #17533 : Missing audio when specifying --rct2-data-path
2022-07-25 14:26:28 +00:00
Ted John
585ebed600
Fix #17297 : Crash when switching language ( #17370 )
...
* Refactor all uses of IAudioChannel and the audio mixer.
* Use shared_ptr to avoid dead pointers hanging about.
* Reload particular audio channels where necessary after object reload.
2022-06-27 17:41:53 +01:00
Artem Yanenko
790e237b80
Fix #15787 : toggling upper case banners only works after 10 secs
2022-06-21 20:37:45 +02:00
Ted John
a2e6691ac2
Add new audio objects for loading sounds
2022-05-23 22:24:56 +01:00
Ted John
e3ee511a0c
Update options UI
2022-04-26 22:18:19 +02:00
Ted John
9f28b66eec
Remove title editor
2022-04-26 22:17:38 +02:00
Evan Haataja
3127a4dc64
Allow game to run with GUI while without audio.
2022-03-23 23:44:50 -03:00
duncanspumpkin
f835a5b521
Apply clang-tidy to static variables
2022-03-18 00:38:26 -03:00
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