mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-07-18 00:47:03 +00:00
touch controls wip!(:
This commit is contained in:
parent
bdca57735a
commit
3e6ff0de4d
9 changed files with 206 additions and 41 deletions
|
|
@ -88,13 +88,14 @@ Shared="*res://src/autoload/Shared.gd"
|
|||
HUD="*res://src/autoload/HUD.tscn"
|
||||
Pause="*res://src/autoload/Pause.tscn"
|
||||
Music="*res://src/autoload/Music.tscn"
|
||||
TouchScreen="*res://src/autoload/touch_screen.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=228
|
||||
window/size/height=128
|
||||
window/dpi/allow_hidpi=true
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
|
||||
[editor_plugins]
|
||||
|
|
@ -128,91 +129,95 @@ texture={
|
|||
|
||||
up={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"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":87,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"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":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
down={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"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":83,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"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":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
left={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"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":65,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"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":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||
]
|
||||
}
|
||||
right={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"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":68,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"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":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||
]
|
||||
}
|
||||
jump={
|
||||
"deadzone": 0.5,
|
||||
"events": [ 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,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ 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(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,"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":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)
|
||||
]
|
||||
}
|
||||
action={
|
||||
"deadzone": 0.5,
|
||||
"events": [ 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,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ 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(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,"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":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)
|
||||
]
|
||||
}
|
||||
reset={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_spawn_box={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
window_shrink={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":45,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":45,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
window_expand={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":61,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":61,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
dev_console={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
pause={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"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":16777221,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"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":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
screenshot={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777252,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777252,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[input_devices]
|
||||
|
||||
pointing/emulate_touch_from_mouse=true
|
||||
|
||||
[rendering]
|
||||
|
||||
2d/snapping/use_gpu_pixel_snap=true
|
||||
|
|
|
|||
|
|
@ -40,14 +40,16 @@ func _input(event):
|
|||
if event.is_action_pressed("pause"):
|
||||
toggle_pause()
|
||||
if is_paused:
|
||||
|
||||
if event.is_action_pressed("action"):
|
||||
toggle_pause()
|
||||
elif event.is_action_pressed("jump"):
|
||||
select()
|
||||
elif event.is_action_pressed("down") or event.is_action_pressed("up"):
|
||||
var btny = btn.p("down") - btn.p("up")
|
||||
if btny:
|
||||
set_cursor(cursor + btny)
|
||||
else:
|
||||
var up = event.is_action_pressed("up") or event.is_action_pressed("left")
|
||||
var down = event.is_action_pressed("down") or event.is_action_pressed("right")
|
||||
if up or down:
|
||||
set_cursor(cursor + (-1 if up else 1))
|
||||
write_menu()
|
||||
node_audio_scroll.pitch_scale = 1 + rand_range(-0.2, 0.2)
|
||||
node_audio_scroll.play()
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ func change_map():
|
|||
get_tree().change_scene(scene_path)
|
||||
is_level_select = scene_path == level_select_path
|
||||
is_in_game = scene_path.begins_with(map_path) or scene_path.begins_with(win_screen_path)
|
||||
TouchScreen.pause.visible = is_in_game
|
||||
HUD.wipe.start(true)
|
||||
Pause.set_process_input(true)
|
||||
|
||||
|
|
|
|||
3
src/autoload/touch_screen.gd
Normal file
3
src/autoload/touch_screen.gd
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var pause : TouchScreenButton = $Node2D/Pause
|
||||
137
src/autoload/touch_screen.tscn
Normal file
137
src/autoload/touch_screen.tscn
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://src/autoload/touch_screen.gd" type="Script" id=1]
|
||||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://src/autoload/touch_screen_button.gd" type="Script" id=4]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 14.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
radius = 14.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id=3]
|
||||
radius = 14.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id=4]
|
||||
radius = 14.5
|
||||
|
||||
[sub_resource type="CircleShape2D" id=5]
|
||||
radius = 14.5
|
||||
|
||||
[node name="TouchScreen" type="CanvasLayer"]
|
||||
pause_mode = 2
|
||||
layer = 15
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="."]
|
||||
|
||||
[node name="Left" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 20, 108 )
|
||||
shape = SubResource( 1 )
|
||||
shape_centered = false
|
||||
passby_press = true
|
||||
action = "left"
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="Node2D/Left"]
|
||||
modulate = Color( 1, 1, 1, 0.0784314 )
|
||||
script = ExtResource( 4 )
|
||||
circle_size = 12.0
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Node2D/Left"]
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
offset = Vector2( -12.5, 0 )
|
||||
polygon = PoolVector2Array( 0, 0, 25, -25, 25, 25 )
|
||||
|
||||
[node name="Right" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 50, 108 )
|
||||
shape = SubResource( 2 )
|
||||
shape_centered = false
|
||||
passby_press = true
|
||||
action = "right"
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="Node2D/Right"]
|
||||
modulate = Color( 1, 1, 1, 0.0784314 )
|
||||
script = ExtResource( 4 )
|
||||
circle_size = 12.0
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Node2D/Right"]
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
offset = Vector2( 12.5, 0 )
|
||||
polygon = PoolVector2Array( 0, 0, -25, -25, -25, 25 )
|
||||
|
||||
[node name="C" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 178, 108 )
|
||||
shape = SubResource( 3 )
|
||||
shape_centered = false
|
||||
passby_press = true
|
||||
action = "action"
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="Node2D/C"]
|
||||
modulate = Color( 1, 1, 1, 0.0784314 )
|
||||
script = ExtResource( 4 )
|
||||
circle_size = 12.0
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D/C"]
|
||||
margin_left = -12.0
|
||||
margin_top = -12.0
|
||||
margin_right = 12.0
|
||||
margin_bottom = 12.0
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "c"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="X" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 208, 108 )
|
||||
shape = SubResource( 4 )
|
||||
shape_centered = false
|
||||
passby_press = true
|
||||
action = "jump"
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="Node2D/X"]
|
||||
modulate = Color( 1, 1, 1, 0.0784314 )
|
||||
script = ExtResource( 4 )
|
||||
circle_size = 12.0
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D/X"]
|
||||
margin_left = -12.0
|
||||
margin_top = -12.0
|
||||
margin_right = 12.0
|
||||
margin_bottom = 12.0
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "x"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Pause" type="TouchScreenButton" parent="Node2D"]
|
||||
position = Vector2( 208, 20 )
|
||||
shape = SubResource( 5 )
|
||||
shape_centered = false
|
||||
passby_press = true
|
||||
action = "pause"
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="Node2D/Pause"]
|
||||
modulate = Color( 1, 1, 1, 0.0784314 )
|
||||
script = ExtResource( 4 )
|
||||
circle_size = 12.0
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D/Pause"]
|
||||
margin_left = -12.0
|
||||
margin_top = -12.0
|
||||
margin_right = 12.0
|
||||
margin_bottom = 12.0
|
||||
custom_fonts/font = ExtResource( 3 )
|
||||
text = "pause"
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
16
src/autoload/touch_screen_button.gd
Normal file
16
src/autoload/touch_screen_button.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
tool
|
||||
extends Node2D
|
||||
|
||||
export var is_var := false setget set_is_var
|
||||
export var circle_size := 10.0 setget set_circle
|
||||
|
||||
func set_is_var(arg):
|
||||
is_var = arg
|
||||
update()
|
||||
|
||||
func set_circle(arg):
|
||||
circle_size = arg
|
||||
update()
|
||||
|
||||
func _draw():
|
||||
draw_circle(Vector2.ZERO, circle_size, Color.white)
|
||||
|
|
@ -39,10 +39,11 @@ func _input(event):
|
|||
menu_select()
|
||||
elif event.is_action_pressed("jump"):
|
||||
menu_select()
|
||||
elif event.is_action_pressed("down") or event.is_action_pressed("up"):
|
||||
var btny = btn.p("down") - btn.p("up")
|
||||
if btny:
|
||||
cursor = clamp(cursor + btny, 0, menu_items.size() - 1)
|
||||
else:
|
||||
var up = event.is_action_pressed("up") or event.is_action_pressed("left")
|
||||
var down = event.is_action_pressed("down") or event.is_action_pressed("right")
|
||||
if up or down:
|
||||
cursor = clamp(cursor + (-1 if up else 1), 0, menu_items.size() - 1)
|
||||
write_menu()
|
||||
node_audio_scroll.pitch_scale = 1 + rand_range(-0.2, 0.2)
|
||||
node_audio_scroll.play()
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ margin_left = 11.0
|
|||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -75,10 +75,10 @@ margin_left = -40.0
|
|||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 6 )
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -105,8 +105,8 @@ margin_left = 12.0
|
|||
margin_top = 48.0
|
||||
margin_right = 48.0
|
||||
margin_bottom = 89.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "play
|
||||
options
|
||||
credits
|
||||
|
|
@ -149,8 +149,8 @@ margin_left = 18.0
|
|||
margin_top = 17.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
text = "yes
|
||||
no"
|
||||
align = 1
|
||||
|
|
@ -163,10 +163,10 @@ margin_left = -53.0
|
|||
margin_top = 4.0
|
||||
margin_right = 121.0
|
||||
margin_bottom = 17.0
|
||||
custom_fonts/font = ExtResource( 17 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 17 )
|
||||
text = "Quit Game?"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
|
|
@ -178,10 +178,10 @@ margin_left = -33.0
|
|||
margin_top = 24.0
|
||||
margin_right = 81.0
|
||||
margin_bottom = 37.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "TINY CRATE"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
|
|
@ -193,8 +193,8 @@ margin_left = 26.0
|
|||
margin_top = -10.0
|
||||
margin_right = 87.0
|
||||
margin_bottom = -4.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "Harmony Honey's"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ margin_top = 46.0
|
|||
margin_right = 100.0
|
||||
margin_bottom = 54.0
|
||||
grow_horizontal = 2
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_fonts/font = ExtResource( 2 )
|
||||
text = "1-1"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
|
@ -230,9 +230,9 @@ margin_left = 49.0
|
|||
margin_top = 13.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 26.0
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "menu"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -266,10 +266,10 @@ margin_left = 11.0
|
|||
margin_top = -6.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 7.0
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "back"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -288,10 +288,10 @@ margin_left = 11.0
|
|||
margin_top = -7.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "select"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -310,10 +310,10 @@ margin_left = -40.0
|
|||
margin_top = -7.0
|
||||
margin_right = -10.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue