1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00
Commit Graph

156 Commits

Author SHA1 Message Date
Gymnasiast
5e6f5ceb6f Update members of TextDarkness 2025-11-03 23:25:29 +01:00
Gymnasiast
e90e6cb888 Add loadImages parameter to LoadTempObject() 2025-10-27 20:25:21 +01:00
Gymnasiast
7c51ccde1e Rename Rect namespace to Rectangle 2025-10-23 18:44:45 +02:00
Gymnasiast
298f3fdeb1 Replace remaining rectangle flags with Rect::FillMode enum 2025-10-23 18:42:50 +02:00
Gymnasiast
679064da77 Replace INSET_RECT_FLAG_FILL_MID_LIGHT with Rect::FillBrightness enum 2025-10-23 18:42:07 +02:00
Gymnasiast
93c3d99546 Move rectangle drawing into its own namespace 2025-10-23 18:41:08 +02:00
Gymnasiast
9e9b774266 Move rectangle drawing to Rect.{cpp,h} 2025-10-23 18:40:04 +02:00
Gymnasiast
a5d173efda Create border style enum for GfxFillRectInset 2025-10-23 18:40:03 +02:00
Gymnasiast
daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +02:00
Gymnasiast
45912ec9a3 Rename members of SoundId 2025-10-01 20:35:34 +02:00
Gymnasiast
a03613df35 Change FilterPaletteID to lowerCamelCase 2025-09-23 21:09:54 +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
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
Aaron van Geffen
e88c5e4399 Move Scenario::Category into its own unit 2025-08-22 18:07:55 +02:00
Aaron van Geffen
f11d1e33d0 Move Scenario::Objective into its own unit; enum class ObjectiveType 2025-08-22 17:40:47 +02:00
Michael Steenbeek
f9b132e24d Remove sorting by difficulty in the scenario selector
This is barely used, complicates the scenario selector and Options window, and will get in the way when adding RCTC and custom campaign support. Time to remove it.
2025-06-24 10:53:26 +00:00
Michael Bernardi
b72e2e1c98 Clear stale scenario repo pointers during language change. 2025-06-17 22:42:18 +10:00
Michael Bernardi
1bc0eca74c Remove unused includes 2025-06-17 22:42:13 +10:00
Michael Steenbeek
7b322d825a Refactor constants in window .cpp files 2025-06-16 23:10:47 +02:00
Gymnasiast
81e3181ebb Pass ScreenSize to makeWindowShim() 2025-06-10 23:21:15 +02:00
Gymnasiast
bdba89f428 Pass ScreenSize to window creation functions 2025-06-10 23:20:28 +02:00
Gymnasiast
650fa3ae2e Rename WindowWidgetType to WidgetType and change for new code style 2025-06-10 19:55:12 +02:00
Gymnasiast
149468406b Update WindowColour enum for new code style 2025-06-10 19:53:12 +02:00
Gymnasiast
86e265f093 Make widget creation functions lowerCamelCase 2025-06-10 19:51:21 +02:00
Aaron van Geffen
a4e92770fd Defer temp object Load/Unload to calling side 2025-05-28 00:58:25 +02:00
Aaron van Geffen
342f10a63c Load scenario previews using temp objects too 2025-05-27 23:17:25 +02:00
Aaron van Geffen
d51a1754b4 Work around TryClassifyFile not working with .sea files 2025-05-25 22:21:08 +02:00
Aaron van Geffen
0f59d6dd02 Optionally allow scenario previews to use screenshots 2025-05-21 18:07:19 +02:00
Aaron van Geffen
ed6aa6c356 Show 'loading' stub while preview is being loaded 2025-05-16 21:44:57 +02:00
Aaron van Geffen
7cd59ab75f Create park preview images from scenario meta objects 2025-05-16 14:33:21 +02:00
Aaron van Geffen
0779b9f0ab Replace window shim and widget macros with constexpr functions (#24566) 2025-06-07 23:02:14 +02:00
Aaron van Geffen
f64d5bb4a6 Implement OnLanguageChange event for ScenarioSelect window (#24519) 2025-05-28 00:31:43 +02:00
Aaron van Geffen
3721dbdffa ScenarioSelect: load minimap using background worker (#24436) 2025-05-18 15:45:11 +02: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
Aaron van Geffen
3f87e2b67a Centralise ResizeFrame in WindowBase and call when setting widgets or resizing 2025-04-11 20:37:54 +02:00
Garrett Leach
a8c476a9a2 Fix crash from failing to open file for preview (#24171)
If the file open fails in FileStream it will throw an IOException. We now capture that exception in the existing catch.
2025-04-07 21:26:10 +00:00
Aaron van Geffen
2d32c8766c Draw minimap in scenario selection screen for .park based scenarios 2025-03-09 17:49:41 +01:00
Gymnasiast
be31812fa8 Create strong enum for ScenarioSelectMode 2025-03-25 15:09:23 +01:00
Gymnasiast
a8982ac113 Rename SCENARIO_CATEGORY and turn into strong enum 2025-03-25 15:09:23 +01:00
Michael Steenbeek
9f343abdda Reduce hardcoded positions for various windows 2025-02-26 21:09:54 +01:00
73
c7c703515e Rename audio.h to Audio.h (#23842) 2025-02-17 13:24:03 +01:00
Briar
376cb7980c Fix #9999-#10003: translations have truncated strings
This issue, along with several related language-specific
trunctions, was traced back to the fact that ScenarioIndexEntry
uses a fixed-length array of utf8 characters to store the name,
internal name, and scenario details. In some cases, this does
not provide enough characters to contain the full description
and so the safe copy methods truncate them to fit in the
available buffer.

Since the use of fixed-size arrays is a holdover from earlier
C code, this commit addresses the issue by changing ScenarioIndexEntry
to use proper utf8 strings and string views, which do not require
truncation.
2025-02-15 00:18:24 +01:00
73
b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +00:00
Michael Steenbeek
b0c99fcb6c Refactor more constants to kConstant notation 2025-01-22 16:16:55 +00: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