Commit graph

109 commits

Author SHA1 Message Date
Tulio Leao
4933785b1c Make window_dropdown_show_text_custom_width() use ScreenCoordsXY 2020-05-01 15:48:20 -03:00
duncanspumpkin
fed148648c Use IsPeep in more places 2020-04-28 07:57:47 +01:00
Breno Guimaraes
2019fa4655 Replay set_format_arg calls in favor of using Formatter 2020-04-25 19:35:49 -03:00
Tulio Leao
935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Ted John
d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Tulio Leao
724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao
87f724d038 Use Coords objects for viewport_create() 2020-03-02 20:49:59 -03:00
Tulio Leao
9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
duncanspumpkin
164acc85cc Rename sprites to newer style naming 2020-01-19 17:10:53 +00:00
Tulio Leao
c91bdadb47 Use ScreenCoordsXY on viewport interactions 2019-11-21 17:53:28 -03:00
duncanspumpkin
e4ee91f5ff Refactor get_map_coordiantes to enforce Coords struct 2019-11-14 20:28:54 +00:00
Duncan
219046af14
Merge pull request #10136 from tupaschoal/constexpr-for-openrct2ui-define
Use constexpr on openrct2-ui/*
2019-10-30 06:44:11 +00:00
Tulio Leao
afc14183e7 Use ScreenCoordsXY for tool_* functions 2019-10-29 19:02:58 -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
Ted John
40d49b93d3 Do not use user strings for peep names 2019-07-29 19:18:16 +01:00
Ted John
3f45976009 Fix openrct2ui errors 2019-07-29 19:18:16 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John
ca023f7c5e Fix #8829: invalid read in window_guest_open 2019-03-09 13:05:12 +00:00
Ted John
cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Matt
a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +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
Ted John
5a368ce6d9 Move theme code to libopenrct2ui 2018-06-10 23:34:27 +01:00
Hielke Morsink
8aa122f54e Use empty initializer lists in the openrct2ui project 2018-06-05 14:37:24 +02:00
Michał Janiszewski
debb6cd46c Remove declarations of unimplemented functions (#7615) 2018-06-02 13:51:23 +02:00
Michał Janiszewski
a2ef4bd699
Exclude pre-formatted blocks from clang-format (#7520)
[ci skip]
2018-05-16 20:41:29 +02: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
Ted John
7f8b795842 Refactor memory handling in EditorObjectSelection.cpp 2018-01-21 11:17:41 +00:00
Marijn van der Werf
4c956def67 Update UI imports 2018-01-18 22:57:55 +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
Ted John
f18595a1c1 Refactor viewport.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
b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Aaron van Geffen
e405867dae Add tooltip to explain why sprite selection is disabled. 2017-12-31 20:03:09 +01:00
Robert Jordan
907f18fd69 Fix: Following canceling
Stop previewing sequence now unfollows the current sprite.
Using the arrow keys in-game cancels following.
Resizing the window no longer cancels following.
2017-12-31 20:03:09 +01:00
Robert Jordan
298420fd1e Finalize follow sprite command
Added new smart follow variable to window to more intuitively follow
sprites that may not be directly followable at all times.
Follow sprite is now canceled when dragging the screen but not
scrolling. This is only relevant when testing title sequences in game.
Select sprite button is now disabled in the title menu.
Sprites are now identified based on their name. Excess identification
information is not given as it'd clutter up the screen and is not
necissary with the viewbox in the command editor.
2017-12-31 20:03:09 +01:00
Hielke Morsink
1443216ba0 Replace number with small viewport 2017-12-31 20:03:09 +01:00
Hielke Morsink
943747056e Add window settings and save support for follow sprite command 2017-12-31 20:03:09 +01:00
Robert Jordan
92fc010b9a Feature: "Load Scenario" title sequence command
New command goes by LOADSC in script files and in the enumeration.
Scenarios are stored using the internal also used for localisation.
Scenarios selected can only be scenarios to originally come with one of
the games or expansions.
Modified Scenario Select window to have a mode just for title editor
scenario selection.
2017-12-31 12:42:40 +01:00
Marijn van der Werf
1e946fc0fe Move Dropdown to UI project 2017-12-16 15:47:38 +02:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Robert Jordan
0698154ba1 Refactor: Title sequences and switch to size_t 2017-11-01 22:42:58 +00:00
Michael Steenbeek
af845beb61 Replace mapElement with tileElement 2017-10-31 19:59:06 +01:00
Michael Steenbeek
ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +01:00
Robert Jordan
a3c64bb146 Feature: Preview title sequences in-game
Title sequences can now be played back in-game, allowing for much easier
editing.

Improved title sequence playback in general. Clicking play while on a
different title sequence will play the new one. Clicking stop will make
the title screen go back to the config title sequence. And the closing
the title sequence window will also make the game go back to the config
title sequence, and reload the sequence if it was modified.

Changes made to title sequences in-game are now correctly loaded in the
title screen.

Starting a title sequence within the editor will now always reset it
even if it's the current playing sequence. (Not for playing in the
editor though).

Get Location in title sequence command editor now has 100% accuracy
compared to before
where it would usually get some offset value.

Added `get_map_coordinates_from_pos_window` which will allow getting the
viewport coordinates of a specific window even if the input coordinates
are under another window. This has use with getting 2D positions from
the main window without the other windows getting in the way.

Options window will now always specify the config title sequence in the
dropdown and not the current title sequence.

Made a global variable `gLoadKeepWindowsOpen`, in game.h to keep windows
open when loading a park. When loading a title sequence park in-game.
The sequence player will force-close all park-specific windows ahead of
time.

Skipping while testing title sequences no longer needs to reload the
park if the current playback position is already before the target
position and ahead of the load position.

Added changelog entry.
2017-10-30 12:07:01 +01:00
Robert Jordan
74f1eb39a8 Fix: TitleSequence spelling errors
```c++
bool TileSequenceSave(TitleSequence * seq);
bool TileSequenceAddPark(TitleSequence * seq, const utf8 * path, const
utf8 * name);
bool TileSequenceRenamePark(TitleSequence * seq, size_t index, const
utf8 * name);
```

Renamed to:

```c++
bool TitleSequenceSave(TitleSequence * seq);
bool TitleSequenceAddPark(TitleSequence * seq, const utf8 * path, const
utf8 * name);
bool TitleSequenceRenamePark(TitleSequence * seq, size_t index, const
utf8 * name);
```
2017-10-15 10:33:10 +02:00
Michael Steenbeek
7f9c25a7a9 Use constant for LOCATION_NULL, split off location stuff to Location.h 2017-10-13 22:23:07 +02:00
Marijn van der Werf
9d80f7efed Apply recommended fixes 2017-09-24 22:41:49 +02:00
Marijn van der Werf
9b1b2b5c62 WIP window moving 2017-09-24 22:41:49 +02:00
Renamed from src/openrct2/windows/TitleCommandEditor.cpp (Browse further)