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
Christian F. Coors
e1d24641a4
Fix saving without dialog in new scenario
2017-10-16 08:07:10 +02:00
vector-of-bool
57a8bbac23
Respect POSIX path separators on Windows ( #6356 )
2017-10-08 21:28:38 +02:00
Aaron van Geffen
34685b07a0
Fix #6407 : Load/Save window theme is not applied
2017-10-07 23:56:47 +02:00
Marijn van der Werf
47e65d1ab1
Finish rebase
2017-09-24 22:41:49 +02:00
Marijn van der Werf
b7164c5eac
Rename intent extra keys
2017-09-24 22:41:49 +02:00
Marijn van der Werf
d18e59ff17
Move loadsave dialog
2017-09-24 22:41:49 +02:00