Commit Graph

67 Commits

Author SHA1 Message Date
Aaron van Geffen 8c0186d9a4 Make file window button captions fit in more languages.
The window is made 10px wider to accommodate button captions in languages like Japanese.
2020-03-16 22:56:04 +01:00
Tulio Leao 724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao 9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao c4a865384e Move Mac-only str handling functions to Platform (#10264) 2020-01-04 12:44:40 +01:00
Tulio Leao fe3d6f6faf Use ScreenCoordsXY for scroll_mouse* functions 2019-11-14 08:40:40 -03:00
Tulio Leao d1cec43065 Use constexpr on openrct2-ui/* 2019-10-29 18:48:04 -03:00
Matt cc6321048f
Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
duncanspumpkin 54d6722bf2 Link everything together 2019-08-09 20:40:35 +01:00
duncanspumpkin e3c63b762e Create new TrackDesign format 2019-08-09 20:39:53 +01:00
Ted John 5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Michael Steenbeek abc13422ed
Fix #9132: System file browser cannot open SV4 files 2019-05-14 22:12:23 +02:00
hokasha2016 dc90b2873a Sort files in logical rather than dictionary order (#9012) 2019-04-03 00:16:47 +02:00
hokasha2016 70ae847a72 Fix #8219: Faulty folder recreation in "save" folder 2019-03-28 20:20:01 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John 08b02943d3 Use std::string for scenario name, details etc. 2018-12-16 19:01:14 +00:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Aaron van Geffen f8c765f798
Fix #7912: 'New folder' and 'New file' buttons are missing (#7926) 2018-08-22 00:00:44 +02:00
Hielke Morsink e7af3290c0 Fix system file browser not populating properly (#7916) 2018-08-21 23:19:32 +02:00
Hielke Morsink 3e2f8148c5
Fix #7911: Unable to save new scenarios (#7914)
The problem was that the filters have changed so they included the '*' character. This got appended to the path, which caused the check for valid filenames to fail.

This commit reverts the offending strings and code lines to how it was before.
2018-08-19 19:49:49 +02:00
Aaron van Geffen c4f93e24b5 Rename heightmap load/save type; add heightmap dir. 2018-08-18 13:28:27 +02:00
Aaron van Geffen 4b4510b347 Refactor common code to their own functions. 2018-08-18 13:28:27 +02:00
Aaron van Geffen 25170fda45 Implement #7658: Add option to always use system file browsing window. 2018-08-18 13:28:27 +02:00
Michael Steenbeek 9f891bfdcc
Allow opening SV7 files 2018-08-16 16:16:56 +02:00
Gymnasiast 45b8ca9421 Remove more strings, fix error 2018-08-12 15:56:47 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Hielke Morsink 8aa122f54e Use empty initializer lists in the openrct2ui project 2018-06-05 14:37:24 +02:00
Michał Janiszewski a2ef4bd699
Exclude pre-formatted blocks from clang-format (#7520)
[ci skip]
2018-05-16 20:41:29 +02:00
Hielke Morsink 9ddda9ac77 Move comment 2018-03-24 13:34:05 +01:00
Hielke Morsink 6528a2fe37 Invalidate window when populating list
The new comment is there for clarity, because this confused me for a sec.
2018-03-24 13:25:40 +01:00
Hielke Morsink 45a92a7356 Fix #5210 Unable to open system dialog for saving
The reason the file dialog failed to open (on Windows at least) is that the dialog would be used to save a file, yet a folder was provided as the default path. This commit attempts to append a logical filename to the path, including an extension.
2018-03-24 13:25:40 +01:00
Hielke Morsink c5aececcb1 Set scenario save path upon successfully loading a park
Instead of setting the path when clicking on a file in the loadsave dialog, it's now set when the park gets actually loaded.

This fixes the System Dialog not showing when saving a park loaded from command.
2018-03-24 13:24:39 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Hielke Morsink ced75956d1 Populate loadsave window with absolute path
When pressing "up", the code would look for the parent in the given path, which doesn't work well with relative paths. This commit fixes this behaviour.
2018-02-08 14:23:21 +01:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Ted John cb720025fa Replace platform_enumerate_directories_begin with FileScanner code
This is isn't a particularly pretty implementation but it is only temporary until we can use std::filesystem.
2018-01-18 11:38:52 +01:00
Ted John 6fd56d140d Remove remaining uses of platform_enumerate_files_begin 2018-01-18 11:38:52 +01:00
Aaron van Geffen 81398d9225 Reset resize widget's top position properly when invalidating. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 4d219c3abe Refactor name and path into std::string, too. 2018-01-11 20:27:40 +01:00
Aaron van Geffen eb0ad92e6d Use std::vector as LoadSaveListItem container. 2018-01-11 20:27:40 +01:00
Aaron van Geffen fce2996a73 Format braces in LoadSave.cpp. 2018-01-11 20:27:40 +01:00
Aaron van Geffen aa82df2647 Experimental: use system date/time settings on Windows. 2018-01-11 20:27:40 +01:00
Aaron van Geffen ada31ede29 Change header/sort button appearance. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 9d96377e9b Infer optimal date width when opening load/save window.
In order to accomodate MSVC, we're not using strptime.
2018-01-11 20:27:40 +01:00
Aaron van Geffen 004e60ccc6 Use virtual columns to align date and time.
This also makes the date column use a fixed width. Useful when resizing.
2018-01-11 20:27:40 +01:00
Aaron van Geffen ca172b46c1 Make load/save window resizeable. 2018-01-11 20:27:40 +01:00