Commit Graph
25 Commits
Author SHA1 Message Date
Duncan 144fa13a84 Move more Ui functions to Ui library (#22444)
* Move various methods into the ui library

* Move various zoom functions to ui
2024-08-01 19:09:06 +00:00
Duncan e09f27df3c Rename snake_case Class names (Remaining Bits) (#19237)
* Rename snake_case Class names

* Clang format

* Fix build issues
2023-01-21 19:57:17 +00:00
Gymnasiast 5309c80e29 Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Hielke Morsink 6dafbbfb65 Rename global window functions to TitleCase (#19167) 2023-01-16 20:13:42 +00:00
Duncan 8a8d3105f3 Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
Gymnasiast a088537b65 Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02:00
Hielke Morsink a258008bef Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Duncan 43562a6899 Window Class Refactor: Invention List Drag (#17415)
* Start working on drag

* Finish moving invention drag into window class

* Refactor drag item into a window variable

* Remove rct2 comment
2022-06-30 10:25:18 +01:00
ζeh Matt c4ad5fcd15 Adjust includes 2021-11-26 21:01:44 +02:00
ζeh Matt 0024252328 Fix includes 2021-11-24 17:19:52 +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
Duncan 39fcc5d078 Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Michał Janiszewski 67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
ζeh Matt a6080b7996 Refactor code to dynamically add and remove viewports (#13687) 2021-01-07 19:06:49 +00:00
Matt d6c2ec898d Fix #4617: Crash when rotating with invalid viewport open 2020-09-29 21:44:59 +03:00
frutiemax f49149222e Close #12245: Use coords objects for SetLocation (Window_internal.h) 2020-07-16 23:01:42 +02:00
frutiemax 0fa0ca451e Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
frutiemax 280a21fa30 Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Duncan 94b3598102 Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising

* Fix null deref issues
2020-07-06 22:02:25 +01:00
duncanspumpkin 904e6c6987 Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls

Further use of GetSprite

Use GetSprite in all remaining easy to use functions

Correct formatting

Rename GetSprite to GetEntity

Make suggested changes

Remove const to allow for building

Fix crashes due to next sprite
2020-06-16 20:21:56 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Matt cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Matt 2053ecb688 Refactor window_scroll_to_viewport to use rct_window::ScrollToViewport 2019-08-11 17:22:00 +02:00
Matt b046d45c01 Refactor window_set_location to use rct_window::SetLocation 2019-08-11 17:21:56 +02:00