mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-05-09 08:25:44 +02:00
[GH-ISSUE #354] Add more functions by default to Ion in Python #162
Labels
No labels
bug
duplicate
easy
enhancement
enhancement
fixed
fixed
good first issue
hard
invalid
pull-request
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Upsilon#162
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PetitFrapo on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/354
Is your feature request related to a problem? Please describe.
Each time I use Ion to make Python programs I always stumble into the issue of half presses or waiting for full press, so I find myself needing to program key_pressed() and key_half_pressed() functions, and I think they should be implemented, because a simple keydown doesn't cut it for some situations, makes UIs way too sensitive.
Describe the solution you'd like
Implement in Ion by default the key_pressed(k) and key_half_pressed(k) functions. The former immediately returns False if the key is not down and if the key is down, it waits until it's unheld to return True. The latter is a bit harder to implement, but the idea is that once the key is pressed it returns True but it shouldn't return True again as long as the key is still held, which prevents actions on the same key to happen each frame, but while not needing to wait to un-hold it.
(I also think that get_keys() should not return strings of the keys themselves, but more like "KEY_EXP", "KEY_EXE", etc...)
If you have any further questions about the functions I mentioned, feel free to ask for clarification.