1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00
Commit Graph

215 Commits

Author SHA1 Message Date
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
Matt
b046d45c01 Refactor window_set_location to use rct_window::SetLocation 2019-08-11 17:21:56 +02:00
Ted John
cbb1bf9289 Fix #9752: window_close from ride construction window causes a crash
Re-obtain iterator after calling window close event as close event may open / close other windows.
2019-08-07 23:20:50 +01:00
Matt
4f6dbd6496 Fix #9727: Crash when multiple windows are closed during close events 2019-08-06 17:08:10 +02:00
ζeh Matt
a7f8960151 Fix #9498: Only close the most recent window when using the hotkey (#9504) 2019-07-01 22:59:31 +02:00
ζeh Matt
e149722a15 Fix #9467: Crash when windows create new window when being closed (#9470) 2019-06-27 22:28:07 +02:00
Matt
f98d027a14 Fix #9377: accumulate a list of windows to close before actual closing 2019-06-06 12:21:46 +02:00
Duncan
06c666c298 Merge pull request #9358 from ZehMatt/undo-fuckup1
Remove useless log_info
2019-06-04 18:45:34 +01:00
Duncan
f44d29f861 Merge pull request #9368 from ZehMatt/fix-9365
Fix #9365: Crash when bringing window to front
2019-06-04 18:45:22 +01:00
Matt
d6975a8f23 Fix #9365: Crash when bringing window to front 2019-06-04 07:02:55 +02:00
Hielke Morsink
4dea507e50 Fix #9360: sticky windows can be closed 2019-06-03 22:49:45 +02:00
Matt
af65811f50 Remove useless log_info 2019-06-03 18:59:23 +02:00
Matt
951f5009ef Refactor window storage to use std::list instead of std::vector 2019-05-29 19:32:18 +02:00
Ted John
f842d8a693 Fix #5103: OpenGL: ride track preview not rendered 2019-05-02 00:07:43 +00:00
Aaron van Geffen
f4602d0a34 Use SCREEN_FLAGS_EDITOR when appropriate. 2019-03-20 20:58:08 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Aaron van Geffen
3be6137fde Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
ζeh Matt
7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Matt
4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Aaron van Geffen
a5ad9a3729 Merge pull request #7971 from Osmodium/7930-part2-Add-open-folder-button
#7930 part2 add open folder button
2018-09-14 00:03:58 +02:00
Aaron van Geffen
d6769fafe2 Move title menu buttons up to compensate for new item. 2018-09-13 23:20:17 +02:00
Matt
a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +02:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01: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
Hielke Morsink
472320d8f3 Correct formatting up to the management folder
I went over the commits ab7f22f..8726712 (bulk format commits for game actions to management inclusive) and corrected all mistakes I found. Most of them have to do with arrays missing trailing commas, making clang-format indent the entire array or not add breaks between the values.
2018-07-23 16:00:15 +02:00
clang-format
17d2693422 clang-format interface 2018-07-23 16:00:04 +02:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Ted John
98905fdbc3 Change g_window_list to use the heap for windows 2018-06-16 16:04:01 +01:00
Ted John
0f6138f8b6 Convert g_window_list to a std::vector 2018-06-16 16:04:01 +01:00
Ted John
26666b1da9 Remove empty function: viewport_update_pointers 2018-06-15 23:15:52 +01: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
Michał Janiszewski
1d28826b79 Fix -Wdocumentation and add it to default warnings 2018-06-11 09:52:54 +02:00
Ted John
510786fc1a Fix Linux builds 2018-06-11 01:22:18 +02:00
Ted John
04da3be824 Move Widget.cpp to libopenrct2ui 2018-06-11 00:04:41 +01:00
Ted John
a4d6a45e78 Move window_all_wheel_input to libopenrct2ui 2018-06-10 23:56:05 +01:00
Ted John
e6e61c3a2f Move create window code to libopenrct2ui 2018-06-10 23:34:20 +01:00
Hielke Morsink
36d123b272 Revert renaming of spinners (#7650) 2018-06-10 21:31:08 +02:00
Hielke Morsink
cb1c55def5 Add extra checks to verify the widget belongs to a toolsize or stepper
It's possible that widgets are arranged in such a way that the roder of buttons matches the order of tool-size widgets or steppers. Now instead of just checking the types, also their content will be checked.
2018-06-04 15:49:05 +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
Hielke Morsink
a82d6cb195 Allow scrolling up and down on steppers to change their values 2018-06-04 01:10:57 +02:00