Commit Graph
188 Commits
Author SHA1 Message Date
Hielke Morsink 0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Michael Steenbeek bb55c6ce66 Remove loadsasnakes (#19192)
* Rename snake_case methods in scenario folder

* Rename snake_case methods in title folder

* Rename snake_case methods in object folder

* Rename snake_case methods in platform folder

* Rename snake_case methods in windows folder

* Rename tile_inspector.h to TileInspectorGlobals.h

* Rename snake_case methods in ui/windows folder
2023-01-17 19:46:55 +00:00
Hielke Morsinkandduncanspumpkin 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 Steenbeekandduncanspumpkin bf5f7e8e71 Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00:00
Michael Steenbeek b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
Gymnasiast 5309c80e29 Remove snake_case in interface folder 2023-01-16 22:20:41 +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
Gymnasiast a516dc507e Replace str_is_null_or_empty() with String::IsNullOrEmpty() 2023-01-08 16:19:18 +01:00
Henry Cheng bf986e43c6 Fix #18970: Trying to load a non-park save will now display context error (#19007)
Fix https://github.com/OpenRCT2/OpenRCT2/issues/18970
2023-01-06 08:05:04 -03: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
Hielke Morsink e902b08876 Apply review changes 2022-11-20 21:47:56 +01:00
Hielke Morsink 056af36cdf Move initialization to constructor 2022-11-20 21:41:24 +01:00
Hielke Morsink e22dd3ac32 Refactor LoadSaveWindow to class
Closes #13778
2022-11-20 21:39:30 +01:00
Duncan 482971710d Apply code style to context functions 2022-11-06 21:49:07 +01:00
Michael Steenbeek 27f3a3a796 Create function to resize window frame 2022-11-06 10:29:40 +01:00
Hielke Morsink 31dd4bf604 Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Henry Cheng cf9ec0bd4a Fix no overwrite alert on Windows if there are capitalization differences (#18375) 2022-10-26 08:19:44 +02:00
Gymnasiast 14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Hielke Morsink f91df4138c Merge pull request #18359 2022-10-18 23:39:49 +02:00
Hielke Morsink 3bb8ea3668 Better annotate some magic numbers in for loops 2022-10-17 16:08:55 +00:00
Hielke Morsink 5fa53ad528 Rename global config functions to use TitleCase 2022-10-16 21:46:08 +02:00
Hielke Morsink abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02:00
Rik Smeets 0c78a27d9f Fix missing validation on invalid characters in file name (#18287)
When saving a new file with a name containing '/' or '\' on Windows, the incorrect file name would be determined since these characters represent a new folder. This would trigger a failure on save.

The user's input should be validated in all cases. Before, it was only executed for folder names. This change also applies the validation on file names.
2022-10-11 13:27:11 +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
Rik Smeets 425000bfca Don't prompt to 'Save game as' when saving (#16819)
After loading a saved game and choosing 'Save game', the 'Save game as' window would open the first time every time after loading the save.
Now, it will be saved using the existing save path, except when an autosave is loaded which the player probably doesn't want to overwrite.
2022-09-25 08:33:28 +02:00
Gymnasiast 45e7ee6a73 Rename rct_window_event_list to WindowEventList 2022-08-27 16:56:52 +02:00
Gymnasiast a088537b65 Rename rct_widgetindex to WidgetIndex 2022-08-21 18:49:23 +02: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 a258008bef Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
Hielke Morsink 76c1bc8980 Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
Hielke Morsink 6b94d8c0bc Fix overwriting buffer for parent directory when browsing "Up" 2022-05-22 14:32:06 +00:00
germanaizek 958bfbc08a Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen 2022-05-07 16:05:39 +02:00
germanaizek 0045aed7f9 Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors 2022-05-07 16:05:38 +02:00
duncanspumpkin f835a5b521 Apply clang-tidy to static variables 2022-03-18 00:38:26 -03:00
Silent 771637f24c Refactor filename_valid_characters into Platform::IsFilenameValid 2022-03-16 21:56:54 +01:00
Silent 3773fa4cb0 Refactor uses of path_append_extension 2022-03-10 20:18:17 +01:00
Michael Steenbeek c334c7a176 Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename
Remove four old path functions
2022-03-02 22:25:08 +01:00
Hielke Morsink 55c71b0c74 Properly use utf8 strings where expected 2022-03-01 22:12:39 +01:00
Gymnasiast 376c79408a Replace path_set_extension with Path::WithExtension() 2022-02-26 18:26:24 +01:00
Gymnasiast 49b414a40e Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Charles Machalow 59c4beb3dd Fix bug where file extension can get added twice (#16720) 2022-02-26 06:25:06 +00:00
Charles Machalow 6406b18c98 Fix #16715. The first time we save a park, default to the park's name… (#16719)
* Fix #16715. Default to the park's name as the file name

* Mark Combine as nodiscard

The return value must be used for the function to do something
2022-02-26 06:23:30 +00:00
Michael Steenbeek 5edc561715 Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Ted John da89a4e413 Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
Silent 09897ede9e Refactor last_*_directory and last_run_version to use u8string
Fixes a regression from #16631 causing a crash when
constructing u8string from a nullptr
2022-02-13 21:34:26 +01:00
Silent 46deac8620 Fix a crash in WindowLoadsaveOpen when last_game_directory is empty
The variable path was left unitialized, which worked fine
in Release builds most of the time, but consistently crashed in Debug.
2022-02-12 00:53:26 +01:00