1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00
Commit Graph

286 Commits

Author SHA1 Message Date
Matt
4764cc5769 Use primitive for loop for window iterations, iterators can invalidate 2025-10-17 11:53:18 +02:00
Gymnasiast
daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Michael Steenbeek
eb38b7227f Change WindowFlag to strong enum 2025-09-20 21:46:42 +02:00
Gymnasiast
a662c5ef8e Change WindowClass members to use lowerCamelCase 2025-09-17 23:18:52 +02:00
Gymnasiast
c94babb06e Rename g_window_list to gWindowList 2025-09-17 23:16:17 +02:00
Gymnasiast
3a803e13e2 Change window functions to use lowerCamelCase 2025-09-17 20:10:12 +02:00
Gymnasiast
d4a0bca091 Rename Window fields 2025-09-17 20:10:12 +02:00
Gymnasiast
f46fea3bff Rename rct_windownumber to WindowNumber 2025-09-17 20:10:12 +02:00
Gymnasiast
8a7a265639 Rename member of WidgetIdentifier and WidgetRef 2025-09-17 20:10:12 +02:00
Gymnasiast
28fbe83a27 Rename g_music_tracking_viewport to gMusicTrackingViewport 2025-09-17 20:10:11 +02:00
Aaron van Geffen
99065960f2 Rename InputFlags::unk{4,5} to {left,right}MousePressed 2025-09-15 22:44:39 +02:00
Gymnasiast
6f7987e1c7 Turn MapSelectFlags into FlagHolder 2025-09-11 22:06:10 +02:00
Aaron van Geffen
5b8fedd5b2 Rework Map.h includes (remove transitive header includes) 2025-09-04 22:16:53 +02:00
Aaron van Geffen
013fcb3798 Split off MapSelection.h from Map.h 2025-09-04 21:57:36 +02:00
mix
dd1cc48ce3 Set viewport pos on zoom to avoid unnecessary draw and shift 2025-08-27 12:07:35 +01:00
mix
677f6c0717 Remove unused function WindowViewportCentreTileAroundCursor 2025-08-27 09:13:05 +01:00
mix
fa92008548 Remove unused function WindowViewportGetMapCoordsByCursor 2025-08-27 09:10:00 +01:00
mix
06579b45d2 Calculate zoom to cursor based on mouse coordinates 2025-08-27 09:05:17 +01:00
Gymnasiast
650fa3ae2e Rename WindowWidgetType to WidgetType and change for new code style 2025-06-10 19:55:12 +02:00
Harry-Hopkinson
2b19320db3 Remove unused function (WindowGetPreviousViewport) 2025-05-27 18:26:08 +00:00
Harry Hopkinson
994cc858e8 More efficiently search viewports for playing Audio 2025-05-26 08:37:44 +01:00
Harry Hopkinson
371dcc28f5 More efficiently search viewports 2025-05-26 08:37:15 +01:00
mix
04c3113593 Simplify window visibility check iteration 2025-05-21 21:37:07 +01:00
mix
cc813e3f16 Refactor window visibility cache and fix viewport visibility 2025-05-21 18:06:06 +01:00
Matt
77511786b2 Merge pull request #24407 from ZehMatt/windows-storage
Eliminate more shared_ptr usage
2025-05-17 01:18:00 +03:00
ζeh Matt
39479d7b12 Use vector and unique_ptr for windows storage 2025-05-17 00:45:08 +03:00
Matt
42df41efdb Remove the use of shared_ptr for the Context (#24404)
* Replace shared_ptr with unique_ptr for Context systems, return refs

* Fix all the users

* clang-format fix

* Fix linux builds
2025-05-15 22:46:06 +03:00
Matt
6335c31336 Rename DrawPixelInfo to RenderTarget (#24339)
* Begin backend separation, rename type DrawingPixelInfo to RenderTarget

* Rename dpi variables to rt
2025-05-04 22:06:46 +00:00
ζeh Matt
8503faa289 Set viewport location immediately, fixes rotation using stale position 2025-04-25 17:48:39 +03:00
ζeh Matt
6d63b1f752 Skip dead windows in some iterations 2025-04-25 17:48:36 +03:00
Aaron van Geffen
99836faeff Rename Window_internal unit to WindowBase for consistency (#24163) 2025-04-06 17:43:36 +02:00
Gymnasiast
2002f697e0 Refactor INPUT_FLAGS into FlagHolder 2025-03-26 13:00:54 +01:00
Michael Steenbeek
06c1fed4f7 Refactor gScreenFlags to LegacyScene enum 2025-03-05 20:45:04 +00:00
Gymnasiast
9982f74cb7 Change CloseWindowModifier members to new codestyle 2025-03-01 20:12:12 +01:00
Gymnasiast
17140192de Change VisibilityCache members to new codestyle 2025-03-01 20:12:12 +01:00
73
c7c703515e Rename audio.h to Audio.h (#23842) 2025-02-17 13:24:03 +01:00
Aaron van Geffen
2302f0d2e3 Rework Localisation includes (#23789)
* Clean up internal localisation header includes

* Remove some external localisation includes

* Remove dependency on FormatCodes.h from InteractiveConsole.h

* Reduce Formatter.h, Localisation.Date.h includes
2025-02-07 22:36:42 +01:00
Aaron van Geffen
cf448753c1 Move WindowInvalidate and WidgetInvalidate families into WindowManager (#23692)
* Move WindowInvalidate and WidgetInvalidate families into WindowManager

* Use InvalidateWidget shorthand in more places

* Cut back on UiContext includes

* Cut back on Window.h includes

* Remove outdated parameter comments
2025-01-25 13:46:08 +01:00
Aaron van Geffen
a8773dd805 Move WindowClose family into WindowManager (#23646)
* Replace WindowClose() calls with Close method calls where possible

* Move WindowClose family into WindowManager

* Remove UpdateSceneryGroupIndexes hack
2025-01-19 18:49:18 +01:00
Michael Steenbeek
be9f27e4f9 Mass rename constants (#23656) 2025-01-19 15:59:45 +00:00
Aaron van Geffen
bed4d5bdca Move WindowCreate and WindowFocusOrCreate into WindowManager (#23643)
* Move WindowBringToFront into WindowManager

* Move WindowCreate and WindowFocusOrCreate into WindowManager

* Cut back on Context/UiContext includes
2025-01-19 06:58:28 -03:00
Aaron van Geffen
e1fa0b539d Move Widget, Window, Intent, MouseInput into OpenRCT2 namespace (#23642) 2025-01-18 15:29:41 +02:00
Matt
b9f6b6f754 Refactor widgets state (#23621)
* Refactor windows to not share widget state

* First half of refactoring all the windows

* Refactor the remaining windows, compiles but has issues

* Fix drawing only every second widget

* Remove the need of an terminating widget

* Address WidgetIndex signedness issues; use kWidgetIndexNull more

* Address constexpr issue with Widget content union

* Fix tabs in scenery window

* Fix tabs in object selection window

* Adjust custom widget index for CustomTool events

* Use STR_NONE for default tooltip initialisation

* Adjustment for mingw compiler

* Fix bottom toolbar using the widget declaration not instance

* Remove pointless code in Guest window, handled by SetPage

* Prevent out of bounds crash

* Move scroll widgets initialization to SetPage in Cheats window

* Remove special logic in Options window

* Remove special logic in Park window

* Remove special logic for Player window

* Remove special logic for Research window

* Remove special logic for Ride window

* Remove special logic for Staff window

* Remove special logic for Finances window

* Remove special logic for MapGen window

* Remove special logic for editor objective options window

* Remove special logic for editor scenario options window

* Fix widgets not being set since page is initialized to 0

* Remove more redundant code

* Fix remaining access to widget declarations

* Remove unused variable

* Fix editor object selection tabs on successive windows

---------

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2025-01-18 13:45:17 +01:00
Aaron van Geffen
aa45247f21 Move WindowFind functions into WindowManager (#23517)
* Move WindowFind* functions into WindowManager

* Update parameter documentation where applicable
2025-01-08 21:12:11 +01:00
Aaron van Geffen
fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen
752f169acf Fix editor progression issues (#23511)
Partial revert of #23487
2024-12-31 00:45:01 +01:00
Aaron van Geffen
25ac4cf5d6 Prevent closing object selection window when selection is invalid (#23487)
* Prevent closing object selection window when selection is invalid

* Ride window: remove superfluous virtual keyword from event signatures

* Amend changelog
2024-12-29 22:15:26 +00:00
ζeh Matt
ba30f781f4 Remove WindowFlushDead, shouldn't be used directly 2024-12-04 21:18:25 +02:00
ζeh Matt
2c6c1161ed Remove copying the list of windows, no longer required 2024-12-04 21:16:59 +02:00
Aaron van Geffen
80b63a5ae7 Add line breaks after template declarations (#23086)
* Add line breaks after template declarations

* Additional clang-format patches
2024-10-29 16:54:01 +01:00