Similar to the onKeyDown UIEH the onChar UIEH should be able to intercept input from the user. This would open up the possibility to use onChar for a CT_EDIT control to only accept certain characters, such as numbers. The same functionality is currently only possible with an onKeyDown UIEH that either checks the DIK code (unreliable due to different keyboard layouts as well as inelegant for eg numbers as you have to compare top row numbers AND numpad DIK codes) or compare the texts in the next frame to check for not allowed chars.
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 10 x64
- Category
- Feature Request
Steps To Reproduce
An example mission with the intended use is attached. The description.ext contains the onChar UIEH.
Event Timeline
Comment Actions
If retrocompatibility is a concern then another idea would be to add a new config entry:
class MyEdit: RscEdit { allowedChars[] = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57}; };