1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00
Commit Graph

56 Commits

Author SHA1 Message Date
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
Aaron van Geffen
c77b00898d Show formatted dates in load/save window. 2018-01-11 20:27:40 +01:00
Aaron van Geffen
c9b48beea0 Replace WWT_CLOSEBOX with WWT_BUTTON where not used as a close button. 2018-01-08 00:02:25 +01:00
Aaron van Geffen
ecc1cfed2a Rename WWT_DROPDOWN_BUTTON to WWT_BUTTON.
The previous name implied an exclusive association with dropdowns.
While used to display the dropdown triangle button, this is not an
exclusive use.
2018-01-08 00:01:32 +01:00
Ted John
83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek
755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Michał Janiszewski
33a94fe1bb Use C++ headers in C++ code 2018-01-04 07:36:54 +01:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Aaron van Geffen
25d5ff729a Increase padding and fix button alignment for load/save window 2017-10-28 09:32:31 +02:00
Christian F. Coors
e5ce3859a3 Fix Intent pointers/strings 2017-10-17 22:31:05 +02:00