Commit Graph

56 Commits

Author SHA1 Message Date
pizza2004 2015acd4c0
Refactor UI/Interface Window to Title Case (#13367) 2020-11-04 04:52:23 +00:00
pizza2004 a5607da09d
Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Aaron van Geffen d27e14f45b
Compact, statically initialized syntax for event lists (#12973) 2020-09-28 20:36:15 +02:00
Tulio Leao 731a93dc39
Create WindowColour enum for widget definition calls (#12722)
* Make MakeWidget* functions take enum colour

* Make windows A-D use WindowColour enum

* Make windows E-G use WindowColour enum

* Make windows I-M use WindowColour enum

* Make windows N-P use WindowColour enum

* Make windows R-S use WindowColour enum

* Make windows T use WindowColour enum

* Make windows V-W use WindowColour enum
2020-08-28 23:31:31 -03:00
Matt Thomson a8f8f06e2d
Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum (#12642)
* Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum

* Remove redundant default branches

Co-authored-by: Matt Thomson <matt-thomson@users.noreply.github.com>
2020-08-13 21:51:28 +01:00
Aaron van Geffen 16ad1d18fb
Refactor another set of widget definitions (#12503)
* Refactor TopToolbar

* Refactor TrackDesignManage

* Refactor TrackDesignPlace

* Refactor TrackList

* Refactor ViewClipping

* Refactor Viewport

* Refactor TitleEditor

* Refactor TitleCommandEditor

* Refactor Themes

* Refactor TextInput
2020-07-30 22:58:49 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Aaron van Geffen 681b8d7938
Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
TomasZilinek c1546059ad
Close #11571 - Remove <x,y> gfx_draw_string_left overload (#12010)
Third and final part. replaces the rest of the calls to x,y overload
2020-06-20 16:09:45 -03:00
Gymnasiast 6fd83fd006
Make WW and WH static 2020-05-09 18:07:16 +02:00
Tulio Leao 935cfe90fc
Use named casts on openrct2-ui/windows (#11136) 2020-04-18 13:32:48 +02:00
Michael Steenbeek 9fda7762e5
Fix #10942: Cut-away view is broken (#10945) 2020-03-16 21:47:38 +01:00
Michael Steenbeek be13c1fc87
Refactor more TileCoords 2020-03-07 21:07:18 +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
Duncan 2c359736ee
Refactor to reduce usage of LocationXY8 and sLocationXY8 (#10479)
* Refactor to reduce LocationXY8 usage

* Further reduction of LocationXY usage and sLocationXY usage

* Reduce sLocationXY8 usage
2019-12-30 19:03:34 +00:00
Tulio Leao 98110c0544 Make Map::map_invalidate*() use CoordsXY (#10437)
* Make Map::map_invalidate_element() use CoordsXY

* Make Map::map_invalidate_tile_full() use CoordsXY

* Make Map::map_invalidate_tile_zoom0() use CoordsXY

* Make Map::map_invalidate_tile_zoom1() use CoordsXY

* Make Map::map_invalidate_tile() use CoordsXY

* Use CoordsXYRangedZ for map invalidation

* Fix vehicle tile invalidation use Z instead of Y coord

* Fix BannerRemoveAction sending Z TileCoords to invalidate tile

* Fix wrong tile invalidation on peep_update_walking_break_scenery

* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Tulio Leao 15f873c018 Remove LocationXY usage on openrct2-ui\windows\ViewClipping.cpp 2019-12-27 09:52:27 -03:00
Duncan e61401e48c Fix #10410: Tile Inspector does not hightlight tile correctly
Mistake made when refactoring not passing the error up through the chain and silently working.
2019-12-22 13:59:24 +01:00
duncanspumpkin f346e439fc Change type of map selection a and b 2019-12-21 12:18:34 +00:00
Tulio Leao 054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
Tulio Leao 9776a0843d Make Viewport::screen_to_map_pos() return coords (#10171)
* Make Viewport::screen_to_map_pos() return coords

* Fix clang-format

* Update src/openrct2-ui/windows/TileInspector.cpp

* Update src/openrct2-ui/windows/TileInspector.cpp

* Apply suggestions from code review
2019-11-02 08:04:46 +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
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
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
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 36d123b272
Revert renaming of spinners (#7650) 2018-06-10 21:31:08 +02:00
Hielke Morsink 32c4dab6c8 Move cut-away stepper logic to mousedown handler
This makes scrolling work for the stepper widget, and overrides behaviour for scrolling anywhere else in the window.
2018-06-04 13:41:27 +02:00
Aaron van Geffen f2b0f7457e Terminology change: rename spinners to steppers. 2018-06-01 23:25:07 +02:00
Aaron van Geffen e5f184b01b Spinners for CustomCurrency, RideConstruction, ServerStart, ViewClipping. 2018-06-01 15:20:13 +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 5b64abd7aa Keep 'select area' button pressed while the tool is active 2018-05-12 14:48:22 +02:00
Hielke Morsink 1324b6ae8f Add group boxes and clear button 2018-05-12 14:26:03 +02:00
Hielke Morsink 4e5f5de1a3 Update the year in copyright notice for changed files 2018-05-12 14:24:51 +02:00
Hielke Morsink 9034a0bce9 Restore old selection when the tool gets interupted
And re-type the selection variables to use LocationXY8 instead of storing them separately.
2018-05-12 14:24:47 +02:00
Hielke Morsink 28c1dbaf5a Show hovered tile selection 2018-05-12 14:24:06 +02:00
Hielke Morsink f1bbf077d6 Add clip selection
This allows the user to select an area of tiles. Anything outside of this area won't be drawn.
2018-05-12 14:24:01 +02:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski 4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01: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