Functions to check for common buttons/keys
This commit is contained in:
19
input.go
Normal file
19
input.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package objects
|
||||
|
||||
import "git.tebibyte.media/tomo/tomo/input"
|
||||
|
||||
func isClickingKey (key input.Key) bool {
|
||||
return key == input.KeyEnter || key == input.Key(' ')
|
||||
}
|
||||
|
||||
func isConfirmationKey (key input.Key) bool {
|
||||
return key == input.KeyEnter
|
||||
}
|
||||
|
||||
func isClickingButton (button input.Button) bool {
|
||||
return button == input.ButtonLeft
|
||||
}
|
||||
|
||||
func isMenuButton (button input.Button) bool {
|
||||
return button == input.ButtonLeft
|
||||
}
|
||||
Reference in New Issue
Block a user