1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00
Commit Graph

139 Commits

Author SHA1 Message Date
Duncan
3393fa36d3 Move Ui window functions into Ui library (#22426)
* Move scroll widget functions

* Move window move functions

* De-snake

* Move further functions to ui

* Move widget function to widget file

* Move window create to ui
2024-07-31 15:06:19 +01:00
Duncan
681b54dc87 Add Some Items to the OpenRCT2::Ui namespace (#22423)
* Put widget in the Ui namespace

* Put theme in the Ui namespace

* Put objective in Ui namespace
2024-07-31 05:26:53 +01:00
Aaron van Geffen
3d5c19de08 Drop Localisation.h include where not required 2024-07-13 13:33:32 +02:00
Aaron van Geffen
e816e751c9 Merge pull request #22259 from AaronVanGeffen/rework-common
Rework common.h into local definitions
2024-07-12 21:27:17 +02:00
Aaron van Geffen
cee2eb1461 Move widget strings from localisation to Widget.h (#22279) 2024-07-12 18:47:56 +00:00
Aaron van Geffen
2e1fa5e644 Move a few more strings to UiStringIds.h (#22257)
* Replace more StringIds.h includes with StringIdType.h

* Move a few more strings to UiStringIds.h

* Tweak: TextComposition.cpp does not need InteractiveConsole.h
2024-07-12 14:59:00 +02:00
Aaron van Geffen
51873dc0f6 Include Diagnostic.h at unit level 2024-07-09 16:23:31 +02:00
UnknownShadow200
232f37e186 Fix #22161: Using arrow keys in textboxes crashes the game 2024-06-25 11:23:23 +02:00
Gymnasiast
8a181b5513 Split colours and colour flags 2024-05-26 12:35:40 +02:00
Gymnasiast
ae88b7b0fc Create progress bar widget 2024-05-19 20:20:29 +02:00
Aaron van Geffen
57a6b0a00c Remove STR_VIEWPORT (#22018)
* Remove STR_VIEWPORT

* Remove StringIds.h include from Main.cpp
2024-05-11 18:21:45 +00:00
Aaron van Geffen
96ce7f706f Move widget constants from Windows.h to Widget.h 2024-05-10 22:14:10 +02:00
Aaron van Geffen
a63d86c488 Introduce Config namespace and struct 2024-05-10 12:10:21 +02:00
Harry Hopkinson
98ac3a1bbc Replace GfxDrawString() with DrawText() 2024-05-10 09:56:03 +00:00
Michał Janiszewski
7b12667ddb Reduce <algorithm> include (#21947) 2024-05-01 13:47:27 +02:00
duncanspumpkin
3448926251 Move text input widget code from game lib to ui lib 2024-04-26 18:25:44 +02:00
Harry Hopkinson
78d95fc0bd Pass DrawPixelInfo by reference (#21563) 2024-03-10 12:00:08 -03: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
4349688de4 These function names have not reflected their use for a while (#20656) 2023-08-01 20:19:33 +01:00
Michael Steenbeek
5e495d63c7 Close #15660: Allow showing window buttons on the left (#20176) 2023-05-19 10:17:38 +02:00
Gymnasiast
bb83a80eab Use dpi ref in rect and line drawing functions 2023-04-11 22:59:01 +01:00
Gymnasiast
90d21dbe14 Use dpi ref in Widget.cpp 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
kyphii
39790779bb Extend color selection dropdown with more colors (#19446)
* Setup for extended palette

* Define order for color picker cells

* Init G2 Palettes in ColoursInitMaps

* Add Glass Palettes

* Use special sprite for Invisible color

* Set up new cheat for special colors

* Add glass palettes to palette_to_g1_offset

* Add entries for new colors in TranslucentWindowPalettes

* Finish implementation of special colors cheat

* Some cleanup

* New colors almost work

* Correct g2 palette loading indices

* Invisible color sprite displays properly

* Repaint works with large scenery and walls

* Prevent random shop items from overflowing to junk palettes

* More cleanup

* Fix glass palettes

* Add mapping of new colors to original colors for UI themes

* Fix junk palettes for random shop items

* Fix missing highlight color in software renderer

* Convert small scenery support flag to allow use of new colors

* Progress on displaying new colors in software renderer

* Fix invisible color scheme sprite

* Formatting cleanup

* Resolve comparison of integer expressions of different signedness

* Index g2 palette maps to fix visible chain lift

* Progress on fixing new colors in software renderer

* Fix station and support colors

* Fix dropdown selected index

* Get invisible color (mostly) working in software renderer

* Use forceBmp for palette resources

* Remove test function definition left in by mistake

* Remove some obsolete range checks for original color values

* Add changelog entry

* Reorder color dropdown based on NE user feedback

* Some cleanup

* Further cleanup

* Formatting

* Add include for GetPaletteMapIndexForColour

* Fix a couple things I broke

* Fix function placement

* Revert "Add include for GetPaletteMapIndexForColour"

This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759.

* Use color constants for color order list

* Make remappable colors contiguous

* turn off clang format for ordered color list

* Appease clang

* Use all colors for random shop item animation

* Improvements to palette map resources

* Fix chain lifts again + adjustments to a few colors

* Update changelog and contributors.md

* Revert changes to S4 and S6 importers which are no longer needed

* Bump network, plugin, and minimum park versions

* Revert "Progress on displaying new colors in software renderer"

This reverts commit 337602e4a7.

* Remove unnecessary comment

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 08:36:07 +01:00
Matthias Moninger
59875eb409 Merge pull request #19480 from Gymnasiast/refactor/dpi-string
Pass DPI by ref to string drawing
2023-02-28 22:27:51 +02:00
ζeh Matt
ec2f332b92 Fix #19445: Text not cleared using Ctrl+Backspace 2023-02-25 15:42:37 +02:00
Gymnasiast
a15f72da87 Pass DPI by ref to string drawing 2023-02-24 22:05:07 +01:00
Michael Steenbeek
583b4ed0e6 Replace GfxDrawStringNoFormatting() (#19414)
* Replace GfxDrawStringNoFormatting()

* Unwrap static DrawText overload
2023-02-15 22:44:22 +00:00
Silent
0763fd5a78 Fix GfxWrapString potentially corrupting the in/out buffer
Fixes a consistent assertion when displaying "Cannot start construction"
in Japanese, but it has potential fix countless other crashes
related to string wrapping/display.
2023-02-14 09:50:05 +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
Hielke Morsink
0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Michael Steenbeek
12874f2af7 Replace format_string(4) with OpenRCT2::FormatStringLegacy() (#19190)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 21:56:30 +01:00
Hielke Morsink
6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek
b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00: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
Tulio Leao
07d5f73f5d Fix bitwise operation between different enumeration types
On C++20 doing bitwise operation between different enumeration types
is deprecated.
2023-01-10 22:48:06 +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
Gymnasiast
38f7c2a159 Allow using ImageId in widgets directly 2022-12-31 15:18:22 +01:00
Gymnasiast
162b01204d Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Gymnasiast
b97ee766d5 Refactor out IMAGE_TYPE_REMAP from widgets 2022-12-31 15:16:07 +01:00
Hielke Morsink
31dd4bf604 Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Gymnasiast
14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Gymnasiast
89cd86da4d Fix #18290: Ride and plug-in window colours not appearing 2022-10-11 14:44:07 +02:00
Michael Steenbeek
6fe19878f6 More ImageId cleanup (#18258)
* Remove more usages of uint32 image indices

* Remove unused gfx_get_sprite_size()

* Remove uint32 images from text drawing

* Remove now-unused ImageId overload

* Default-initialise ttfRunIndex

* Suppress false-alarm GCC error
2022-10-10 19:42:40 +01:00