Made arrow keys (with shift and control for speedup) work ^.^ nyaaa

This commit is contained in:
sapient_cogbag 2020-04-13 08:55:01 +01:00
parent c63fd85659
commit 11a7261ef1
No known key found for this signature in database
GPG key ID: 9DA0A435732D7C4A
2 changed files with 100 additions and 1 deletions

View file

@ -10,6 +10,24 @@ var config_cache := ConfigFile.new()
var XDGDataPaths = preload("res://Scripts/XDGDataPaths.gd")
var directory_module : Node
# Stuff for arrowkey-based canvas movements nyaa ^.^
const low_speed_move_rate := 150.0
const medium_speed_move_rate := 750.0
const high_speed_move_rate := 3750.0
enum Direction {
UP = 0,
DOWN = 1,
LEFT = 2,
RIGHT = 3
}
# Indices are as in the Direction enum
# This is the total time the key for
# that direction has been pressed.
var key_move_press_time := [0.0, 0.0, 0.0, 0.0]
# warning-ignore:unused_class_variable
var loaded_locales : Array
var undo_redo : UndoRedo