Commit Graph

58 Commits

Author SHA1 Message Date
TusharSariya 2cf95adc4b
Fix #11565: gfx_draw_string_left_clipped to use ScreenCoordsXY (#11765)
* Issue #11565, created overload for gfx_draw_string_left_clipped

Co-authored-by: Tushar <tushar.97@hotmail.com>
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-05-17 19:30:58 -03:00
Gymnasiast f8aeb70398
Apply review requests 2020-05-09 18:07:16 +02:00
Gymnasiast 9e4c664944
Replace defines with constexpr 2020-05-09 18:07:16 +02:00
Gymnasiast 96fe3d3b3c
Make WINDOW_SKELETON take a title, height and width 2020-05-09 18:07:16 +02:00
tassaron2 559ede5d14
Add compile option to move close box to the left 2020-05-09 18:07:16 +02:00
Tulio Leao 1f2cf2674a Use ScreenCoordsXY on windows/TrackList.cpp 2020-05-01 12:28:26 -03:00
Michael Steenbeek 2e50cd44ba
Refactor ride_list_item to RideSelection (#11505) 2020-04-27 16:26:35 +02:00
Breno Rodrigues Guimarães a0619d04cf
Replace usage of set_format_arg by Formatter::Common() (#11412) 2020-04-25 18:44:14 -03:00
Michael Steenbeek e1e58423fc
Replace RideTypeHasRideGroups with flag (#11375) 2020-04-20 21:50:35 +02:00
Gymnasiast 5d3bf2be20
Move category to RTD; move RideTypeIsIndependent to a flag 2020-04-18 15:22:41 +02:00
Tulio Leao 935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Michał Janiszewski 56e6ec2c23
Fix #11068: segfault when trying to clear empty list (#11069)
The report in #11068 was using track designs manager with "Boat hire"
ride, for which there were no designs and selecting "Clear" button on
the list accessed empty vector in `_filteredTrackIds`.
2020-03-26 23:49:10 +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
Michael Steenbeek 86c7dbf1d5
Fix #7854: Cannot build custom Spiral RC; dummy entries in track designs list (#10814) 2020-02-22 19:06:57 +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
Tulio Leao ce1f38da25 Use ScreenCoordsXY for window functions (#10086)
* Use ScreenCoordsXY for window_create function

* Use ScreenCoordsXY for window_find_from_point function

* Use ScreenCoordsXY for window_find_widget_from_point

* Use ScreenCoordsXY for ride_contruction_tool*

* Use ScreenCoordsXY for window_event_tool*

* Use ScreenCoordsXY for window_event_scroll_mouse*

* Use ScreenCoordsXY for remaining window_event*

* Use ScreenCoordsXY for window_(set|move)_position
2019-10-19 13:07:03 +02:00
Matt cc6321048f
Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
duncanspumpkin af92dcba3e Creating t6 exporter 2019-08-09 20:39:54 +01:00
duncanspumpkin e3c63b762e Create new TrackDesign format 2019-08-09 20:39:53 +01:00
Ted John 1a6e5b5548 Fix #9680: invalid-read in ride_entry_get_supported_track_pieces (#9681) 2019-08-03 19:55:24 +02:00
Duncan ab5f5b20cd
Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Ted John f842d8a693 Fix #5103: OpenGL: ride track preview not rendered 2019-05-02 00:07:43 +00:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
Gymnasiast 45b8ca9421 Remove more strings, fix error 2018-08-12 15:56:47 +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
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +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
Aaron van Geffen 8a724c3983 Hide speed and length statistics for flat ride TD6 files (#7563)
This hides the speed and length statistics in the track design list when viewing designs for non-tracked rides.

Fixes #7507.
2018-05-25 23:01:27 +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 dc673a64d8 Give context the ownership of repositories and the object manager (#7340)
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski f045370fcf Improve track preview window with OpenGL renderer
This adds a warning to track preview window explaining it's not
supported with OpenGL renderer. Also fixes the issue whereby no stats
were printed because of early exit.
2018-03-16 22:41:08 +01:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John ba5bc415c7 Refactor memory handling in window sources 2018-01-21 11:17:40 +00:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +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
Aaron van Geffen 9a2d3b226c Rename WWT_13 to WWT_TABLE_HEADER.
This is used for left-aligned header buttons for data tables.
2018-01-07 23:54:51 +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 b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Aaron van Geffen 54e6ffdbdd Fix #6860: Intensity and nausea ratings are too high in build menu. 2017-12-23 00:13:33 +00:00
Aaron van Geffen dbb22dd883 Use {SCROLLABLE/LIST}_ROW_HEIGHT in track list window. 2017-12-21 16:50:23 +01:00
Michael Steenbeek e3c52360db Remove most usages of separate flag
This removes most usages of the separate flag, instead relying on ride groups to do its job.
Research is more complicated and will follow in another commit.
2017-12-08 10:28:29 +01:00