-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Operating System
Any
OpenRCT2 build
OpenRCT2, v0.4.5-107 (9742774 on develop, DEBUG)
Base game
RollerCoaster Tycoon 2
Area(s) with this issue?
No response
Describe the issue
When you paste something into the console, the caret does not update. This is similar to #20484.
Fixing this issue properly might require some work. The code to handle pasting is here:
OpenRCT2/src/openrct2-ui/TextComposition.cpp
Line 183 in 8c0a931
| case SDLK_v: |
However, the InGameConsole is not properly integrated with the TextComposition class. Other windows set global variables like gCurrentTextBox and gUsingWidgetTextBox to be notified about changes from the TextComposition class via the Window class. The console does not do this and instead the TextComposition class is simply hardcoded to call console.RefreshCaret() when changes happen. This is called whenever you edit any text box even if the console isn't open.
The quick fix for this issue would be to add another one of these calls to the code that handles pasting linked above. A proper fix would involve integrating the console properly --- maybe start with setting the global variables in InGameConsole::Open() and Close()
Steps to reproduce
- Open the console.
- Paste something in.
- Observe the position of the caret.
Attachments
No response