mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-10-22 19:22:04 +00:00
The direct text editing mode introduced for KBM users had several issues with the TextInput control's caret (blinking cursor) and text manipulation: 1. Caret visible when not editing: When navigating to the world name field with keyboard/mouse, Flash's Iggy focus system would show the blinking caret even though the field wasn't active for editing yet (Enter not pressed). This was misleading since typing had no effect in that state. Fix: access the FJ_TextInput's internal m_mcCaret MovieClip and force its visibility based on editing state. This is enforced every tick because setLabel() and Flash focus transitions continuously reset the caret state. 2. No cursor movement during editing: The direct edit implementation treated the text as a simple buffer with push_back/pop_back — there was no concept of cursor position. Backspace only deleted from the end, and arrow keys did nothing. Fix: track cursor position (m_iCursorPos) in C++ and use wstring insert/erase at that position. Arrow keys (Left/Right), Home, End, and Delete now work as expected. The visual caret position is synced to Flash via the FJ_TextInput's SetCaretIndex method. 3. setLabel() resetting caret position: Every call to setLabel() (when text changes) caused Flash to reset the caret to the end of the string, making the cursor jump visually even though the C++ position was correct. Fix: enforce caret position via setCaretIndex every tick during editing, so any Flash-side resets are immediately corrected. New UIControl_TextInput API: - setCaretVisible(bool): toggles m_mcCaret.visible in Flash - setCaretIndex(int): calls FJ_TextInput.SetCaretIndex in Flash |
||
|---|---|---|
| .. | ||
| Audio | ||
| Colours | ||
| DLC | ||
| DummyTexturePack/res | ||
| GameRules | ||
| Leaderboards | ||
| Media | ||
| Network | ||
| res | ||
| Telemetry | ||
| Trial | ||
| Tutorial | ||
| UI | ||
| XUI | ||
| zlib | ||
| App_Defines.h | ||
| App_enums.h | ||
| App_structs.h | ||
| BuildVer.h | ||
| C4JMemoryPool.h | ||
| C4JMemoryPoolAllocator.h | ||
| CommonMedia.sln | ||
| CommonMedia.vcxproj | ||
| CommonMedia.vcxproj.filters | ||
| Console_Awards_enum.h | ||
| Console_Debug_enum.h | ||
| Console_Utils.cpp | ||
| ConsoleGameMode.cpp | ||
| ConsoleGameMode.h | ||
| Consoles_App.cpp | ||
| Consoles_App.h | ||
| Minecraft_Macros.h | ||
| PostProcesser.h | ||
| Potion_Macros.h | ||
| xuiscene_base.h | ||