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
Michał Janiszewski
ce1d3e9c83
Minor fixes ( #15491 )
2021-09-29 21:06:46 +00:00
Hielke Morsink
9dd9b27db4
Make WIDGETS_END constexpr
2021-09-26 11:11:42 +02:00
Duncan
a268350615
Fix #15439 : Ride viewport is partially grey
...
The ride viewport does not work the same as other viewports due to the selection of views that it has. After refactoring the focus system to use a more streamlined approach the ride viewport lost its invalidation on resizing. If the ride window was to use the same viewport update code as say the guest window then the viewport focus still ends up incorrect due to it no longer centring the focus. Therefore the best approach was to lose the focus on resize and force a recalculation of it.
Also renamed Focus2 to Focus as Focus2 was meant to just be fill in whilst removing the original focus structs.
2021-09-21 11:06:04 +02:00
Duncan
fa57b6aea0
Remove focus union and replace with typed focus ( #15426 )
...
* Remove focus union and replace with typed focus
This if for the NSF to allow for CoordsXYZ
* Remove legacy structures
* Rework viewport_create to deduplicate logic
* Simplify yet further
* Apply review comments
* Remove intermediate
2021-09-18 20:34:38 +01:00
Hielke Morsink
4b4b3333d6
Remove unnecessary else blocks
2021-09-16 18:31:12 +02:00
Gymnasiast
bdab3219cb
Modify object loading for JSON-only objects
2021-09-15 11:28:39 +02:00
Hielke Morsink
2ed7c217bf
Remove local instances of std::optional
2021-09-13 23:26:14 +02:00
Hielke Morsink
cf78d6841d
return nullopt instead of {}
2021-09-13 23:24:57 +02:00
Hielke Morsink
6011478590
Directly use std::unique_ptr prvalues
...
This removes the unnecessary constructor calls and improves flexibility in case of typename changes.
All cases, except for the one in Context.cpp, are temporaries.
2021-08-20 23:38:15 +02:00
Ted John
40a4a993de
Fix #15170 : Plugin: incorrect label text alignment ( #15175 )
...
Initialise CustomWidgetDesc::TextAlign.
2021-08-04 21:47:13 +02:00
Michael Steenbeek
3c86d56933
Merge pull request #15129 from ZehMatt/refactor/clang-tidy-01
...
Minor cleanup
2021-08-02 22:04:08 +02:00
Gymnasiast
676ef7205e
Change all calls to DrawTextBasic to use Formatter
2021-08-01 15:14:43 +02:00
ZehMatt
b992951bb2
Default initialize SortOrder in ListViewColumn
2021-07-30 21:31:10 +03:00
Hielke Morsink
e54dc7e466
Use consistent left-shift notation for widgets ( #14956 )
2021-06-26 14:23:15 +02:00
duncanspumpkin
98f9f24909
Remove sprite.h includes where possible
2021-05-29 08:54:33 +01:00
Tulio Leao
bb8c275df6
Remove raw coords gfx_fill_rect_inset overload
2021-03-29 09:34:11 -03:00
Michael Steenbeek
a5a63f839a
Allow passing ImageId into gfx_draw_sprite()
2021-03-23 11:58:09 +01:00
Ted John
9b43ace649
Fix ui.showTextInput performance issue ( #14210 )
...
Over 2 GiB of memory was being allocated when calling ui.showTextInput. Restrict max length to 4 KiB.
2021-03-01 22:09:51 -03:00
Gymnasiast
d6971fa79e
Fix rebase errors
2021-02-28 00:35:38 +01:00
Gymnasiast
7fd049c22e
Remove last remnants of gCurrentFontSpriteBase
2021-02-28 00:26:53 +01:00
Gymnasiast
503273793a
Remove gCurrentFontSpriteBase from some functions
2021-02-28 00:26:20 +01:00
Gymnasiast
d5f79b7972
Replace gfx_draw_string_centred() with DrawTextBasic()
2021-02-28 00:23:00 +01:00
Gymnasiast
4d9c278ebc
Unify calls to DrawTextBasic
2021-02-28 00:23:00 +01:00
Ted John
e000f06442
Remove holdable flag from spinner widget
2021-02-25 22:30:35 +00:00
Ted John
f7650fdfbc
Fix CI failure
2021-02-25 18:47:54 +00:00
Ted John
d64bd60278
Fix CI errors
2021-02-24 22:54:53 +00:00
Ted John
c2183989a5
Allow spinners to be clicked and held
2021-02-24 22:37:31 +00:00
Ted John
c1b0df5de6
Improve graphics plugin API
2021-02-24 22:37:31 +00:00
Ted John
081c1895ce
Add box and well APIs
2021-02-24 22:37:31 +00: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
Ted John
5ba3fdf452
Fix #14161 : ShortcutDesc.bindings does not work
2021-02-23 22:19:46 +00:00
Ted John
52dffb83c2
Fix #14160 : Game crashs when registering shortcuts
2021-02-23 22:18:00 +00:00
Ted John
2b3aabb8e4
Remove old shortcut code and fix issues
2021-02-21 03:14:18 +00:00
Ted John
afc548c5a7
Add plugin API for shortcuts
2021-02-21 03:14:13 +00:00
Michał Janiszewski
9aef29361f
Default-initialise more fields ( #14130 )
...
Doesn't really fix any particular issue, but adds more defaults to
fields in classes where other defaults are already present
2021-02-20 19:40:32 +01:00
Ted John
762b6ee816
Refactor viewport interaction flags and add plugin API
2021-02-18 18:10:29 +00:00
Ted John
27013d147a
Invalidate viewport when moving without scrolling
2021-02-18 18:10:29 +00:00
Ted John
099a087b18
Fix CI build errors
2021-02-08 22:27:28 +00:00
Ted John
129d85fa57
Implement title sequence playing
2021-02-08 22:27:28 +00:00
Ted John
78df831f29
Implement loading of parks
2021-02-08 22:27:28 +00:00
Ted John
d2a97ab43c
Implement scenario select window
2021-02-08 22:27:28 +00:00
Ted John
8cfdbd871d
Improve title sequence API
2021-02-08 22:27:28 +00:00
Ted John
fcb5f51c4a
Allow saving of commands
2021-02-08 22:27:28 +00:00
Ted John
f99c57e11d
Implement getting commands
2021-02-08 22:27:28 +00:00
Ted John
3ed221f128
Add APIs for loading a saved game and adding a park
2021-02-08 22:27:28 +00:00
Ted John
41c7b04ab2
Add parks to title sequence API
2021-02-08 22:27:28 +00:00
Ted John
55ebebb869
Add title sequence API
2021-02-08 22:27:27 +00:00
Ted John
2fdf91874c
Implement centred labels
2021-01-29 17:50:32 +00:00