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
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
c4538496c5
Make sure variables are either static or declared externally
2017-10-09 22:59:40 +02:00
Michał Janiszewski
00fd18809c
Move extern "C" {} blocks to headers ( #6282 )
2017-09-18 17:05:28 +02:00
Michał Janiszewski
d698ad1100
Convert NULL -> nullptr in C++
2017-08-15 11:51:56 +02:00
Marijn van der Werf
294cef3c9b
Move additional windows to UI project
2017-08-14 23:53:28 +02:00