-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libvmui.textinput() and desktop shell builtin don't support moving cursor with mouse. #1
Comments
@SBTCVM/core-devs any ideas? |
ill take a look, is the issue in the current branch? |
@wyatthuckaby yup. perhaps the size() method of pygame font objects might be of use? to determine the size of the characters. see pygame docs: (http://www.pygame.org/docs/ref/font.html#pygame.font.Font.size) the new calculator (calc.py) is the first utility to use it. (and its handy character mask feature) also, MK2-TOOLS.py has a test for it via the "textinput" argument. |
i should also point out that the cursor is an actual vertical bar/space that is inserted into the a copy of the current string that is used for rendering. this will affect the position of characters a bit. |
Fixing this in the desktop shell builtin should not be much more work, given that the code actually functions the same way as libvmui.textinput() just with slightly modified event parsing, and a different rendering scenario... |
The recently added general-use text input function does feature a movable cursor, but its only movable via the keyboard. the question is how to add mouse support without massively over-complicating it.
it would help the general usability of the calculator a bit, as well as any utilities that end up using libvmui.textinput() as well.
The text was updated successfully, but these errors were encountered: