1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00
Commit Graph

255 Commits

Author SHA1 Message Date
Ted John
d907c58a13 Start window refactor framework 2021-01-10 12:41:55 +01:00
ζeh Matt
acf71315b5 Cleanup variables usage and initialize them 2021-01-06 22:29:40 +01:00
Tulio Leao
00483df2f2 Close #13625: Refactor TOOL_IDX to use strong enum 2020-12-23 20:07:54 -03:00
Tulio Leao
221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
ffrogman
7ed1804e61 Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum (#13453)
* Fix #12410: Refactor WINDOW_WIDGET_TYPES to use strong enum
2020-11-27 00:14:20 -03:00
pizza2004
a5607da09d Refactor Widget to TitleCase (#13355) 2020-11-03 18:29:22 -03:00
Duncan
250586cb45 Port some OpenLoco helper functions (#13113)
* Port some OpenLoco helper functions

Added a few helper functions from OpenLoco to make viewport code a bit simpler
2020-10-12 22:25:11 -03:00
Julia Pinheiro
cba1d48226 Close #12408: Refactor CURSOR_ID to use strong enum 2020-10-11 18:01:14 +02:00
Duncan
f28907a87d Rework tooltip to be more logical (#13137) 2020-10-10 10:49:56 -03:00
Bryan DiLaura
7c95f594d3 Close #12413: Refactor VISIBILITY_CACHE to use strong enum (#13136) 2020-10-09 19:12:14 -03:00
Matt
091145037e Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Duncan
eb3f3edc1b Use RemoveViewport helper function (#13104) 2020-10-06 10:27:56 +01:00
Ted John
65e3d20156 Refactor drawing 2020-08-28 01:30:15 +01:00
Ted John
a1cd02c61c Disable closer zoom levels for software rendering 2020-08-28 01:29:59 +01:00
Ted John
f51ad862c9 Refactor window drawing 2020-08-28 01:29:59 +01:00
Michał Janiszewski
6ae5645686 Show update information on main screen & in floppy menu 2020-08-14 10:18:17 +02:00
frutiemax
96a75f8c2c Amend #12470: Make zooming at pointer take tile height into account 2020-07-26 01:28:29 +02:00
ζeh Matt
b7e469cf33 Fix #11623: Erratic zoom behavior when pointing outside of the map 2020-07-26 00:27:40 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax
0fa0ca451e Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
frutiemax
280a21fa30 Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Aaron van Geffen
681b8d7938 Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
Ted John
4501173c0d Implement custom window tabs 2020-04-30 23:42:28 +01:00
Ted John
e0f66fe3cd Implement viewport widgets 2020-04-26 14:35:02 +01:00
Michał Janiszewski
2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +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
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Tulio Leao
91c4735917 Revert to copy instead of const-ref for functions that edit content 2020-03-01 00:49:00 -03:00
Tulio Leao
9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao
9d09f1b95c Use ScreenCoordsXY on context cursor operations (#10364) 2019-12-14 22:52:18 +01:00
Tulio Leao
721a4961a7 Fix #10304: Mouse zoom not following cursor position 2019-11-29 18:08:59 -03:00
Tulio Leao
4537c061d9 Prefer std::optional over LOCATION_NULL on Viewport (#10297) 2019-11-29 17:17:01 +01:00
Duncan
b316f447a4 Merge pull request #10285 from tupaschoal/useCoords-get-map-coords
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-29 09:20:12 +00:00
Tulio Leao
47935288d0 Remove raw coordinates overload of get_map_coordinates_from_pos 2019-11-25 17:45:02 -03:00
duncanspumpkin
0c4fffb2ec Refactor viewport_adjust_for_map_height to use CoordsXYZ. 2019-11-24 21:37:35 +00:00
duncanspumpkin
d4c15cd774 Refactor centre_2d_coordinates to use screenCoords. 2019-11-20 18:44:03 +00:00
Tulio Leao
9fa355cb8c Make window_event_list use Coords for moved and cursor (#10258) 2019-11-18 23:13:32 +01:00
Tulio Leao
fe3d6f6faf Use ScreenCoordsXY for scroll_mouse* functions 2019-11-14 08:40:40 -03:00
Tulio Leao
ce9432964c Improve coords management on window_rotate_camera 2019-11-13 18:28:03 -03:00
Tulio Leao
c36606c051 Distinguish Screen and Map Coords on window_rotate_camera 2019-11-13 18:28:03 -03:00
Tulio Leao
47387690f5 Improve coords assignments 2019-11-13 18:28:03 -03:00
Tulio Leao
054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
Tulio Leao
afc14183e7 Use ScreenCoordsXY for tool_* functions 2019-10-29 19:02:58 -03:00
Tulio Leao
dbb66dd028 Remove duplicate functions (#10067)
* Reduce code duplication in src\openrct2\interface\Window.cpp

`window_resize_gui_scenario_editor` was a subset of `window_resize_gui`

* Reduce code duplication in src\openrct2\network\Twitch.cpp

Both `GetFollowers()` and `GetMessage()` were very similar

* Reduce code duplication in src/openrct2/world/SmallScenery.cpp

`map_place_non_scenery_clear_func` and `map_place_scenery_clear_func` did basically the same thing, with a single branch difference

* Reduce code duplication in src/openrct2-ui/windows/TopToolbar.cpp

Make `top_toolbar_tool_update_scenery_clear` call `top_toolbar_tool_update_land_paint` and then do the additional differing calculation it did.
2019-10-19 15:38:26 +02: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
duncanspumpkin
37ef48890f Move various to use CoordsXYZ funcs instead of LocationXYZ 2019-08-19 20:04:58 +01:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
Matt
cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Matt
2053ecb688 Refactor window_scroll_to_viewport to use rct_window::ScrollToViewport 2019-08-11 17:22:00 +02:00