Commit Graph

76 Commits

Author SHA1 Message Date
Gymnasiast a15f72da87
Pass DPI by ref to string drawing 2023-02-24 22:05:07 +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
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
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
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 162b01204d
Rename rct_widget to Widget 2022-12-31 15:18:22 +01:00
Duncan 482971710d
Apply code style to context functions 2022-11-06 21:49:07 +01:00
73 643d79b700
Changed ride vehicle list to have less padding (#18350)
Co-authored-by: Rik Smeets <30838294+rik-smeets@users.noreply.github.com>
2022-11-05 13:43:15 +01:00
Gymnasiast 14f9a75e0a
Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Gymnasiast 418c5a6708
Use GetColourButtonImage() for remaining windows 2022-10-11 14:44:45 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Hielke Morsink 7f29e4e39c
Make `rct_windowclass` strong type `WindowClass`
This already revealed some places where implicit conversions were done, including some where its use was nonsense (MouseInput.cpp).
The changes to the Intent class were necessary to keep things working, and this splits things up more neatly.
2022-08-21 18:38:25 +02:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
Duncan 1cc2901680
Dropdown Window Class Refactor (#17278)
* Move dropdown window to class

* Refactor and move locals into member vars

* Deduplicate slightly

* Apply review comments
2022-05-29 01:06:23 +01:00
Gymnasiast 4abbfcb32b
Create dropdown item flags 2022-02-13 00:14:33 +01:00
Gymnasiast 723867e0a0
Create Dropdown::Item and use it for gDropdownItems 2022-02-12 23:57:22 +01:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
ζeh Matt 16635b9192
Implement custom BitSet and replace std::bitset 2021-12-12 23:47:17 +02:00
Ted John d427098e39 Refactor terrain and path to use ImageId 2021-12-07 20:46:15 +00:00
Duncan bb2c7dbaca
Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
Duncan 3f19d6f7d7
Split Peep header Guest into separate header (#15810)
* Move guest functions and classes to guest header

* Reduce includes of Peep.h
2021-10-28 21:38:23 +01:00
Michael Steenbeek 62a9096079
Fix #15466: Crash when opening dropdown with 0 rows 2021-10-20 18:50:21 +02:00
Sijmen 83a3da0a28
Refactor window_dropdown_paint (Part of #12098) (#15574)
* Refactor window_dropdown_paint

- Use ScreenRect (#12098) and ScreenCoordsXY
- Move variables to a more local scope, with the appropriate types
- Reduce nesting in if statements

* Apply suggestions from code review

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>

* Combine all screenCoords calculations in window_dropdown_paint

* Remove brackets from cellCoords calculation

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2021-10-14 20:46:45 -03:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Gymnasiast 7fd049c22e
Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast 503273793a
Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
Gymnasiast 2477933c51
Turn font sprite base into a strong enum 2021-02-28 00:23:00 +01:00
Łukasz Pękalski 4adf745237
Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
ffrogman 7ed1804e61
Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 68bd035f12
Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
Gymnasiast d140dd72c6
Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast b788a099b5
Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Tulio Leao 731a93dc39
Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Aaron van Geffen b34b573ad9
Refactor more widget definitions (#12354)
* Refactor Dropdown

* Refactor EditorMain

* Refactor EditorScenarioOptions

* Refactor InstallTrack

Increased window height to 460 (was 448); one line of text was overflowing.

* Refactor Guest

* Refactor LandRights

* Refactor LoadSave

* Refactor Main

* Refactor Map

* Add extra constants to EditorScenarioOptions
2020-07-27 19:54:22 -03:00
frutiemax af0fc89cf4
Close #12456: Refactor INPUT_STATE to use strong enum (#12484) 2020-07-27 19:51:10 -03:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax 0e96674a46
Part of #12096: ScreenRect w/ gfx_fill_rect in libopenrct2ui (#12188) 2020-07-10 13:59:08 -03:00
Aaron van Geffen 681b8d7938
Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
TomasZilinek 9d965ccfb6
Part of #12017 - create gfx_draw_sprite overload (#12026)
* Part of #12017 - create gfx_draw_sprite overload

Part 1. Creates the overload and replaces about a half of the calls since there are too many for one PR.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-23 18:32:34 -03:00
TusharSariya 2cf95adc4b
Fix #11565: gfx_draw_string_left_clipped to use ScreenCoordsXY (#11765)
* Issue #11565, created overload for gfx_draw_string_left_clipped

Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
Tulio Leao d0704baab2 Make window_dropdown_show_text() use ScreenCoordsXY 2020-05-01 15:58:36 -03:00
Tulio Leao 4933785b1c Make window_dropdown_show_text_custom_width() use ScreenCoordsXY 2020-05-01 15:48:20 -03:00