Commit Graph
209 Commits
Author SHA1 Message Date
Gymnasiast 2398d91fb2 Rename DrawTextBasic() to DrawText() 2026-03-25 23:15:49 +01:00
Gymnasiast 800e656c4b Merge TTFGetStringWidth and GfxGetStringWidth 2026-03-25 23:14:57 +01:00
Gymnasiast df1564c9cd Namespace Drawing.String.cpp, declare its functions in Drawing.String.h 2026-03-25 23:14:57 +01:00
Gymnasiast 38adb756ee Make DrawText() internal again 2026-03-22 13:21:15 +01:00
matheusvb3 0271639f6d Rename OpenRCT2String to StringWithArgs (#26112) 2026-03-01 10:46:37 +00:00
Michael Steenbeek 343c7a70d7 Change colour to a strong enum (#25873) 2026-01-28 10:06:45 +01:00
Gymnasiast e46d2eba9e Move colour map to its own file 2026-01-17 18:46:54 +01:00
Gymnasiast 04a3d02023 Rename members of ColourShadeMap 2026-01-16 19:25:58 +01:00
matheusvb3 bba937a03d Remove more redundant namespace qualifiers (#25828) 2026-01-16 08:38:20 +01:00
Gymnasiast 8861833292 Pass PaletteIndex to Rectangle::fill() and IDrawingContext::FillRect() 2026-01-07 12:48:01 +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
Michael Steenbeek 6f24577027 Fix return value of Widget::width() 2025-11-08 10:27:58 +01:00
Gymnasiast 0ec4e3353b Update members of FontStyle 2025-11-03 23:25:30 +01:00
Gymnasiast 7c51ccde1e Rename Rect namespace to Rectangle 2025-10-23 18:44:45 +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 daa4fe8ac3 Rename field of all config categories 2025-10-07 20:21:32 +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
Michael Steenbeek 414689fb1b Dropdown: remove ‘format’ and ‘args’ altogether (#25053)
* Remove ‘format’ and ‘args’ altogether

* Change text field to a char array

* Small cleanup

* Apply changes to STR_1156/7 to all languages

* Fix width calculation
2025-09-07 00:09:46 +02:00
Aaron van Geffen cecac8ee0b Drop 'Network' from namespaced network constants 2025-09-05 12:53:42 +02:00
Gymnasiast 7f2c4261b4 Remove ‘format’ and ‘args’ altogether 2025-09-03 17:57:43 +02:00
Aaron van Geffen 5a4cc7d00d Remove Network function name prefixes given namespace qualifiers 2025-08-31 16:02:43 +02:00
Gymnasiast 0a639b7f33 Modify two dropdowns as an example 2025-08-21 22:08:36 +02:00
Gymnasiast 8fd9658cd3 Update dropdown item fields and functions to new code style 2025-08-21 21:33:22 +02: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 0779b9f0ab Replace window shim and widget macros with constexpr functions (#24566) 2025-06-07 23:02:14 +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
Aaron van Geffen 0382973afe Use window shim in more windows (#23986)
* ProgressWindow: use WINDOW_SHIM; call OnResize

* Use window shim in multiplayer windows
2025-03-13 20:14:34 +01:00
Aaron van Geffen 7a823bf928 Use WindowSetResize to set min/max dimensions in most places (#23929)
* Refactor WindowSetResize to use ScreenSize structs

* Let WindowSetResize return whether or not window was resized

* Use WindowSetResize to set min/max dimensions in most places
2025-03-05 15:58:59 +00:00
Michael Steenbeek 9f343abdda Reduce hardcoded positions for various windows 2025-02-26 21:09:54 +01:00
73 a976a43708 Rename network.h to Network.h (#23882) 2025-02-24 10:43:06 +01:00
73 b9b2c96c97 Rename sprites.h to SpriteIds.h (#23804) 2025-02-13 15:51:46 +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
MattandAaron van Geffen 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 fa06a49302 Update copyright year to 2025 (#23514) 2024-12-31 20:30:04 +01:00
Aaron van Geffen a24dc2e60a Reduce includes in and of Util.h/cpp 2024-12-11 20:42:43 +01:00