Cory Sanin
f1cd58c292
Fix #14330 : join_server uses config default_port
2021-03-20 14:09:47 +01:00
duncanspumpkin
820668d0aa
Use unsafe strlen for platforms without strlen_s
2021-03-20 07:27:23 +00:00
duncanspumpkin
ee575d5b8c
Use std::vector to prevent violations of std string
2021-03-20 07:22:00 +00:00
duncanspumpkin
07b2945c5b
Fix #14353 . Provide a buffer for text input
2021-03-19 18:25:14 +00:00
Michael Steenbeek
850e7431c3
Merge pull request #14328 from Gymnasiast/fix/14315
...
Fix #14315 : Crash when renaming APVC in Korean
2021-03-18 22:49:13 +01:00
Duncanspumpkin
0957542503
Implement C++ solution to truncate UTF8 strings
2021-03-18 22:14:12 +01:00
Maximilian Bottin
6f28914f61
Fix #14296 : Allow early scenario completion in multiplayer
2021-03-18 20:30:11 +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
Daniel Karandikar
1229ce6b22
Refactor Banner to use new Window framework
...
Also tidy up a couple of bits of duplicated code
Pulled out into CreateViewport method and tileElement member
2021-03-15 22:59:19 +00:00
Michael Steenbeek
96524e2b4a
Convert Land window to class
2021-03-15 23:08:00 +01:00
Gymnasiast
645685de18
Fix #14315 : Crash when renaming APVC in Korean
2021-03-15 21:27:13 +01:00
Duncan
5474194905
Implement train view and remove linked_list_index ( #13956 )
...
* Make train manager view
* Remove linked list index field
* Remove merge mistake
* Fix further rebase errors
* Rename and add comments
* Update replays
* Fix Xcode project
* Increment network version
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-15 08:13:00 +00:00
manatails
4fe5b1dc79
Add "Vandals stopped" stat for security guards ( #14071 )
...
* Add a stat for security guards: Vandals stopped
* Update src/openrct2-ui/windows/Staff.cpp
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
* Update src/openrct2/peep/Guest.cpp
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
* No need to update screenCoords at the last line
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
* Add changelog entry and bump network version
* Update to new UI code
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2021-03-14 09:18:35 -03:00
frutiemax
8acdcca712
Part of #12098 : Use ScreenRect on gfx_filter_rect in Error.cpp ( #14288 )
2021-03-13 22:03:13 -03:00
frutiemax
cd9873a78d
Use ScreenLine on gfx_draw_line_software
2021-03-13 16:52:58 +01:00
Michael Steenbeek
85c59b88be
Convert New Campaign window to a class
2021-03-13 16:51:54 +01:00
Michael Steenbeek
55fea26a96
Fix #14172 : Assertion hit in window_tile_inspector_swap_elements()
2021-03-07 14:53:44 +01:00
Michael Steenbeek
01ddea5fab
Fix #14198 : Crash when creating new folder
2021-03-06 20:07:18 +01:00
Ted John
966129dd7c
Remove network traffic window
...
Now available in the DevTools plugin.
2021-03-06 14:47:06 +01:00
Ted John
b179f6e597
Merge pull request #13965 from telk5093/footpath_hotkeys
...
Make ride construction shortcuts work for footpath too
2021-03-06 01:27:18 +00:00
Michael Steenbeek
3b94132bab
Merge pull request #14219 from Gymnasiast/fix/14102
...
Fix #14102 : NPE in window_tile_inspector_invalidate()
2021-03-03 22:48:16 +01:00
Gymnasiast
66a5e28832
Avoid referencing null tile elements or derivations
2021-03-03 22:06:16 +01:00
Michael Steenbeek
0b73781df8
Fix #14216 : Second line of guest thoughts is set in wrong font
2021-03-03 16:00:03 +01:00
Gymnasiast
52d0689484
Add null checks to all other scenery object usages
2021-03-03 10:25:35 +01:00
Gymnasiast
e332c2a691
Fix #14102 : NPE in window_tile_inspector_invalidate()
2021-03-03 10:21:49 +01:00
Gymnasiast
229f374672
Improve positioning of mechanic status
2021-03-02 23:19:00 +01:00
Gymnasiast
50da55eaf3
Fix #14212 : Multiline news messages are shown incorrectly
2021-03-02 22:48:33 +01:00
Gymnasiast
30edc834ee
Fix #14211 : 'Mechanic X heading for ride' runs out of window
2021-03-02 22:37:15 +01:00
TELK
25bbbef7d1
Fix code formatting
2021-03-03 00:02:46 +09:00
Ted John
9b43ace649
Fix ui.showTextInput performance issue ( #14210 )
...
Over 2 GiB of memory was being allocated when calling ui.showTextInput. Restrict max length to 4 KiB.
2021-03-01 22:09:51 -03:00
Michael Steenbeek
c98746c910
Fix #14206 : Text runs out of Ride window
...
For some reason, the window used `gfx_draw_text_centred_wrapped()` before.
2021-03-01 20:31:15 +01:00
Ted John
d3e54bb579
Merge pull request #14191 from IntelOrca/fix/14190-shortcut-crash
...
Fix #14190 : Game crash likely related to plug-in hotkeys
Fix #14194 : Pressing WASD in text box moves main viewport, too
Fix #14195 : Binding (NumPad) Enter to send message closes the chat
2021-03-01 14:13:45 +00:00
adam-bloom
d1057d66fc
fix mingw builds
2021-02-28 15:48:30 -07:00
adam-bloom
9efe184538
macOS cmake CI fixes
...
Use ninja instead of make for faster builds
Proper library linking of dependencies
2021-02-28 15:48:30 -07:00
Adam
81fe5ad2cd
Remove unused const: MusicStyleNames
2021-02-28 22:57:23 +01:00
Gymnasiast
a0523339d3
Apply review request
2021-02-28 21:24:17 +01:00
Ted John
083d22adf2
Fix #14195 : Binding (NumPad) Enter to send message closes the chat
2021-02-28 14:08:16 +00:00
Ted John
789b04b4aa
Fix #14194 : Pressing WASD in text box moves main viewport, too
2021-02-28 14:07:56 +00:00
Ted John
17a29dfe87
Fix #14190 : Game crash likely related to plug-in hotkeys
...
Do not cache references to RegisteredShortcut as they can be invalidated when new shortcuts are registered / removed.
Use a map to improve query performance of shortcut by ID.
Store a separate list of strings for the map to use as a key.
2021-02-28 01:13:43 +00:00
Gymnasiast
d6971fa79e
Fix rebase errors
2021-02-28 00:35:38 +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
4d9c278ebc
Unify calls to 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
314faa69ca
Save user shortcuts after removing a binding
2021-02-27 15:51:26 +00:00
Ted John
1ee72ffd21
Fix #14184 : Right and down arrow swapped
...
Incorrect order of legacy shortcut IDs.
2021-02-27 15:51:05 +00: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
Michael Steenbeek
28c680f97f
Merge pull request #14163 from Gymnasiast/refactor/get-rtd
...
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast
44d0e77afb
Make all access to RTD table use the bounds checking function
2021-02-26 10:01:00 +01:00
Gymnasiast
f118b2ede4
Replace ride_type_has_flag() with retrieving RTD
2021-02-26 09:49:09 +01:00
Ted John
e000f06442
Remove holdable flag from spinner widget
2021-02-25 22:30:35 +00:00
Gymnasiast
b1ab20ec27
Replace loose flag checking with helper function
2021-02-25 23:04:40 +01:00
Ted John
f7650fdfbc
Fix CI failure
2021-02-25 18:47:54 +00:00
Michał Janiszewski
ac6e4fc0d6
Move SPRITE_INDEX_NULL, MAX_SPRITES to their new homes
2021-02-25 10:56:27 +01:00
Michał Janiszewski
67b61478cf
Reduce inclusion of EntityList.h
2021-02-25 10:56:27 +01:00
Michał Janiszewski
6baff43f52
Reduce inclusion of Sprite.h
2021-02-25 10:56:27 +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
c1b0df5de6
Improve graphics plugin API
2021-02-24 22:37:31 +00:00
Ted John
081c1895ce
Add box and well APIs
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
82b1a5eb6d
Convert CustomWindow into a class
2021-02-24 22:37:31 +00:00
Ted John
668ea01548
Update src/openrct2-ui/windows/ShortcutKeys.cpp
...
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2021-02-24 16:57:19 +00:00
Gymnasiast
d63e3b1d9f
Replace RideTypeDescriptors[ride->type] with GetRideTypeDescriptor()
2021-02-24 14:10:30 +01:00
Gymnasiast
56399e7188
Use the RTD instead of ride_type_has_flag()
2021-02-24 14:10:30 +01:00
TELK
99e72dde3f
Change StringIds to more generic
2021-02-24 16:50:40 +09:00
Ted John
5ba3fdf452
Fix #14161 : ShortcutDesc.bindings does not work
2021-02-23 22:19:46 +00:00
Ted John
52dffb83c2
Fix #14160 : Game crashs when registering shortcuts
2021-02-23 22:18:00 +00:00
Ted John
aedd93ef33
Add remove button to clear a shortcut
2021-02-23 21:34:32 +00:00
Ted John
817edff4bd
Fix #14149 : Numpad shortcut keys are not loaded correctly
2021-02-23 20:35:24 +00:00
TELK
ea5cf16924
Feature: Make ride construction shortcuts work for footpath too
2021-02-23 16:11:53 +09:00
Ted John
440c0f447f
Fix #14140 : Some shortcut keys are not working
2021-02-21 21:44:53 +01:00
Michael Steenbeek
0cdbc99984
Merge pull request #13848 from IntelOrca/refactor/shortcut-engine
...
Introduce new shortcut engine
2021-02-21 14:01:39 +01:00
Duncan
2b26e423e4
Remove AsGuest and AsStaff duplicated functions
2021-02-21 13:23:31 +01:00
Ted John
ed29c0a37b
Replace std::printf with Console::*
2021-02-21 03:14:20 +00:00
Ted John
e383b6f6f7
Move zoom and rotation to view tab
2021-02-21 03:14:20 +00:00
Ted John
b3f6437092
Apply suggestions from code review
2021-02-21 03:14:19 +00:00
Ted John
cacfb8be07
Refactor dead key handling
2021-02-21 03:14:19 +00:00
Gymnasiast
d5eb1cc036
Fix dead key handling
...
This fixes deadkey handling on at least US International on Linux.
2021-02-21 03:14:19 +00:00
Ted John
2b14fe9d7f
Update shortcut listings
2021-02-21 03:14:19 +00:00
Ted John
ff86ebbfe5
Localise shortcut strings
2021-02-21 03:14:19 +00:00
Ted John
acfda711f5
Use std::string_view without reference
2021-02-21 03:14:19 +00:00
Ted John
59b4be6a12
Move InputManager to UiContext
2021-02-21 03:14:19 +00:00
Ted John
80662d72a4
Cache view scroll shortcuts
2021-02-21 03:14:19 +00:00
Ted John
fa1a374a04
Scale binding column in window
2021-02-21 03:14:19 +00:00
Ted John
2b197d0fb2
Fix parsing of shortcuts
2021-02-21 03:14:18 +00:00
Ted John
46c3fd4e5f
Use FileStream instead of fstream
2021-02-21 03:14:18 +00:00
Ted John
eda33fea20
Fix view scroll shortcuts
2021-02-21 03:14:18 +00:00
Ted John
2b3aabb8e4
Remove old shortcut code and fix issues
2021-02-21 03:14:18 +00:00
Ted John
f2f658bf28
Refactor some code into more files
2021-02-21 03:14:18 +00:00
Ted John
af0ed416f5
Implement loading / saving of new shortcuts
2021-02-21 03:14:18 +00:00
Ted John
18c3587d63
Rename shortcut IDs and order groups
2021-02-21 03:14:18 +00:00
Ted John
afb4500c49
Add eye icon for tab
2021-02-21 03:14:18 +00:00
Ted John
7b00f9d96d
Add tabs to keyboard shortcut window
2021-02-21 03:14:18 +00:00
Ted John
f69c1576b3
Refactor shortcut windows to class
2021-02-21 03:14:18 +00:00
Ted John
e7ae9f9f15
Read legacy shortcuts and move to constants
2021-02-21 03:14:17 +00:00
Ted John
900f3cd92b
Fix gcc / clang builds
2021-02-21 03:14:17 +00:00
Ted John
afc548c5a7
Add plugin API for shortcuts
2021-02-21 03:14:13 +00:00
Ted John
9964df5335
Implement gamepad support
2021-02-21 03:13:28 +00:00
Ted John
e6b6403024
Refactor and fix shortcut
2021-02-21 03:13:28 +00:00
Ted John
ea975f88fc
Implement more InputManager
2021-02-21 03:13:28 +00:00
Ted John
c8f31dea7f
Process keyboard input events
2021-02-21 03:13:28 +00:00
Ted John
3339089235
Add more shortcuts
2021-02-21 03:13:28 +00:00
Ted John
f009b9a804
Only handle release mouse buttons
2021-02-21 03:13:28 +00:00
Ted John
ccae533978
Add input manager
2021-02-21 03:13:27 +00:00
Ted John
b1eb975529
Re-add show change dialog
2021-02-21 03:13:27 +00:00
Ted John
e5f263a0fc
Get new manager showing in window
2021-02-21 03:13:27 +00:00
Ted John
28aead5cb5
Start work on new shortcut engine
2021-02-21 03:13:27 +00:00
Michał Janiszewski
9aef29361f
Default-initialise more fields ( #14130 )
...
Doesn't really fix any particular issue, but adds more defaults to
fields in classes where other defaults are already present
2021-02-20 19:40:32 +01:00
Ted John
e7adf19f62
Merge pull request #14059 from IntelOrca/improve-viewport-filter-flags
...
[Plugin] Add optional filter to custom tools
2021-02-19 20:33:27 +00:00
Michael Steenbeek
e11304f1df
Fix #14111 , #14112 : Strange behaviour when selecting a new scenario
2021-02-19 09:37:06 +01:00
Ted John
762b6ee816
Refactor viewport interaction flags and add plugin API
2021-02-18 18:10:29 +00:00
Ted John
27013d147a
Invalidate viewport when moving without scrolling
2021-02-18 18:10:29 +00:00
Gymnasiast
1b964c0f2e
Refactor flat ride track pieces
2021-02-18 17:50:19 +01:00
Ted John
785fb153db
Merge pull request #14088 from IntelOrca/improve-network-messages
...
Improve network messages and logging
2021-02-18 13:36:44 +00:00
Geoff B
0532ebab7a
Fix #14095 : Holding down [-][+] buttons does not change number of circuits
2021-02-17 08:51:07 +01:00
Ted John
3f5698b1e0
Fix REPL write line on Linux
2021-02-16 20:24:51 +00:00
Michael Steenbeek
962ef0c02b
Fix #14066 : NPE in window_top_toolbar_invalidate()
2021-02-12 18:48:38 +01:00
Michael Steenbeek
61536eb1f6
Fix #14073 : NPE in InputUpdateTooltip
2021-02-12 18:36:58 +01:00
Ted John
1cb3330779
Fix #14042 : Park Crashes whilst saving
2021-02-09 23:51:31 +00:00
Michael Steenbeek
397512f4d3
Fix #14032 : NPE in window_tile_inspector_scrollpaint()
2021-02-09 23:02:31 +01:00
Michael Steenbeek
0a8cfe75b0
Merge pull request #13969 from IntelOrca/plugin/title-seq
...
[Plugin] Add APIs for editing title sequences
2021-02-09 19:56:16 +01:00
ζeh Matt
3e675cdf04
Merge pull request #14023 from ZehMatt/refactor/peep-pickup
...
Move peep pickup test into Peep::CanBePickedUp
2021-02-09 01:30:11 +02:00
Matt
7d517caced
Move peep pickup test into Peep::CanBePickedUp
2021-02-09 00:31:29 +02:00
Michael Steenbeek
7862591a43
Fix #14012 : 'Finish 5 coasters' goal listed incorrectly in selector
2021-02-08 23:29:59 +01:00
Ted John
099a087b18
Fix CI build errors
2021-02-08 22:27:28 +00:00
Ted John
129d85fa57
Implement title sequence playing
2021-02-08 22:27:28 +00:00
Ted John
78df831f29
Implement loading of parks
2021-02-08 22:27:28 +00:00
Ted John
d2a97ab43c
Implement scenario select window
2021-02-08 22:27:28 +00:00
Ted John
8cfdbd871d
Improve title sequence API
2021-02-08 22:27:28 +00:00
Ted John
fcb5f51c4a
Allow saving of commands
2021-02-08 22:27:28 +00:00
Ted John
f99c57e11d
Implement getting commands
2021-02-08 22:27:28 +00:00
Ted John
3ed221f128
Add APIs for loading a saved game and adding a park
2021-02-08 22:27:28 +00:00
Ted John
41c7b04ab2
Add parks to title sequence API
2021-02-08 22:27:28 +00:00
Ted John
55ebebb869
Add title sequence API
2021-02-08 22:27:27 +00:00
Ted John
e5b412fb5f
Fix #14017 : Text input window errors
2021-02-08 17:45:08 +00:00
Ted John
17f4f3aaf8
Refactor text input window to class
2021-02-07 22:36:31 +01:00
ζeh Matt
2a06043860
Merge pull request #13996 from ZehMatt/fix-13992
...
Fix #13992 : Do not show empty groups in guest list
2021-02-04 20:31:15 +02:00
Matt
0427ad2914
Fix #13992 : Do not show empty groups in guest list
2021-02-04 19:30:44 +02:00
Umdlye
2c408342d9
Create toggle for zoom toolbar button
2021-02-01 17:27:40 +01:00
Jaime Centeno
83fcfa6e68
Refactored water window code into WaterWindow class
...
Created a new WaterWindow class that inherits from Window class and overrides On methods. Added a new generic method for WindowFocusOnCreate that takes position as an argument.
2021-02-01 14:33:22 +01:00
ζeh Matt
9ff2138f3f
Remove unused variable gCurrentFontFlags
2021-01-30 16:46:22 +01:00
Ted John
4a37f1479c
Merge pull request #13927 from IntelOrca/plugin/extra-ui
...
* Add isVisible property to widgets so that you can easily show / hide widgets.
* Add new text box widget for text input
* Allow plugin windows to be transparent
* Add `textAlign` property to label widget
2021-01-29 20:55:25 +00:00