Commit Graph

199 Commits

Author SHA1 Message Date
Hielke Morsink 76c1bc8980
Refactor window functions to take references 1 2022-07-31 17:23:15 +02:00
Michael Steenbeek 0bfc151ab9
Remove remaining usages of gGameCommandErrorText 2022-07-30 18:04:59 +02:00
Ted John 142b9ff243
Optimise object selection search
* Do case insensitive string matching for object search.
* Return as soon as first field is a hit.
2022-07-30 16:50:54 +02:00
AuraSpecs d82360cc16
Add Authors to the list of things you can search for in the Object Selection menu (#17575)
* Add Authors to Search option

Joint effort from Spacek and karst

* Update changelog.txt

* Apply code review comment

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2022-07-23 20:28:39 +00:00
Hielke Morsink 13db5a771b
Annotate hardcoded arrays and verify their sizes
This also reduces the number of lines within // clang-format comments
2022-06-16 23:51:24 +02:00
Michael Steenbeek 493c97246c
Merge pull request #16952 from karst/reorg-objsel
Make "Object Selection" order more coherent
2022-05-08 00:02:12 +02:00
Gymnasiast 0708b82430
Remove unnecessary code, check bounds and restore newline 2022-05-07 23:39:59 +02:00
Karst cfa18bd113 Change Object Selection order
Might take a little bit for people to get used to. But it's a lot more coherent and makes more sense.
2022-05-07 19:55:58 +02:00
germanaizek 958bfbc08a
Using std::move(), correct clear strings, better use '= default;', modernize make_* and replace heavy strlen 2022-05-07 16:05:39 +02:00
Olivier Wervers ef1eabd04e
Fix thumbnail box size in object selection window 2022-04-30 01:43:50 +02:00
Duncan c5b5b95bcd
Show better errors when loading scenery groups (#16854) 2022-03-22 21:01:52 -03:00
Ted John 9f96b0df33 Separate map.change and map.changed events
Also fix network plugin logic.
2022-03-21 23:09:40 +00:00
Gymnasiast 49b414a40e
Replace calls to path_get_filename() 2022-02-26 17:20:07 +01:00
Michael Steenbeek 5edc561715
Close #11437: Migrate old platform methods 2022-02-18 21:57:00 +01:00
Michael Steenbeek ffe67ff33e
Merge pull request #16642 from Gymnasiast/refactor/dropdown
Create Dropdown::Item and use it for gDropdownItems
2022-02-15 18:50:26 +01:00
Ted John b775832d01 Refactor window flags to be read with the helper methods 2022-02-13 23:09:42 +00:00
Ted John da89a4e413
Remove rct_window::enabled_widgets (#16643)
`enabled_widgets` was used to enable input for widgets. However I do not recall anywhere this being used to specifically disable a widget which doesn't use the dedicated `disabled_widgets` flag. I don't think there is any purpose in keeping this, so I have removed all uses of it.
2022-02-13 23:06:19 +00:00
Gymnasiast 723867e0a0
Create Dropdown::Item and use it for gDropdownItems 2022-02-12 23:57:22 +01:00
duncanspumpkin eb58e498e4 Rename type to conform to coding style 2022-01-19 17:45:51 +00:00
frutiemax adb692b74e Forward declare Formatter 2021-12-30 12:17:51 -05:00
oli414 2be6cb1408 Add object selector icons for new tabs 2021-12-03 20:36:46 +00:00
Ted John 5f9d03e9df
Refactor ImageId and use in more functions 2021-12-03 19:59:33 +01:00
Duncan 79b12d2953
Introduce DATLimits.h for RCT2 Dat file object limits (#16034) 2021-12-01 21:55:52 +00:00
Trey Kreis e4a314a160
Refactor Editor Object Selection Window to class (#16027)
* Refactor Editor Object Selection Window to class

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-12-01 20:43:08 +00:00
Duncan 90d2be3ddd
Clang tidy Part 3: Ui Project Enum Names (#15986)
* Enum constant case

* Apply enum names clang tidy

* Rename scoped enum missed by clang-tidy
2021-11-26 14:25:34 +00:00
Duncan fccd298d2f
Clang tidy Part 2: Ui Project Class Names (#15976)
* Apply clang-tidy on class names in the ui project

* Rename classes to more appropriate names

* Adjust name again
2021-11-24 16:16:52 +00:00
Duncan bb2c7dbaca
Clang tidy Part 1: Ui Project Function Names (#15956)
* Add NOLINT around STL using classes and vendor functions

* Apply clang-tidy to ui project function names

* Undo scripting clang-format

* Upper case OpenRCT2 and RCT2
2021-11-23 13:18:07 +00:00
IntelOrca 34128dc262
Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Duncan dd9bc86e75
Minor refactor from nsf (#15910) 2021-11-14 16:31:01 +00:00
Hielke Morsink f03a13da82
Simplify object selection string filtering 2021-11-06 17:24:42 +01:00
Hielke Morsink 76b5479bbb
Fix undefined use of cctype functions 2021-11-06 16:27:54 +01:00
Steve Blythe b15dc66acb
Part of #12098: Use ScreenRect in gfx_filter_rect() (#15603) 2021-10-20 19:43:32 -03:00
Hielke Morsink 9dd20ec619
Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
Silent 3e64a227e5
Fix Object Selection not freeing the object when unhovering
Fixes a double-free on previews.
2021-10-09 21:48:43 +02:00
Hielke Morsink 6de1868ad8
Use (const) references to widgets where possible
Note: The change from `w->widgets[WIDX_ENTRY_PRICE]` to `entryPriceWidget` is intended.
2021-10-01 15:21:00 +02:00
Hielke Morsink 9dd9b27db4
Make WIDGETS_END constexpr 2021-09-26 11:11:42 +02:00
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
Michael Steenbeek 6ffb03dde0
Add icon for path railings tab 2021-09-13 09:29:46 +02:00
Ted John 5f853df1fd
Remove gS6Info 2021-08-02 20:38:02 +02:00
Michael Steenbeek 1ea9bbbb1b
Fix formatting 2021-07-29 13:32:48 +02:00
Kane dbdca55645
Fix #14316: Closing the Track Designs Manager window causes broken state
When exiting the Track Design Manager window the user was placed into the scenario editor in a broken state.
User is now returned to the main menu when the window is closed.
2021-07-29 12:44:24 +02:00
Hielke Morsink e54dc7e466
Use consistent left-shift notation for widgets (#14956) 2021-06-26 14:23:15 +02:00
Gymnasiast b214a9fd97
Show what a stall sells in Object Selection 2021-05-27 19:54:44 +02:00
Gymnasiast 1d693f9751
Fix display of number of items in scenery group 2021-05-27 19:54:44 +02:00
Gymnasiast f2ac658935
Show tracks list of music styles in Object Selection 2021-05-27 19:53:52 +02:00
Michael Steenbeek 9ee3c81768
Merge pull request #14397 from Gymnasiast/refactor/hardcoded-terrain-constants
Remove hardcoded terrain style constants from RCT1 and MapGen
2021-03-31 20:18:12 +02:00
Tulio Leao bb8c275df6 Remove raw coords gfx_fill_rect_inset overload 2021-03-29 09:34:11 -03:00
Gymnasiast b3bbdcbfd5
Remove hardcoded terrain style constants from RCT1 and MapGen 2021-03-27 17:34:10 +01:00
Michael Steenbeek a5a63f839a
Allow passing ImageId into gfx_draw_sprite() 2021-03-23 11:58:09 +01:00