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

437 Commits

Author SHA1 Message Date
Michael Steenbeek
cfb28cd511 Turn Rotate View dropdown into two buttons
Co-authored-by: Gymnasiast <gymnasiast@users.noreply.github.com>
Co-authored-by: MasterTomNL <tomvanderlek@gmail.com>
2025-01-30 23:02:36 +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
a55e70bc0b Remove InteractiveConsole.h includes where not required (#23578) 2025-01-09 15:40:47 +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
Michael Steenbeek
96580036ea Enable opaque water and corkscrew boosters on non-RCT1 installs 2024-12-22 16:16:55 +01:00
Aaron van Geffen
35e117aca2 Rename String methods to use lowerCamelCase 2024-12-11 22:49:37 +01:00
Aaron van Geffen
b3aa852a8d Consolidate util/Math.hpp into core/Numerics.hpp (#23319)
* Consolidate util/Math.hpp into core/Numerics.hpp

* Remove branching; replace isPowerOf2 with std::has_single_bit

* Add templated types to floor2 and ceil2
2024-12-04 21:00:26 +00:00
RedMarcher
c24e47dea1 Rename cheat variables to match new code style 2024-12-01 18:15:37 +01: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
Michael Steenbeek
a2ed026264 Split up remaining tile elements 2024-10-15 22:02:31 +02:00
duncanspumpkin
6283993351 Move WallElement into its own header/source files 2024-10-07 22:04:13 +02:00
Aaron van Geffen
6f83e44a82 Add custom window captions for each page 2024-09-10 20:10:58 +02:00
Aaron van Geffen
cf516db6dc Split StringTypes.h off from String.hpp; adjust header includes 2024-09-10 23:55:53 +02:00
tmatale
14d0689b4f Fix #21959: No save prompt when starting a new game 2024-09-07 10:34:30 +00:00
Harry Hopkinson
003c196eb8 Cleanup gameState usage (#22692) 2024-09-04 07:34:37 +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
b1e2ca94c7 Fix clear scenery window closing (again) (#22456)
* Move ClearSceneryToolIsActive into ClearScenery window

* Actually apply/paint map selection in clear scenery tool

* LandRightsWindow: fix invalidation
2024-08-03 02:17:21 +10:00
Aaron van Geffen
dcea499327 Fix clear scenery window closing immediately (#22442) 2024-08-01 07:48:16 +00:00
Aaron van Geffen
706fd8f3f0 Fix #21175: Some hotkeys don't work when toolbars are hidden 2024-07-31 21:54:10 +02:00
Aaron van Geffen
b09e9fdf56 Move ToggleFootpathWindow into Footpath.cpp 2024-07-31 21:54:10 +02:00
Aaron van Geffen
2508a6020c Clean up tool events for custom scripts in TopToolbar.cpp 2024-07-31 21:54:10 +02:00
Aaron van Geffen
3a54d1b720 Move clear scenery tool functions from TopToolbar.cpp into ClearScenery 2024-07-31 21:53:35 +02:00
Aaron van Geffen
c9915efc11 Move scenery tool functions from TopToolbar.cpp into Scenery.cpp 2024-07-31 21:53:35 +02:00
Aaron van Geffen
bb4a357214 Move water tool functions from TopToolbar.cpp into Water.cpp 2024-07-31 21:53:35 +02:00
Aaron van Geffen
bae80ecfad Move land tool functions from TopToolBar.cpp into Land.cpp 2024-07-31 21:53:34 +02:00
mrmbernardi
9ed5c63857 Rename Location.hpp constants (#22385) 2024-07-26 10:23:25 +02:00
mrmbernardi
bdb4823d48 Fix #22209: Water tool selection may disappear near edge of map (#22256) 2024-07-21 20:32:23 +00:00
Aaron van Geffen
51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
Aaron van Geffen
7c9b27f57a Balance item groups in the load/save menu (#22108) 2024-05-29 15:39:33 +02:00
Gymnasiast
8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Aaron van Geffen
738471ff84 Deduplicate button width and alignment code 2024-05-09 12:35:34 +02:00
Aaron van Geffen
1e9bee0c00 Fixup: workaround for std::ranges::reverse_view being too new 2024-05-08 21:52:49 +02:00
Aaron van Geffen
e423575411 Add a config setting to toggle toolbar mode 2024-05-08 21:19:57 +02:00
Aaron van Geffen
6e607bbb37 Optionally align the toolbar buttons horizontally centred 2024-05-08 20:47:55 +02:00
Aaron van Geffen
16a7e36984 Refactor AlignButtonsLeftRight to use std::ranges::reverse_view 2024-05-08 20:20:33 +02:00
Aaron van Geffen
c4fdade375 Fix _topToolbarWidgets indentation 2024-05-08 20:04:32 +02:00
Aaron van Geffen
b37e2479c8 Refactor kWidgetOrderLeftGroup, kWidgetOrderRightGroup into std::array 2024-05-08 20:04:13 +02:00
Aaron van Geffen
d801882492 TopToolbar: refactor OnPrepareDraw into separate functions 2024-05-08 19:58:27 +02:00
Aaron van Geffen
a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Michał Janiszewski
7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
Gymnasiast
8beb50da61 Add a separator between “Load Game” and “Save Game” 2024-04-25 15:27:04 +02:00
Gymnasiast
a00f478104 Create TopToolbar::InitFileMenu() 2024-04-25 15:27:04 +02:00
Gymnasiast
9906a18bc7 Cheats menu: do not autoclose 2024-04-25 14:10:07 +02:00
Michael Steenbeek
c4c706c59c Merge pull request #21796 from Harry-Hopkinson/refactor-constants-Window.h
Replace constant notation in Window.h
2024-04-21 01:18:40 +02:00
mrmbernardi
b21f0504cf Pause button stays down while waiting for GameAction (#21816) 2024-04-15 14:26:44 +02:00