Replies: 1 comment
-
|
Those user interface functions had been written only as a little bit of a demo code. A more advanced user interface has been added with the MUI sub lib for u8g2. Especially it contains kind of a text input: https://github.com/olikraus/u8g2/wiki/muiref#character-input Basically the MUI char input function could be extended to CJK, but i don't know whether it makes sense to cycle through >1000 chars. So maybe a different input concept is required for CJK. MUI in general is a none-blocking UI (unlike the u8g2 user interface function), so in general MUI should be preferred. U8g2 itself should stay as a core graphics lib, high level functionality like more complex UI widget could be added to MUI. Another option is to check out existing arduino libraries: https://github.com/neu-rah/ArduinoMenu |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Proposal: String / CJK Input Method Extension for UserInterface functions
Hi, first of all thank you for the amazing library — it's been a pleasure to work with on STM32 projects.
Current Limitation
The existing
u8g2_UserInterfaceInputValueonly supports numeric input (uint8, 0–255). There is currently no built-in way to input arbitrary strings or CJK (e.g. Chinese) characters through the user interface API.Proposal
I'd like to propose adding a string input method extension, tentatively named
u8g2_UserInterfaceInputString, that follows the same style as the existing UserInterface functions.The rough idea:
Questions Before I Start
Before writing any code I wanted to check:
Happy to start small — for example a first PR with only ASCII string input and no CJK, then build on top of that.
Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions