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

173 Commits

Author SHA1 Message Date
Aaron van Geffen
7e9cc6df5d Merge pull request #24288 from AaronVanGeffen/close-buttons
Generalise white close button strings to all translucent title bars
2025-04-26 11:30:29 +02:00
Aaron van Geffen
a8267412c2 Move title height helper functions to WindowBase and fix FlexUI plugins 2025-04-11 23:26:34 +02:00
Aaron van Geffen
883845bcf9 Use larger cross glyph for close button when title bar is enlarged 2025-04-11 20:39:26 +02:00
Aaron van Geffen
3f87e2b67a Centralise ResizeFrame in WindowBase and call when setting widgets or resizing 2025-04-11 20:37:54 +02:00
Michael Steenbeek
87bb2f10dd Introduce WindowBase::canBeResized 2025-02-26 21:05:57 +01:00
73
b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +00: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
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
Aaron van Geffen
805c8e2a11 Plugin: allow scripts to specify tab colour maps (#23583) 2025-01-13 23:47:30 +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
2a3a72396b Remove ImageId::FromUInt32 and ToUInt32 (#23415)
* Allow high image ids when rendering an inline sprite

* CustomWindow: refactor use of ImageId::FromUInt32

* Dropdown: refactor use of ImageId::FromUInt32, ToUInt32

* Remove ImageId::FromUInt32

* Fix typo in mechanic status string ids

* Rewrite InventoryFormatItem to not use inline sprites any more

* Widget: replace ImageId::ToUInt32 with ImageId::GetIndex

* Remove ImageId::ToUInt32
2024-12-17 21:26:11 +01:00
Michael Bernardi
e7ca356633 Replace big window size limits with int16_t max. 2024-12-10 02:09:05 +11:00
Aaron van Geffen
3685d1a24b clang-format: change IndentPPDirectives to BeforeHash (#23287) 2024-11-29 12:04:56 +09:00
Michael Bernardi
8cc53324b6 Remove view width and height from Viewport struct 2024-09-27 00:07:40 +10:00
Aaron van Geffen
896eb4f488 Consolidate FormatStringIDLegacy, FormatStringToUpper into Formatting 2024-07-13 14:09:58 +02:00
Arnold Zhou
0254b570d8 Dukvalue uint int fixes 2024-06-06 21:39:22 +02:00
Gymnasiast
8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Aaron van Geffen
10c97c6599 CustomWindow: change spinner button order to match internal windows 2024-05-22 19:59:16 +02:00
Aaron van Geffen
57bdae9d49 Refactor WindowOtherWheelInput to be safer and script window compatible 2024-05-18 15:59:12 +02:00
Aaron van Geffen
828aeadf5b Deal with -Wdeprecated-anon-enum-enum-conversion warnings 2024-05-11 11:24:01 +02:00
Aaron van Geffen
ef4cad5ee3 Move UI exclusive string ids to UiStringIds.h 2024-05-10 23:24:46 +02:00
duncanspumpkin
bd3ae5cbb9 Simplify setting existing text 2024-04-26 18:27:14 +02:00
Duncan
3146d463bd Move Ui header items to OpenRCT2::Ui (#21546)
* Move ui definitions to ui project

* Enforce coding style

* Apply clang format

* Add clang tidy ignore

* Increase compiler happiness
2024-03-09 14:15:45 +00:00
mrmbernardi
4ccecd6e68 Remove forwarding functions in Window.cpp (#21516) 2024-03-03 18:04:09 +01:00
James103
1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Duncan
77dd3cf8e2 Move all construction related logic into OnOpen (#20632) 2023-09-07 08:20:28 +02:00
Duncan
4349688de4 These function names have not reflected their use for a while (#20656) 2023-08-01 20:19:33 +01:00
Duncan
ce86aa029f Remove custom_info pointer (#20480)
* Remove custom_info pointer

* Formatting
2023-07-18 06:24:42 +01:00
Gymnasiast
11de002a55 Fix #20417: Plugin windows missing the left title bar border 2023-06-18 22:45:35 +02:00
Michael Steenbeek
5e495d63c7 Close #15660: Allow showing window buttons on the left (#20176) 2023-05-19 10:17:38 +02:00
Michał Janiszewski
f1c79f6ac4 Iterate widgets only until last (#20116) 2023-05-07 20:37:06 +00:00
Duncan
cdccb21dd5 Refactor of colours (#19998)
* Move dropdown functions to dropdown code

* Use a map for the colour tip

* Keep dropdownidx and colour seperated

* Allow number of rows to match vanilla

* Apply review comment

* Bump network version
2023-04-22 08:58:13 +00:00
Gymnasiast
91f4c1e752 Use dpi ref in misc drawing functions 2023-04-11 22:59:03 +01:00
Gymnasiast
0139c8d19e Use dpi ref in everything outside the drawing folder 2023-04-11 22:57:25 +01:00
Gymnasiast
96d77ed8f7 Using dpi refs in most remaining window defs 2023-04-11 22:57:23 +01:00
Gymnasiast
9c2d5b9fef Make GfxDrawSprite() take reference 2023-04-11 22:53:30 +01: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
Duncan
859b071ddc Rename classes with snakes OpenRCT2/A*-F* (#19215)
* Rename classes with snakes OpenRCT2/A*-F*

* Clang format files
2023-01-19 08:16:44 +00:00
Duncan
5ee79fe65b Address all snake_case functions in ui/scripting 2023-01-17 23:50:27 +01: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
7f5934cc95 Remove snake_case from second chunk of Drawing (#19166) 2023-01-16 18:52:17 +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
James103
73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00