mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
keeys
This commit is contained in:
parent
49f6a2e58d
commit
27fecf9310
6 changed files with 24 additions and 30 deletions
|
|
@ -189,8 +189,8 @@ jump={
|
|||
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":75,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
action={
|
||||
|
|
@ -198,8 +198,8 @@ action={
|
|||
"events": [ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
pause={
|
||||
|
|
|
|||
|
|
@ -80,34 +80,32 @@ margin_bottom = 123.0
|
|||
custom_constants/separation = 0
|
||||
|
||||
[node name="X" type="HBoxContainer" parent="Center/Control/List"]
|
||||
margin_right = 37.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 12.0
|
||||
custom_constants/separation = 4
|
||||
|
||||
[node name="Key" parent="Center/Control/List/X" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_right = 9.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 9, 9 )
|
||||
text = "x"
|
||||
margin_right = 7.0
|
||||
margin_bottom = 11.0
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/List/X"]
|
||||
margin_left = 13.0
|
||||
margin_left = 11.0
|
||||
margin_top = 3.0
|
||||
margin_right = 37.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "pick"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/List"]
|
||||
margin_left = 37.0
|
||||
margin_right = 175.0
|
||||
margin_left = 35.0
|
||||
margin_right = 177.0
|
||||
margin_bottom = 12.0
|
||||
rect_min_size = Vector2( 4, 0 )
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="C" type="HBoxContainer" parent="Center/Control/List"]
|
||||
margin_left = 175.0
|
||||
margin_left = 177.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
rect_pivot_offset = Vector2( -248, -67 )
|
||||
|
|
@ -115,16 +113,14 @@ custom_constants/separation = 4
|
|||
|
||||
[node name="Key" parent="Center/Control/List/C" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_right = 9.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 9, 9 )
|
||||
margin_right = 7.0
|
||||
margin_bottom = 11.0
|
||||
action = "action"
|
||||
text = "c"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/List/C"]
|
||||
margin_left = 13.0
|
||||
margin_left = 11.0
|
||||
margin_top = 3.0
|
||||
margin_right = 43.0
|
||||
margin_right = 41.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "erase"
|
||||
|
|
@ -284,21 +280,21 @@ custom_constants/separation = 0
|
|||
alignment = 2
|
||||
|
||||
[node name="P" type="HBoxContainer" parent="Center/Control/Top"]
|
||||
margin_left = 169.0
|
||||
margin_left = 175.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
custom_constants/separation = 4
|
||||
|
||||
[node name="Key" parent="Center/Control/Top/P" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_right = 21.0
|
||||
margin_bottom = 10.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 11.0
|
||||
action = "pause"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/Top/P"]
|
||||
margin_left = 25.0
|
||||
margin_left = 19.0
|
||||
margin_top = 3.0
|
||||
margin_right = 49.0
|
||||
margin_right = 43.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "menu"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ func _ready():
|
|||
fill_swatches(i)
|
||||
|
||||
func _input(event):
|
||||
if !is_input: return
|
||||
if !is_input or Wipe.is_wipe: return
|
||||
|
||||
var btnx = btn.p("right") - btn.p("left")
|
||||
var btny = btn.p("down") - btn.p("up")
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ var swap := {"control" : "ctrl",
|
|||
"pagedown" : "pgdn",
|
||||
}
|
||||
|
||||
export var font_width := 6
|
||||
|
||||
func _ready():
|
||||
set_action()
|
||||
|
|
@ -37,7 +38,7 @@ func _ready():
|
|||
|
||||
func set_text(arg := text):
|
||||
text = arg
|
||||
var l = text.length() * 6.0
|
||||
var l = text.length() * font_width
|
||||
|
||||
rect_min_size = Vector2(l + 3, 9)
|
||||
|
||||
|
|
@ -54,8 +55,7 @@ func set_text(arg := text):
|
|||
|
||||
func set_action(arg := action):
|
||||
action = arg
|
||||
print("set_action = ", action, " ", InputMap.get_action_list(action))
|
||||
|
||||
if Engine.editor_hint: return
|
||||
|
||||
if action != "" and InputMap.has_action(action):
|
||||
var l = InputMap.get_action_list(action)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ action = "jump"
|
|||
[node name="White" type="ColorRect" parent="."]
|
||||
margin_right = 21.0
|
||||
margin_bottom = 9.0
|
||||
rect_min_size = Vector2( 8, 8 )
|
||||
|
||||
[node name="Black" type="ColorRect" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
|
|
@ -30,7 +29,6 @@ margin_left = 1.0
|
|||
margin_top = 1.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 7, 7 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = 2.0
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ func sort_list(a, b):
|
|||
return false
|
||||
|
||||
func _input(event):
|
||||
if !is_input:
|
||||
if !is_input or Wipe.is_wipe:
|
||||
return
|
||||
|
||||
if event.is_action_pressed("action"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue