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

311 Commits

Author SHA1 Message Date
Aaron van Geffen
5fbe8d0ae1 Centralise external window signatures in Windows.h (#23653) 2025-01-19 15:50:54 +01: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
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
Gymnasiast
5b3c8d8971 Fix positioning of "Install new track" button 2025-01-10 16:14:21 +01:00
Aaron van Geffen
0fb1fabc52 EditorObjectSelection: show animation peep type in description 2024-12-29 13:47:09 +01:00
Aaron van Geffen
7efe73f6ac Add checks to ensure an animation object is selected for each peep type 2024-12-07 13:40:30 +01:00
Aaron van Geffen
fb9a5239b2 Introduce peep animation objects to object selection window 2024-11-25 17:57:15 +09: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
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
Aaron van Geffen
6ee798337a Introduce EnumUtils header (#23407) 2024-12-15 17:39:52 +01:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
5442b20a7a Move StrLogicalCmp, SafeStrCpy, SafeStrCat to String.hpp 2024-12-11 20:42:43 +01:00
Aaron van Geffen
84e8b35bdc Refactor Editor::CheckObjectSelection (#23339)
* Refactor Editor::CheckObjectSelection

* Correct comment in FilterCompatibilityObject
2024-12-09 19:44:15 +01:00
Aaron van Geffen
9436a9501e Move bitScanForward from Util.h to Numerics.hpp 2024-10-29 11:08:39 +01:00
Duncan
5934dc6380 Remove void* obj from RideEntry 2024-10-16 10:50:38 +02:00
Aaron van Geffen
931f0705ce Introduce PeepNamesObjects for 'real' names of peeps (#22758)
* Add initial PeepNamesObject implementation

* Add peep names object to default objects

* Append peep names object to object list for older saves

* Deduplicate AppendRequiredObjects functions

* Remove built-in 'real name' tables

* Increment park version; introduce kPeepNamesObjectsVersion

* Update objects dependency to v1.4.8
2024-09-29 15:05:55 +02:00
Aaron van Geffen
aa7eb18d78 Rename ScrollBar struct to ScrollArea and rename its properties (#22539) 2024-08-11 16:21:53 +02:00
Greg
dae5b00f05 Close #22509: Refactor SPR_NONE to ImageIndex (#22517)
* ImageIndex typedef moved from ImageId.hpp to new file ImageIndexType.h.

* SPR_NONE redefined as ImageIndex type in ImageIndexType.h.

* SPR_NONE renamed to kSpriteIdNull

* Remove casts and enum all sprites as ImageIndex

* Remove sprites.h include from LandTool.h, RideData.h

* Ensure all RTD headers include sprites.h

---------

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2024-08-11 09:58:28 +00:00
Aaron van Geffen
ed5f53e652 Set window title for sub-tabs as well 2024-07-28 18:34:02 +02:00
Aaron van Geffen
15944738c7 Update filter dropdown caption with (number of) active source(s) 2024-07-28 15:40:44 +02:00
Aaron van Geffen
2be82c280d Replace macros with isFilterActive function 2024-07-28 14:57:56 +02:00
Aaron van Geffen
b87e8fd193 Group entrances and terrain objects as well 2024-07-28 14:52:35 +02:00
Aaron van Geffen
a55b1ec17c Refactor preview pane positioning logic 2024-07-23 14:10:39 +02:00
Aaron van Geffen
bc04f2be65 Make filter dropdown an actual dropdown 2024-07-23 14:29:09 +02:00
Aaron van Geffen
76f295b7be Make 'advanced' object selection mode the only mode
This removes the ObjectPageFlags again
2024-07-23 13:37:01 +02:00
Aaron van Geffen
92c92e6316 Move tabs with sub-tabs to start of the tab strip 2024-07-23 13:29:54 +02:00
Aaron van Geffen
1de7cb433e Introduce sub-tabs for scenery-related object types 2024-07-23 13:28:59 +02:00
Aaron van Geffen
3b4c5ce3ef Introduce sub-tabs for path-related object types 2024-07-23 13:26:23 +02:00
Aaron van Geffen
a2a6deaf7b Object selection window: generalise sub-tab logic
* Introduce ObjectSubTab struct and kRideObjectSubTabs

* Make subtab frame non-interactible

* Give sub-tab widgets a more general name

* Integrate TabOrder into ObjectSelectionPages

* Apply filter from subpage definition

* Rewrite GetSelectedObjectType to account for sub-tabs

* Improve sub-tab toggling behaviour
2024-07-22 15:47:34 +02:00
Aaron van Geffen
0df7e41f59 Fix #17390: Object selection ride tab uses wrong animations (#22351)
* Object selection ride tab uses wrong animations

* Keep track of currently selected sub-tab

* Add changelog entry
2024-07-27 21:54:19 +02:00
Aaron van Geffen
d156c6e1ef Use infinity icon in object selection window too (#22344) 2024-07-21 22:09:32 +02:00
Aaron van Geffen
3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02:00
Aaron van Geffen
c08541efc7 Remove gCommonStringFormatBuffer, CommonTextBufferSize 2024-07-13 13:25:55 +02:00
Aaron van Geffen
e816e751c9 Merge pull request #22259 from AaronVanGeffen/rework-common
Rework common.h into local definitions
2024-07-12 21:27:17 +02:00
Aaron van Geffen
cee2eb1461 Move widget strings from localisation to Widget.h (#22279) 2024-07-12 18:47:56 +00:00
Aaron van Geffen
51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Gymnasiast
8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Aaron van Geffen
a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Harry Hopkinson
98ac3a1bbc Replace GfxDrawString() with DrawText() 2024-05-10 09:56:03 +00:00
Claudio Tiecher
10a5d790c6 Part of #21421: replace define with constexpr (#21760)
* Part of #21421: refactor TUNNEL_MAX_COUNT

* Part of #21421: deleted unused OBJECT_SELECTION_NOT_...

* Part of #21421: refactor MAX_SERVER_DESCRIPTION_LENGTH

* Part of #21421: refactor EXPENDITURE_TABLE_MONTH_COUNT

* Part of #21421: refactor FINANCE_GRAPH_SIZE

* Part of #21421: refactor NETWORK_STREAM_VERSION and _ID

* Part of #21421: MONEY_STRING_MAXLENGTH

* Part of #21421: deleted MAX_USER_STRINGS

* Part of #21421: refactor USER_STRING_MAX_LENGTH

* Part of #21421: deleted USER_STRING_END

* Part of #21421: refactor REAL_NAME_START

* Part of #21421: refactor REAL_NAME_END

* Part of #21421: deleted FONT(X) and FONT_OPENRCT2_SPRITE

* Part of #21421: refactor CURRENCY_SYMBOL_MAX_SIZE

* Part of #21421: refactor CURRENCY_RATE_MAX_NUM_DIGITS

* Part of #21421: refactor SCROLLABLE_ROW_HEIGHT

* Part of #21421: refactor ADD_CLAMP_BODY

* Part of #21421: applied clang-format to Util.cpp

* Part of #21421: incorporate feedback from #21760

* Part of #21421: revert to nbsp in Currency.cpp

* Part of #21421: fix merge conflict

* Part of #21421: fix more merge conflict

* Part of #21421: apply clang format

* Part of #21421: using std::numerics for finding bounds

* Part of #21421: fix reference to kAddClampBody

* Part of #21421: improved on comments about AddClamp func

* Part of #21421: apply correct network stream version number

* Part of #21421: apply clang-format
2024-05-09 08:59:03 -03:00
Michał Janiszewski
7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Aaron van Geffen
255e89ec37 Refactor TitleScreen to TitleScene; introduce GameScene
Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2024-04-23 21:31:05 +02:00
duncanspumpkin
bd3ae5cbb9 Simplify setting existing text 2024-04-26 18:27:14 +02:00
duncanspumpkin
3448926251 Move text input widget code from game lib to ui lib 2024-04-26 18:25:44 +02:00
Harry-Hopkinson
b294d97f03 Rename DROPDOWN_HEIGHT to kDropdownHeight 2024-04-14 17:27:32 +00:00
Harry-Hopkinson
f242bbf095 Rename LIST_ROW_HEIGHT to kListRowHeight 2024-04-14 16:37:01 +00:00
Harry-Hopkinson
c5cfc65317 Rename SCROLLABLE_ROW_HEIGHT to kScrollableRowHeight 2024-04-14 16:31:53 +00:00
Aaron van Geffen
e898e9211d Move kObjectEntryGroupCounts to ObjectList.cpp 2024-03-27 20:13:10 +01:00
Michael Steenbeek
03b0c1e884 Fix compilation error on 64-bit MSVC builds (#21677) 2024-03-26 16:28:51 +01:00