Commit Graph

426 Commits

Author SHA1 Message Date
Duncan 8f59fe91cb
BannerSceneryEntry Refactor (#14810)
* Refactor BannerSceneryEntry to enforce type

* Remove old comment

* Fix incorrect renameing
2021-06-03 21:43:30 +01:00
Duncan 6f81248084
Rework and refactor PathBitEntry (#14809) 2021-06-03 21:23:00 +01:00
Duncan 425f968a67
Rearrange WallSceneryEntry to enforce types (#14808)
* Rearrange WallSceneryEntry to enforce types

* Clang format

Correct inverted nullptr check
2021-06-03 13:26:00 +01:00
Duncan 39fcc5d078
Split up Sprite header (#14764)
* Remove fields from rct_sprite union

* more header fun

* Fix guest include
2021-05-29 06:01:32 +01:00
Silent 94da3cf422
Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
ZeeMajora 0123a3d141
Close #14655: make Changelog window brown in RCT1 theme 2021-05-15 16:53:44 +02:00
Michael Steenbeek f06bf3681d
Fix #14638: Make 'About OpenRCT2' themeable; more RCT1 window colours 2021-05-13 18:28:09 +02:00
duncanspumpkin c345396765
Move duck method into class 2021-05-13 16:09:26 +02:00
Ted John ea961aed93
Fix #14428: No text visible in in-game console window (#14429) 2021-04-03 00:12:30 +01:00
Michael Steenbeek 7344b7fbfd
Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Tulio Leao 7e78061e16 Use ScreenCoordsXY on InGameConsole 2021-03-29 09:34:11 -03:00
Tulio Leao bb8c275df6 Remove raw coords gfx_fill_rect_inset overload 2021-03-29 09:34:11 -03:00
Tulio Leao 08e182fba2 Use ScreenCoordsXY on Graph methods 2021-03-29 09:34:11 -03:00
Tulio Leao eab297f9ff Use ScreenCoordsXY on Graph::Draw 2021-03-29 09:34:11 -03:00
Geoff B 6c8493cb69
Close #14253: Replace font size tokens with adjusted DrawText calls 2021-03-27 14:40:17 +01:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00
Duncan df7a284822
Entity type 2: Remove sprite_identifier (#14334)
* Start changing the underlying type

* Further work

* Complete refactor

* Further cleanup

* Remove pointless check

* Increment network and plugin versions

* Add defaults

* Further defaults

* Fix test paint

* Update replays
2021-03-17 08:04:41 +00:00
Duncan 6ec379cd0e
Split Entity Lists by Entity type (#14326)
* Make initial changes to add entity type

* Make further corrections

* Revert header changes

* Fix mistakes
2021-03-16 11:18:06 +00:00
Michael Steenbeek 96524e2b4a
Convert Land window to class 2021-03-15 23:08:00 +01:00
Gymnasiast a0523339d3
Apply review request 2021-02-28 21:24:17 +01:00
Gymnasiast 7fd049c22e
Remove last remnants of gCurrentFontSpriteBase 2021-02-28 00:26:53 +01:00
Gymnasiast c40701d997
Make gfx_draw_string() take a TextPaint argument 2021-02-28 00:26:20 +01:00
Gymnasiast 503273793a
Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
Gymnasiast 826f6c7442
Reduce usage of gCurrentFontSpriteBase 2021-02-28 00:25:30 +01:00
Gymnasiast 3e536e2711
Change gfx_draw_string_*_wrapped() to DrawTextWrapped() 2021-02-28 00:23:01 +01:00
Gymnasiast e2ebc9d43b
Replace gfx_draw_string_left() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Gymnasiast d5f79b7972
Replace gfx_draw_string_centred() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Gymnasiast 2477933c51
Turn font sprite base into a strong enum 2021-02-28 00:23:00 +01:00
Ted John 49b677780f
Merge pull request #14171 from IntelOrca/plugin/custom-widget
* Add API for getting network traffic statistics.
* Add API for creating custom widgets.
* Add API for drawing graphics for custom widgets.
* Add click event to spinners and allow them to be held down.
2021-02-27 01:31:00 +00:00
Michael Steenbeek 08f07e6135
Reduce usage of gCurrentFontSpriteBase (#14178) 2021-02-26 15:39:20 +01:00
Ted John d64bd60278 Fix CI errors 2021-02-24 22:54:53 +00:00
Ted John c2183989a5 Allow spinners to be clicked and held 2021-02-24 22:37:31 +00:00
Ted John 93f17f1175 Add custom widget logic and network stats API 2021-02-24 22:37:31 +00:00
Ted John 762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
ζeh Matt 9ff2138f3f
Remove unused variable gCurrentFontFlags 2021-01-30 16:46:22 +01:00
Ted John 2fdf91874c Implement centred labels 2021-01-29 17:50:32 +00:00
Ted John be350f7e2e Add widget visible flag 2021-01-26 00:25:59 +00:00
Duncan 8d25e4ccd9
Split closest peep calculation into Staff and Guest (#13880) 2021-01-20 14:21:22 +01:00
Michał Janiszewski f1a5e62440
Fix #13816: Compilation failure on Launchpad (#13837) 2021-01-14 23:19:10 +01:00
Ted John 3e75f23970 Refactor guest list window to a class 2021-01-11 21:56:48 +00:00
Duncan d5ada2dca1
Remove type from SpriteBase (#13735)
* Move type field into sub structures

* Use type for misc_type

* Use type for l_type

* Rename to SubType

* Rename SpriteGeneric to MiscEntity

* Rename generic to misc

* Add extra nullptr checks for compilers that cant understand

* Make review changes

* Increment network version

* Update replays
2021-01-10 15:14:34 +00:00
Ted John d907c58a13
Start window refactor framework 2021-01-10 12:41:55 +01:00
skdltmxn b0a8ebc808
Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Matt cb719a6e10
Add missing case statements for entity scripting 2021-01-02 15:31:26 +02:00
Matt 5f2945d238
Refactor MISC_SPRITE to strong enum 2021-01-02 15:30:44 +02:00
Dennis Devriendt 3073cca6aa
Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Tulio Leao 221aa8cece Close #12453: Refactor RCT2_EDITOR_STEP to strong enum 2020-12-23 20:07:53 -03:00
Michael Steenbeek 94b6723f0d
Add some comments 2020-12-21 14:53:54 +01:00
Gymnasiast 179b50358c
Add RCT1 surface styles 2020-12-20 21:45:21 +01:00
Michael Steenbeek abd7babc86
Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
Ted John 05622fd9bb
Merge pull request #13504 from IntelOrca/plugin/more-things
* Fix #13495: Add properties for park value, guests and company value
* Add more park attributes to plugin API
* Fix #13431: [Plugin] UI disabled widgets can still be interacted with.
* Fix #13078: [Plugin] Add colour picker widget
* Fix: #13509 [Plugin] Add ability to format strings
* Fix #13510: [Plugin] list view scroll resets when items is set.
* Fix #13512: [Plugin] Add item separators to list view
2020-12-06 16:13:07 +00:00
Tulio Leao 3a4ccfef37
Merge pull request #13523 from IntelOrca/fix/13517-date-format
Fix #13517: Bad formatting of dates
2020-12-06 10:17:59 -03:00
Ted John 030713e126 Fix #13078: [Plugin] Add colour picker widget 2020-12-05 18:26:35 +00:00
Ted John a55bcff99c Fix #13431: [Plugin] UI disabled widgets can still be interacted with. 2020-12-05 18:26:35 +00:00
Łukasz Pękalski 4adf745237
Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Ted John d6fd4ed64b Allow formatting in in-game console 2020-12-05 14:14:09 +00:00
Ted John 5a90cd4163 Apply a few more code review comments 2020-11-27 18:54:58 +00:00
Ted John 503a383301 Do not format characters in text input 2020-11-27 18:54:57 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John 1e5d998338 Remove more instances of format codes 2020-11-27 18:54:56 +00: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
Florian Probst 923b5f990d
Close #12438: Refactor RIDE_COMPONENT_TYPE to use strong enum (#13456)
* Part of #12438  Changed RIDE_COMPONENT_TYPE to enum class

(1/3)

Changed the enum RIDE_COMPONENT_TYPE to be enum class in RideData.h.
Shortened the enumerators.
And fixed

I split the changes I did into 3 commits because the enum is used in a total of 85 different files where I just replace the single line where they occur.

The changes in those 85 files are analogous to my change in line 328 in RideData.h in this commit.

* Part of #12438  changed all RIDE_COMPONENT_TYPE enumerators appearances

(2/3)

Changed every appearance of the old RIDE_COMPONENT_TYPE enumerators to the changed enumerators from last commit.

* Part of #12438

(3/3)

Used EnumValue() wherever a field or variable of the type RideComponentType was used as an index.

Havent checked if anything from these 3 commits on this branch got codestyle issues

* Part of #12438

used clang-format

* Closes #12438  Added Accessor function for RideComponentName

Added Accessor function GetRideComponentName to RideData.
to replace the use RideComponentNames[EnumValue(RideComponentType type)]

* Close #12438 moving GetRideComponentName to RideData Headerfile

Moved GetRideComponentName to RideData Headerfile since thats where it should be.
2020-11-26 15:23:47 -03:00
Łukasz Pękalski 6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Gymnasiast d58a8d1184
Change tile_element_get_ride_index() to method 2020-11-07 12:58:32 +01:00
Michael Steenbeek 92a5f1aa24
Merge pull request #13310 from ju-pinheiro/sprite-identifier-strong-enum
Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum
2020-11-06 16:55:01 +01:00
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
pizza2004 b0fd5f93d7
Refactor UI/Interface misc to TitleCase (#13354)
* Refactor LandTool to Namespace

* Refactor Theme to TitleCase

* Refactor ViewportInteraction to TitleCase
2020-11-03 10:59:00 +00:00
pizza2004 6cc3f2f4a8
Refactor Graph to TitleCase (#13353) 2020-11-03 08:21:20 +00:00
Sadret c2d309af38
Close #13346: Change FootpathScenery to FootpathAddition (#13350) 2020-11-03 08:17:29 +00:00
pizza2004 68bd035f12
Refactor Dropdown to TitleCase (#13352)
* Refactor Dropdown Namespace

* Refactor Dropdown to TitleCase
2020-11-03 08:16:06 +00:00
ju-pinheiro a31c958004 Adding missing SpriteIdentifier enumerations to switch statements 2020-10-27 18:52:56 -03:00
ju-pinheiro bb16ca075b Close #12450: Refactor SPRITE_IDENTIFIER to use strong enum 2020-10-27 13:26:27 -03:00
Łukasz Pękalski 9dcbf6d4e6
Close #4865: Offer an option to disable inhibiting the monitor power (#13243)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2020-10-20 22:02:44 +02:00
Aaron van Geffen a9316869fc
Fix #13158: Cursors are drawn incorrectly in text input fields (#13228) 2020-10-17 22:24:24 +02: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
Gymnasiast eb2f40f35c
Fix typo in WC_EDITOR_OBJECTIVE_OPTIONS 2020-10-11 19:28:25 +02:00
Duncan 4fb4feb83c
Fix missing error message on ride graph (#13129)
* Fix missing error message on ride graph

Mistake made during implementation meant that the ride graph would not show the error message when the ride had not left the station. Another mistake meant that the tertiary colour of the ride window was not set to green. The tertiary colour was only used by this error message though so was not noticed.
2020-10-08 15:22:23 -03:00
Ben Johnston 2524e9201a
Fixed console cursor rendering. (#13025)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-10-07 21:45:57 -03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Bryan DiLaura 56e8cc77c6
Close #12409: Refactor CONSOLE_INPUT to use strong enum (#13052) 2020-10-01 10:31:03 +01:00
Duncan 3c8adb1fc1
Remove gMapTooltip format args global (#12971)
Fix mistake
2020-09-28 21:45:28 -03:00
Duncan 4ec10837a6
Remove Formatter::Common where not required (#12972)
* Remove Formatter::Common where not required

* Remove common from Guest window where possible
2020-09-27 21:09:08 -03:00
Michael Steenbeek 77e22851cc
Merge pull request #12925 from richard-fine/dropdown-menus-static-data
RFC: Dropdown menus static data
2020-09-18 23:37:26 +02:00
Duncan da82144bfb
Fix #12944. Mistake from refactor meant formatter optimised away (#12961)
Not sure why it should get optimised away but this will fix the crashes.
2020-09-18 09:25:17 +01:00
Matt b3b9a348c5
Apply review suggestions 2020-09-17 22:16:05 +03:00
Matt 2639349925
Move storage into Formatter class and refactor usage 2020-09-17 22:14:36 +03:00
Simon Jarrett 57a57b0c02 Refactor Theme to use new JSON library 2020-09-16 20:18:54 +01:00
frutiemax 2857f9d276
Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp (#12906)
* Part of #12097: Use ScreenRect on gfx_fill_rect_inset in Widget.cpp

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-09-14 08:44:50 -03:00
Richard Fine 4a9974fda6 Introduce mechanism for configuring dropdown menu with static data
For menus with static content, provide a mechanism for building the menu items as a constexpr array, allowing developers to specify menus more concisely and to put the data into the .rodata section where it can be quickly copied through.
2020-09-13 16:15:28 -04:00
Gymnasiast d140dd72c6
Remove const void* overload from DrawTextEllipsised() 2020-09-10 18:13:13 +02:00
Gymnasiast b788a099b5
Replace gfx_draw_string_clipped() calls with DrawTextEllipsised 2020-09-10 18:13:13 +02:00
Aaron van Geffen 11ebe78328
Refactor window offset std::arrays into regular arrays (#12799) 2020-09-09 22:51:51 +02:00
awiebe b53c4b3625
Downgrade Mac build requirements of OpenRCT2 to macOS 10.13 (#12749)
Keep targeting macOS 10.14 for libopenrct2 target. Replace deployment target with macOS 10.13 for other targets, including the OpenRCT2 bundle.

Explicitly type std::arrays, since Xcode refuses to use C++17 array deduction.

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-08-28 22:27:25 +02:00
Aaron van Geffen ec6f1b5fcd
Fix #12784: Scenery tab images missing 2020-08-26 17:06:19 +02:00
Aaron van Geffen 4a55acd71e Introduce MakeTab wrapper function
The MakeTab function is only applied in two places, for the moment:
the Cheats and Options windows.
2020-08-17 20:59:13 +02:00
Michał Janiszewski 6f8ae294ae
Fix launchpad builds (#12575)
```
/<<PKGBUILDDIR>>/src/openrct2-ui/interface/ViewportInteraction.cpp: In function ‘InteractionInfo viewport_interaction_get_item_left(const ScreenCoordsXY&)’:
/<<PKGBUILDDIR>>/src/openrct2-ui/interface/ViewportInteraction.cpp:85:29: error: potential null pointer dereference [-Werror=null-dereference]
   85 |             switch (sprite->sprite_identifier)
      |                     ~~~~~~~~^~~~~~~~~~~~~~~~~
```
2020-08-09 07:27:26 +01:00
Duncan aa11773da3
Fix #12566, #12565, #12562, #12560, #12558: Nullptr deref (#12567)
Mistake made in refactor meant that a nullptr deref took place when the screen coords were outside of the normal play area
2020-08-02 20:13:09 +01:00
Duncan 733bc5a981
Close #12518: Viewport Refactor (#12541)
* Remove viewport pointer from get_map_coordinates_from_pos

* Removed viewport from get_window

* Return a InteractionInfo from get_map_coord...

* Remove viewport_interaction_info struct

* Add Entity union to simplify code

* Name the enum used for viewport interaction

* Simplify functions further by returning the info struct

* Add default switches
2020-08-02 08:32:59 +01:00
Aaron van Geffen e039a51826
Fix #12552: Grey rectangles appear under windows and menus (#12554)
* Fix #12552: Grey rectangles appear under windows and menus

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-08-02 00:47:28 -03:00
annoyingdroid ddd21fa87a
Part of #12098: Use ScreenRect on gfx_filter_rect (#12134) 2020-08-01 14:40:01 -03:00
Duncan 6d11825e1a
Reduce the use of rct_sprite (#12530)
* Reduce the use of rct_sprite

* Pass the correct types in S4 importer

* Add additional nullptr checks

* Simplify the viewport interaction

* Apply review comments

* Small cleanup of GetEntity

* Fix test paint
2020-08-01 11:29:54 +01:00
frutiemax af0fc89cf4
Close #12456: Refactor INPUT_STATE to use strong enum (#12484) 2020-07-27 19:51:10 -03:00
Gymnasiast 682add27dd
Change ObjectEntryIndex null value to 0xFFFF 2020-07-23 12:45:42 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Tulio Leao 289dc96f25
Remove goto from window_create_auto_pos (#12256)
* Reduce code duplication on window_create_auto_pos

* Remove deadcode from window_create_auto_pos

Cascadin window offset deadcode

* Extract ClampWindowToScreen from window_create_auto_pos

* Remove goto usage from window_create_auto_pos
2020-07-15 22:59:35 +01:00
Thamara Andrade 0fb2a6216c
Close #12099: Use ScreenLine on gfx_draw_line (#12143) 2020-07-12 18:50:52 -03:00
frutiemax 27734e2971
Part of #12160: Use Coords for viewport_coord_to_map_coord (#12216) 2020-07-12 18:42:54 -03:00
frutiemax 0e96674a46
Part of #12096: ScreenRect w/ gfx_fill_rect in libopenrct2ui (#12188) 2020-07-10 13:59:08 -03:00
frutiemax 4aa7dec84f
Part of #12096: Use ScreenRect on gfx_fill_rect in Widget.cpp (#12169) 2020-07-08 23:06:46 -03:00
frutiemax 280a21fa30
Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
duncanspumpkin e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
DrunkBlood 55f0f34fe0
Close #12101: gfx_draw_dashed_line to use ScreenLine (#12116) 2020-07-03 18:05:18 -03:00
Tulio Leao a86a60cbf5 Extract ScreenRect from Graph for reusability 2020-06-30 09:32:22 -03:00
Tulio Leao a0ed2c181e Make gfx_draw_string_left_centred use ScreenCoordsXY 2020-06-29 10:23:54 -03:00
Aaron van Geffen 2cb5402069 Introduce widget::textTop 2020-06-26 19:39:30 +02:00
Aaron van Geffen 2e153a7e95 Introduce widget::midX and widget::midY helper functions 2020-06-25 10:31:15 +02:00
Aaron van Geffen 681b8d7938
Introduce widget::width and widget::height helper functions (#12053) 2020-06-24 22:44:00 -03:00
Michael Steenbeek a102892370
Merge pull request #11985 from AaronVanGeffen/windows/object-selection
Increase widget heights in object selection window
2020-06-24 23:09:10 +02:00
TomasZilinek 9d965ccfb6
Part of #12017 - create gfx_draw_sprite overload (#12026)
* Part of #12017 - create gfx_draw_sprite overload

Part 1. Creates the overload and replaces about a half of the calls since there are too many for one PR.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
2020-06-23 18:32:34 -03:00
TomasZilinek 69db54f770
Fix #12018 - gfx_draw_sprite_solid overload (#12023)
Creates the overload, replaces all calls to the old function and removes the old function.
2020-06-21 11:50:05 -03:00
TomasZilinek e93e32d139
Part of #11571: create gfx_draw_string_left() overload (#11984)
Replaces a third of all occurrences of the old function
2020-06-20 00:22:01 -03:00
Aaron van Geffen 81dd7c1a7d Use available vertical text box space for text and cursor 2020-06-19 08:42:12 +02:00
duncanspumpkin 6ed17b4ff9 Remove FOR_ALL_PEEPS/GUESTS/STAFF macros
Replaced with an EntityList iterator

Fix formatting

Fix nullptr issues
2020-06-16 20:27:44 +01:00
Tulio Leao 13df05ce32 Part of #11564: Use ScreenCoordsXY instead of <x,y> 2020-06-14 12:51:06 -03:00
Tulio Leao 613cec3f7a Part of #11564: gfx_draw_string_centred_clipped with ScreenCoordsXY 2020-06-14 12:26:53 -03:00
XplosiveLugnut f9c5633c19
Can now pop balloons and quack ducks in title screen. (#9614)
* Can now pop balloons and quack ducks in title screen.

* Chengelog entry

* Narrow check for misc sprite down to only duck and balloon sprite.

* Update distribution/changelog.txt

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Use the IsBalloon and IsDuck functions instead.

* Update src/openrct2-ui/interface/ViewportInteraction.cpp

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Squash: Bring code up to date.

* Add nullptr check.

* Update src/openrct2-ui/interface/ViewportInteraction.cpp

Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2020-06-10 18:31:33 +01:00
Ted John 14899f3940
Fix #11926: Plugin Checkbox and Groupbox widgets crash the game (#11927) 2020-06-10 14:00:53 -03:00
Michael Steenbeek 9ef8d6da42
Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
duncanspumpkin 6e78d8d654 Remove AsBalloon 2020-06-06 11:36:48 +01:00
Michael Steenbeek f21ddb0723
Refactor checks for station pieces (#11876) 2020-06-05 17:55:15 -03:00
Tulio Leao 7b8257c692
Fix #11816: Text overflowing boundary box (#11830) 2020-05-30 17:07:58 +02:00
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
TomasZilinek 277080de74
Fix #11570 - create gfx_draw_string_centered() overload (#11760)
* Fix #11570 - create gfx_draw_string_centered() overload

I created the overload, updated all calls from the old function to the new and deleted the old one
2020-05-17 15:29:56 -03:00
Michael Steenbeek 620fb5e5c4
Migrate many set_format_arg calls to Formatter (#11744) 2020-05-13 21:29:39 -03:00
TomasZilinek 9fde6a74c3
Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
hdpoliveira acc6b9f878 Part of #9473: Create Vehicle::SetMapToolbar
Converted from vehicle_set_map_toolbar
2020-05-01 19:49:02 -03:00
Tulio Leao d0704baab2 Make window_dropdown_show_text() use ScreenCoordsXY 2020-05-01 15:58:36 -03:00
Tulio Leao 4933785b1c Make window_dropdown_show_text_custom_width() use ScreenCoordsXY 2020-05-01 15:48:20 -03:00
Michael Steenbeek 158adfba82
Merge pull request #11560 from tupaschoal/more-coordz
Scours through openrct2-ui to use more coords structs
2020-05-01 19:01:37 +02:00
Tulio Leao 28b2010838 Use ScreenCoordsXY on interface/Window.cpp 2020-05-01 12:26:01 -03:00
Ted John 4501173c0d Implement custom window tabs 2020-04-30 23:42:28 +01:00
Ted John 3fe49ca2a3 Apply suggestions from code review
Co-Authored-By: Michał Janiszewski <janisozaur@users.noreply.github.com>
Co-Authored-By: Aaron van Geffen <aaron@aaronweb.net>
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-04-26 14:35:08 +01:00
Ted John da98ef63d3 Implement checkboxes and disabling widgets 2020-04-26 14:35:02 +01:00
Ted John a9a67a7a7e Implement group boxes 2020-04-26 14:35:02 +01:00
Hielke Morsink e8bdb95f13 format new files
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Hielke Morsink c37d7d859e Use C++ types 2020-04-26 14:35:00 +01:00
Ted John 918022da3e Get custom buttons working 2020-04-26 14:34:59 +01:00
Breno Rodrigues Guimarães 374b744477
Use Formatter to handle argument formatting for tooltips (#11379) 2020-04-21 12:38:59 +02:00