Commit Graph
320 Commits
Author SHA1 Message Date
Harry Hopkinson d6863ccf99 Remove openrct2-ui/interface includes 2026-08-11 10:16:19 +01:00
Gymnasiast f08bc61f03 Refactor park flags into enum class+FlagHolder 2026-08-08 18:49:32 +02:00
Michael Steenbeek 0284f9cda6 Refactor dropdown flag to FlagHolder, reverse "stay open" flag (#26855) 2026-08-02 19:22:52 +02:00
Aaron van Geffen d517f19ce2 Use flags for widget visibility instead of empty widget type (#26801)
* Use widget visibility instead of empty widget type

* Add widget visibility helper functions

* Remove ::empty type from Banner window

* Remove ::empty type from EditorBottomToolbar window

* Remove ::empty type from ToolbarTop window

* Remove ::empty type from EditorInventionsList window

* Remove ::empty type from EditorObjectSelection window

* Remove ::empty type from EditorScenarioOptions window

* Remove ::empty type from Finances window

* Remove ::empty type from Footpath window

* Remove ::empty type from TrackList window

* Remove ::empty type from TitleMenu window

* Remove ::empty type from ProgressWindow window

* Remove ::empty type from MapGen window

* Remove ::empty type from Map window

* Remove ::empty type from Sign window

* Remove ::empty type from LoadSave window

* Remove ::empty type from GameBottomToolbar window

* Remove ::empty type from GuestList window

* Remove ::empty type from TileInspector window

* Remove ::empty type from Themes window

* Remove ::empty type from ScenarioSelect window

* Remove ::empty type from Staff window

* Remove ::empty type from StaffList window

* Remove ::empty type from Options window

* Remove ::empty type from Scenery window

* Remove ::empty type from RideList window

* Remove ::empty type from NewCampaign window

* Remove ::empty type from NewRide window

* Remove ::empty type from Research window

* Remove ::empty type from RideConstruction window

* Remove ::empty type from Multiplayer window

* Remove ::empty type from Park window

* Remove ::empty type from Ride window

* Remove ::empty type from LandRights window
2026-08-02 17:48:50 +02:00
Michael Steenbeek 4aa32fd978 Migrate some tile iteration loops to TileElementsView (#26769) 2026-07-11 17:07:54 +02:00
Michael Steenbeek 1be4d6d94b Update TileElementType to use new codestyle (#26766) 2026-07-09 17:50:25 +00:00
Marino Rottier 6c6acd527b Rename TileElementBase members (#26522)
* Rename TileElementBase members to camelCase

* Rename RCT12TileElementBase and RCT12TileElement members to camelCase
2026-05-17 13:21:16 +00:00
frozensnowy 4638d3f505 Fix #26492: Drag tool shows per tile error when running out of money midway (#26493)
The path and wall drag tools query each tile individually for affordability so all queries pass when the player can afford any single tile. But if the total exceeds available funds, execution fails midway with per tile error windows. To fix it this adds a total cost check against available funds after the query phase, showing a single combined error with the full cost before execution actually starts
2026-05-05 11:23:21 +02:00
Marino Rottier 45ff80d890 Refactor widget state to single storage model (#26443)
* Allow flag/bitmask coexistence in readers

* Add factory helpers and bulk setters for per-widget flags

* Switch coexistence from OR-both to per-window opt-in

* Migrate seven small windows to per-widget flags

* Migrate seven more windows to per-widget flags

* Migrate Cheats, MapGen and Footpath to per-widget flags

* Fix #26421: scenery tab highlight wraps when there are 64+ groups

* Migrate Ride window to per-widget flags

* Migrate ride and maze construction windows to per-widget flags

* Migrate six more windows to per-widget flags

* Migrate Banner, EditorScenarioOptions and RideList to per-widget flags

* Migrate SceneryScatter and LoadSave to per-widget flags

* Migrate EditorObjectSelection, GameBottomToolbar, Guest, Map, NewRide and Park to per-widget flags

* Migrate TopToolbar, TrackList, Research, Player and Options to per-widget flags

* Opt in remaining windows to per-widget flags

* Narrow getters and setters to per-widget flags

* Remove bitmask fields and useWidgetFlags switch

* Restore switch statements for tab/density pressed state

* Add makeHoldableSpinnerWidgets to drop per-page loops

* Update tests for per-widget flag storage

* Add changelog entry for #26421

* Reword narrative-tense comments from the migration

* Fix clang-format violations

* Remove dead holdable-widget tables from Park and Finances
2026-04-28 09:26:02 +02:00
frozensnowy c3ffee33df Fix #25926: Path drag tool shows cost for single tile instead of total
Query all tiles before execution to calculate total cost and detect errors upfront. It now shows a single combined error with the accumulated total cost for insufficient funds instead of per tile errors
2026-03-29 00:05:36 +01:00
frozensnowy 7cd1c42a60 Fix #25919: Path drag tool error sound stacks when placement fails
Disable error window sound during the placement loop and play the error sound once at the end if all tiles failed. This prevents the sound from stacking when multiple tiles fail simultaneously.
2026-03-29 00:05:09 +01:00
Gymnasiast 49fa735600 Do not run drawText* through formatter if there are no arguments 2026-03-26 16:00:06 +01:00
Aaron van Geffen 8ed4b34907 Move includes out of Drawing.h and into their actual users 2026-03-26 12:55:37 +01:00
Gymnasiast a5c32ab60c Rename DrawText* to drawText* 2026-03-25 23:16:25 +01:00
Gymnasiast 2398d91fb2 Rename DrawTextBasic() to DrawText() 2026-03-25 23:15:49 +01:00
Aaron van Geffen ed14f44bf0 Rework WindowDropdownShowImage to take ScreenCoordsXY& 2026-02-06 23:04:24 +01:00
Aaron van Geffen 1cc7006127 Reorganise game actions into folders (#25987) 2026-02-10 08:57:40 +01:00
Aaron van Geffen 773ba479cd Create separate unit for GameActionRunner 2026-02-09 16:06:56 +01:00
matheusvb3 416a005b88 Replace uses of .size() or .length() with .empty() when appropriate (#25950) 2026-02-05 13:14:12 +01:00
matheusvb3 2f9f5bc7a1 Remove top-level const qualifiers from function declarations (#25813) 2026-01-15 13:14:28 +01:00
matheusvb3 e039662267 Remove redundant namespace qualifiers (#25821) 2026-01-15 13:10:42 +01:00
Gymnasiast 63354de46b Rename members of FootpathSelection 2026-01-11 19:25:52 +01:00
Aaron van Geffen b5cd780b3e Rework drawing header includes (#25744)
* Move Csg unit into OpenRCT2 namespace

* Move G1Element into its own header file

* Clean up SpriteCommands.h

* Add trailing namespace comment to Csg.cpp

* Remove Drawing.h dependency from Graph.h

* Add <memory> include to G1Element.h

* Remove Drawing.h include from ImageTable.h (used by all objects!)

* Drop Drawing.h dependency from OpenGLFramebuffer.h

* Drop Drawing.h dependency from TextureCache.h

* Drop Drawing.h include from TitleScene.h

* Drop Drawing.h dependency from Widget.h

* Add <optional> include to SpriteFile.h

* Add Drawing.h to PlayTests, S6ImportExportTests

* Include <cstdint> in TitleScene.h for SIZE_MAX
2026-01-05 19:09:34 +00:00
Aaron van Geffen 40aaf97c07 Update copyright years to 2026 (#25741) 2026-01-05 13:42:59 +00:00
Aaron van Geffen 8a0a655025 Unwrangle Drawing.h and Paint.h (#25706)
* Drop Drawing.h include from Paint.h

* Split off RenderTarget to its own header/unit

* Move FilterPaletteID to its own header
2025-12-26 12:58:33 +01:00
matheusvb3 490bf3ec30 Remove redundant parentheses around FlagHolder method invocations (#25695) 2025-12-23 18:16:44 +01:00
matheusvb3 39729f23e9 Remove redundant parenthesis around negated .has FlagHolder checks 2025-12-23 14:19:37 +01:00
Michael Steenbeek 13795ce082 Close #25244: Unify kImageIndexUndefined and kSpriteIdNull (#25683) 2025-12-21 16:19:35 +01:00
Michael Steenbeek fcd16cb00a Close #25515: create a specific permission for the path drag tool (#25675) 2025-12-21 12:49:17 +01:00
mix 6414cf26a3 Rename InputFlag::unk6 to allowRightMouseRemoval 2025-12-14 02:51:38 +00:00
Michael Steenbeek 5a547fc2bb Fix return value of Widget::height() 2025-12-12 18:26:05 +01:00
Gymnasiast c744b76632 Rename members of GameActions::Result 2025-12-12 12:11:49 +01:00
Gymnasiast 5ffee91c8a Rename members of GameActions::Status 2025-12-12 11:41:49 +01:00
Michael Steenbeek 355bb5d58d Refactor GAME_COMMAND_FLAG_* to enum+FlagHolder 2025-12-11 00:12:21 +01:00
mix e0f9e756cb Rename OpenRCT2::MapSelection functions to lowerCamelCase 2025-11-23 00:17:16 +00:00
mix 6631b452ad Encapsulate selected tiles and invalidate when changed 2025-11-23 00:17:15 +00:00
mix f3cedcc1d9 Remove manual map selection invalidation calls 2025-11-23 00:17:15 +00:00
Michael Steenbeek 7068ea67e3 Fix #25454: Pathing Tool Closes When Land Tool Opens 2025-11-12 23:39:37 +01:00
Gymnasiast 124352c922 Update members of TextAlignment 2025-11-03 23:25:29 +01:00
Gymnasiast f39aa017e8 Fix: clicking an unsuitable piece of land in footpath drag mode will place a piece anyway
Specifically, path will be placed on the last tile that was suitable.
2025-10-20 20:01:02 +02:00
Gymnasiast 97cebeed81 Fix #25359: No preview when hovering on sloped land in path drag mode 2025-10-20 19:59:17 +02:00
Michael Steenbeek 6f58c2e7d0 Fix #25375: SHIFT placement no longer works on singular path tool 2025-10-20 14:54:56 +02:00
Michael Steenbeek 9e03ec4caa Fix stack corruption when footpath dragging 2025-10-19 22:35:57 +02:00
Michael Steenbeek ff580112c8 Add footpath dragging tool 2025-10-17 19:37:19 +00:00
Gymnasiast 53f345d4dc Small codestyle fixes 2025-10-12 22:47:00 +02:00
Gymnasiast 0e3494b701 Use SlopePitch for _footpathConstructSlope 2025-10-12 22:47:00 +02:00
Gymnasiast 70ae5e0304 Create SlopePitch 2025-10-12 22:47:00 +02:00
Gymnasiast c2c834df15 Create struct for footpath slope 2025-10-12 22:46:59 +02:00
Gymnasiast 1f8c9af9ce Rename methods of InputManager 2025-10-01 20:35:35 +02:00
Gymnasiast 45912ec9a3 Rename members of SoundId 2025-10-01 20:35:34 +02:00