mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
Keys keys keys! Keymap.png to show images (:
reworking UI to show arrow keys!
This commit is contained in:
parent
2e91599d59
commit
9faaaab55c
18 changed files with 441 additions and 330 deletions
BIN
media/image/keymap.png
Normal file
BIN
media/image/keymap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 B |
|
|
@ -155,34 +155,34 @@ 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,"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)
|
||||
"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":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)
|
||||
, 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)
|
||||
]
|
||||
}
|
||||
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,"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)
|
||||
"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":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)
|
||||
, 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)
|
||||
]
|
||||
}
|
||||
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,"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)
|
||||
"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":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)
|
||||
, 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)
|
||||
]
|
||||
}
|
||||
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,"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)
|
||||
"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":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)
|
||||
, 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)
|
||||
]
|
||||
}
|
||||
jump={
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ func change_map():
|
|||
is_note = false
|
||||
UI.map.visible = is_level_select
|
||||
|
||||
UI.keys(false, false)
|
||||
UI.keys(false, false, false, false, false)
|
||||
UI.labels("pick", "erase" if scene_path == creator_path else "back", "score" if is_level_select else "pause")
|
||||
|
||||
if is_in_game:
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
extends CanvasLayer
|
||||
|
||||
onready var x := $Center/Control/List/X
|
||||
onready var x_label := $Center/Control/List/X/Desc
|
||||
onready var c := $Center/Control/List/C
|
||||
onready var c_label := $Center/Control/List/C/Desc
|
||||
onready var spacer := $Center/Control/List/Spacer
|
||||
onready var x := $Center/Control/Bottom/Keys/X
|
||||
onready var x_label := $Center/Control/Bottom/Keys/X/Desc
|
||||
onready var c := $Center/Control/Bottom/Keys/C
|
||||
onready var c_label := $Center/Control/Bottom/Keys/C/Desc
|
||||
onready var arrows := $Center/Control/Bottom/Arrows
|
||||
onready var spacer := $Center/Control/Bottom/Spacer
|
||||
|
||||
onready var top := $Center/Control/Top
|
||||
onready var pause_label := $Center/Control/Top/P/Desc
|
||||
|
|
@ -23,16 +24,20 @@ onready var stat_note_label := $Center/Control/Stats/Note/Label
|
|||
onready var stat_die := $Center/Control/Stats/Die
|
||||
onready var stat_die_label := $Center/Control/Stats/Die/Label
|
||||
|
||||
export var pos_left := 0
|
||||
export var pos_right := 0
|
||||
|
||||
func _ready():
|
||||
keys(false, false)
|
||||
map.visible = false
|
||||
stats.visible = false
|
||||
|
||||
func keys(left := true, right := true, is_expand := true, _top := false):
|
||||
func keys(left := true, right := true, is_expand := true, _top := false, _arrows := true):
|
||||
x.visible = left
|
||||
c.visible = right
|
||||
top.visible = _top
|
||||
spacer.size_flags_horizontal = spacer.SIZE_EXPAND_FILL if is_expand else spacer.SIZE_FILL
|
||||
arrows.visible = _arrows
|
||||
|
||||
func labels(_x := "pick", _c := "back", _pause := "pause"):
|
||||
x_label.text = _x
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ font_data = ExtResource( 1 )
|
|||
pause_mode = 2
|
||||
layer = 5
|
||||
script = ExtResource( 3 )
|
||||
pos_left = 60
|
||||
pos_right = 184
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
|
|
@ -72,54 +74,101 @@ margin_right = 228.0
|
|||
margin_bottom = 128.0
|
||||
rect_min_size = Vector2( 228, 128 )
|
||||
|
||||
[node name="List" type="HBoxContainer" parent="Center/Control"]
|
||||
[node name="Bottom" type="HBoxContainer" parent="Center/Control"]
|
||||
margin_left = 5.0
|
||||
margin_top = 111.0
|
||||
margin_top = 81.0
|
||||
margin_right = 223.0
|
||||
margin_bottom = 123.0
|
||||
custom_constants/separation = 0
|
||||
|
||||
[node name="X" type="HBoxContainer" parent="Center/Control/List"]
|
||||
margin_right = 49.0
|
||||
margin_bottom = 12.0
|
||||
margin_bottom = 121.0
|
||||
custom_constants/separation = 4
|
||||
|
||||
[node name="Key" parent="Center/Control/List/X" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_bottom = 10.0
|
||||
[node name="Arrows" type="HBoxContainer" parent="Center/Control/Bottom"]
|
||||
margin_top = 33.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 40.0
|
||||
size_flags_vertical = 8
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/List/X"]
|
||||
margin_left = 25.0
|
||||
margin_top = 3.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 8.0
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Center/Control/Bottom/Arrows"]
|
||||
margin_right = 23.0
|
||||
margin_bottom = 7.0
|
||||
custom_constants/separation = 1
|
||||
|
||||
[node name="Key" parent="Center/Control/Bottom/Arrows/HBoxContainer" instance=ExtResource( 7 )]
|
||||
action = "left"
|
||||
text = "left"
|
||||
|
||||
[node name="Key4" parent="Center/Control/Bottom/Arrows/HBoxContainer" instance=ExtResource( 7 )]
|
||||
margin_left = 8.0
|
||||
margin_right = 15.0
|
||||
action = "down"
|
||||
text = "down"
|
||||
|
||||
[node name="Key3" parent="Center/Control/Bottom/Arrows/HBoxContainer/Key4" instance=ExtResource( 7 )]
|
||||
margin_top = -8.0
|
||||
margin_bottom = -1.0
|
||||
action = "up"
|
||||
text = "up"
|
||||
|
||||
[node name="Key2" parent="Center/Control/Bottom/Arrows/HBoxContainer" instance=ExtResource( 7 )]
|
||||
margin_left = 16.0
|
||||
margin_right = 23.0
|
||||
action = "right"
|
||||
text = "right"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/Bottom/Arrows"]
|
||||
margin_left = 26.0
|
||||
margin_top = 1.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "move"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/Bottom"]
|
||||
margin_left = 54.0
|
||||
margin_right = 54.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="Keys" type="VBoxContainer" parent="Center/Control/Bottom"]
|
||||
margin_left = 58.0
|
||||
margin_top = 23.0
|
||||
margin_right = 98.0
|
||||
margin_bottom = 40.0
|
||||
size_flags_vertical = 8
|
||||
custom_constants/separation = 3
|
||||
alignment = 2
|
||||
|
||||
[node name="X" type="HBoxContainer" parent="Center/Control/Bottom/Keys"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 7.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Key" parent="Center/Control/Bottom/Keys/X" instance=ExtResource( 7 )]
|
||||
text = "x"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/Bottom/Keys/X"]
|
||||
margin_left = 10.0
|
||||
margin_top = 1.0
|
||||
margin_right = 34.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "pick"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/List"]
|
||||
margin_left = 49.0
|
||||
margin_right = 163.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 = 163.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
[node name="C" type="HBoxContainer" parent="Center/Control/Bottom/Keys"]
|
||||
margin_top = 10.0
|
||||
margin_right = 40.0
|
||||
margin_bottom = 17.0
|
||||
rect_pivot_offset = Vector2( -248, -67 )
|
||||
custom_constants/separation = 4
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Key" parent="Center/Control/List/C" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_bottom = 10.0
|
||||
[node name="Key" parent="Center/Control/Bottom/Keys/C" instance=ExtResource( 7 )]
|
||||
action = "action"
|
||||
text = "c"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/List/C"]
|
||||
margin_left = 25.0
|
||||
margin_top = 3.0
|
||||
margin_right = 55.0
|
||||
margin_bottom = 8.0
|
||||
[node name="Desc" type="Label" parent="Center/Control/Bottom/Keys/C"]
|
||||
margin_left = 10.0
|
||||
margin_top = 1.0
|
||||
margin_right = 40.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "erase"
|
||||
|
||||
|
|
@ -278,20 +327,20 @@ custom_constants/separation = 0
|
|||
alignment = 2
|
||||
|
||||
[node name="P" type="HBoxContainer" parent="Center/Control/Top"]
|
||||
margin_left = 169.0
|
||||
margin_left = 184.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
custom_constants/separation = 4
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Key" parent="Center/Control/Top/P" instance=ExtResource( 7 )]
|
||||
margin_top = 1.0
|
||||
margin_bottom = 10.0
|
||||
margin_top = 2.0
|
||||
margin_bottom = 9.0
|
||||
action = "pause"
|
||||
|
||||
[node name="Desc" type="Label" parent="Center/Control/Top/P"]
|
||||
margin_left = 25.0
|
||||
margin_left = 10.0
|
||||
margin_top = 3.0
|
||||
margin_right = 49.0
|
||||
margin_right = 34.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "menu"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
[ext_resource path="res://src/stage/SpikeTileMap.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://src/actor/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://src/stage/Stage.gd" type="Script" id=7]
|
||||
[ext_resource path="res://media/font/ExpressionPro.ttf" type="DynamicFontData" id=8]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=9]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=8]
|
||||
[ext_resource path="res://src/menu/options/Key.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://src/menu/hide_on_level_select.gd" type="Script" id=10]
|
||||
[ext_resource path="res://src/stage/ObscureMap.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://src/actor/Note.tscn" type="PackedScene" id=12]
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
6/name = "crate_tiles.png 6"
|
||||
6/texture = ExtResource( 13 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 0.670588, 0.321569, 0.211765, 1 )
|
||||
6/modulate = Color( 0.678431, 0, 0.156863, 1 )
|
||||
6/region = Rect2( 0, 24, 8, 8 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
|
|
@ -150,8 +150,11 @@
|
|||
2/z_index = 0
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
extra_spacing_top = -3
|
||||
extra_spacing_bottom = -3
|
||||
size = 5
|
||||
outline_size = 1
|
||||
outline_color = Color( 0, 0, 0, 1 )
|
||||
extra_spacing_top = -1
|
||||
extra_spacing_bottom = -1
|
||||
font_data = ExtResource( 8 )
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
|
|
@ -190,23 +193,52 @@ position = Vector2( -5, -37 )
|
|||
position = Vector2( -13, 42 )
|
||||
script = ExtResource( 10 )
|
||||
|
||||
[node name="arrows" type="Sprite" parent="Node2D"]
|
||||
modulate = Color( 1, 0, 0.301961, 1 )
|
||||
texture = ExtResource( 9 )
|
||||
hframes = 6
|
||||
vframes = 4
|
||||
frame = 7
|
||||
region_rect = Rect2( 0, 0, 18, 18 )
|
||||
[node name="Arrows" type="HBoxContainer" parent="Node2D"]
|
||||
margin_left = -8.0
|
||||
margin_top = -5.0
|
||||
margin_right = 42.0
|
||||
margin_bottom = 7.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="arrows_label" type="Label" parent="Node2D"]
|
||||
margin_left = 13.0
|
||||
margin_top = -4.0
|
||||
margin_right = 45.0
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Node2D/Arrows"]
|
||||
margin_right = 23.0
|
||||
margin_bottom = 12.0
|
||||
custom_constants/separation = 1
|
||||
|
||||
[node name="Key" parent="Node2D/Arrows/HBoxContainer" instance=ExtResource( 9 )]
|
||||
margin_top = 2.0
|
||||
margin_bottom = 9.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
action = "left"
|
||||
text = "left"
|
||||
|
||||
[node name="Key4" parent="Node2D/Arrows/HBoxContainer" instance=ExtResource( 9 )]
|
||||
margin_left = 8.0
|
||||
margin_top = 2.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 9.0
|
||||
action = "down"
|
||||
text = "down"
|
||||
|
||||
[node name="Key3" parent="Node2D/Arrows/HBoxContainer/Key4" instance=ExtResource( 9 )]
|
||||
margin_top = -8.0
|
||||
margin_bottom = -1.0
|
||||
action = "up"
|
||||
text = "up"
|
||||
|
||||
[node name="Key2" parent="Node2D/Arrows/HBoxContainer" instance=ExtResource( 9 )]
|
||||
margin_left = 16.0
|
||||
margin_top = 2.0
|
||||
margin_right = 23.0
|
||||
margin_bottom = 9.0
|
||||
action = "right"
|
||||
text = "right"
|
||||
|
||||
[node name="Desc" type="Label" parent="Node2D/Arrows"]
|
||||
margin_left = 26.0
|
||||
margin_top = 3.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
text = "move"
|
||||
uppercase = true
|
||||
|
||||
[editable path="GameCamera"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=22 format=2]
|
||||
[gd_scene load_steps=21 format=2]
|
||||
|
||||
[ext_resource path="res://src/stage/SolidTileMap.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/actor/Exit.tscn" type="PackedScene" id=2]
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
[ext_resource path="res://src/stage/SpikeTileMap.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://src/actor/Player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://src/stage/Stage.gd" type="Script" id=7]
|
||||
[ext_resource path="res://media/font/ExpressionPro.ttf" type="DynamicFontData" id=8]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=8]
|
||||
[ext_resource path="res://media/image/crate_tiles.png" type="Texture" id=9]
|
||||
[ext_resource path="res://src/menu/hide_on_level_select.gd" type="Script" id=10]
|
||||
[ext_resource path="res://src/stage/ObscureMap.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://src/actor/Note.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://media/font/NicoPaint-Regular.ttf" type="DynamicFontData" id=13]
|
||||
[ext_resource path="res://src/menu/options/Key.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://media/image/8pixel.png" type="Texture" id=14]
|
||||
[ext_resource path="res://media/image/solid_bricks.png" type="Texture" id=15]
|
||||
[ext_resource path="res://media/image/bricks.png" type="Texture" id=16]
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
6/name = "crate_tiles.png 6"
|
||||
6/texture = ExtResource( 9 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 0.670588, 0.321569, 0.211765, 1 )
|
||||
6/modulate = Color( 0.678431, 0, 0.156863, 1 )
|
||||
6/region = Rect2( 0, 24, 8, 8 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
|
|
@ -149,15 +149,12 @@
|
|||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
[sub_resource type="DynamicFont" id=8]
|
||||
size = 5
|
||||
outline_size = 1
|
||||
outline_color = Color( 0, 0, 0, 1 )
|
||||
extra_spacing_bottom = -4
|
||||
font_data = ExtResource( 13 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
extra_spacing_top = -3
|
||||
extra_spacing_bottom = -3
|
||||
extra_spacing_top = -1
|
||||
extra_spacing_bottom = -1
|
||||
font_data = ExtResource( 8 )
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
|
|
@ -196,25 +193,22 @@ position = Vector2( -85, -45 )
|
|||
position = Vector2( 0, -47 )
|
||||
script = ExtResource( 10 )
|
||||
|
||||
[node name="Key" type="Label" parent="Node2D"]
|
||||
modulate = Color( 1, 0, 0.301961, 1 )
|
||||
margin_left = -6.0
|
||||
margin_top = -6.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "x"
|
||||
uppercase = true
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D"]
|
||||
margin_left = 13.0
|
||||
[node name="X" type="HBoxContainer" parent="Node2D"]
|
||||
margin_left = -3.0
|
||||
margin_top = -4.0
|
||||
margin_right = 45.0
|
||||
margin_bottom = 9.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
margin_right = 37.0
|
||||
margin_bottom = 3.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Key" parent="Node2D/X" instance=ExtResource( 13 )]
|
||||
text = "x"
|
||||
|
||||
[node name="Desc" type="Label" parent="Node2D/X"]
|
||||
margin_left = 10.0
|
||||
margin_top = 1.0
|
||||
margin_right = 34.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 8 )
|
||||
text = "jump"
|
||||
uppercase = true
|
||||
|
||||
[editable path="GameCamera"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=2]
|
||||
[gd_scene load_steps=22 format=2]
|
||||
|
||||
[ext_resource path="res://src/stage/SolidTileMap.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/actor/Box.tscn" type="PackedScene" id=2]
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
[ext_resource path="res://src/stage/SpikeTileMap.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://src/actor/Player.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://src/stage/Stage.gd" type="Script" id=8]
|
||||
[ext_resource path="res://media/font/ExpressionPro.ttf" type="DynamicFontData" id=9]
|
||||
[ext_resource path="res://media/font/NicoPaint-Regular.ttf" type="DynamicFontData" id=10]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=9]
|
||||
[ext_resource path="res://src/menu/options/Key.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://src/menu/hide_on_level_select.gd" type="Script" id=11]
|
||||
[ext_resource path="res://src/actor/Note.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://src/stage/ObscureMap.tscn" type="PackedScene" id=13]
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
6/name = "crate_tiles.png 6"
|
||||
6/texture = ExtResource( 14 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 0.670588, 0.321569, 0.211765, 1 )
|
||||
6/modulate = Color( 0.678431, 0, 0.156863, 1 )
|
||||
6/region = Rect2( 0, 24, 8, 8 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
|
|
@ -150,15 +150,12 @@
|
|||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
[sub_resource type="DynamicFont" id=8]
|
||||
size = 5
|
||||
outline_size = 1
|
||||
outline_color = Color( 0, 0, 0, 1 )
|
||||
extra_spacing_bottom = -4
|
||||
font_data = ExtResource( 10 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
extra_spacing_top = -3
|
||||
extra_spacing_bottom = -3
|
||||
extra_spacing_top = -1
|
||||
extra_spacing_bottom = -1
|
||||
font_data = ExtResource( 9 )
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
|
|
@ -207,25 +204,25 @@ position = Vector2( -125, -37 )
|
|||
position = Vector2( 15, 36 )
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="Key" type="Label" parent="Node2D"]
|
||||
modulate = Color( 1, 0, 0.301961, 1 )
|
||||
margin_left = -6.0
|
||||
margin_top = -6.0
|
||||
margin_right = 5.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "p"
|
||||
uppercase = true
|
||||
[node name="X" type="HBoxContainer" parent="Node2D"]
|
||||
margin_left = -13.0
|
||||
margin_top = -3.0
|
||||
margin_right = 51.0
|
||||
margin_bottom = 4.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D"]
|
||||
margin_left = 9.0
|
||||
margin_top = -4.0
|
||||
margin_right = 41.0
|
||||
margin_bottom = 9.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
text = "menu"
|
||||
uppercase = true
|
||||
[node name="Key" parent="Node2D/X" instance=ExtResource( 10 )]
|
||||
margin_right = 31.0
|
||||
rect_min_size = Vector2( 31, 7 )
|
||||
action = "pause"
|
||||
text = "enter"
|
||||
|
||||
[node name="Desc" type="Label" parent="Node2D/X"]
|
||||
margin_left = 34.0
|
||||
margin_top = 1.0
|
||||
margin_right = 64.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 8 )
|
||||
text = "pause"
|
||||
|
||||
[editable path="GameCamera"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=23 format=2]
|
||||
[gd_scene load_steps=22 format=2]
|
||||
|
||||
[ext_resource path="res://src/stage/SolidTileMap.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/actor/Box.tscn" type="PackedScene" id=2]
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
[ext_resource path="res://src/stage/SpikeTileMap.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://src/actor/Player.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://src/stage/Stage.gd" type="Script" id=8]
|
||||
[ext_resource path="res://media/font/ExpressionPro.ttf" type="DynamicFontData" id=9]
|
||||
[ext_resource path="res://media/font/NicoPaint-Regular.ttf" type="DynamicFontData" id=10]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=9]
|
||||
[ext_resource path="res://src/menu/options/Key.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://src/menu/hide_on_level_select.gd" type="Script" id=11]
|
||||
[ext_resource path="res://src/stage/ObscureMap.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://src/actor/Note.tscn" type="PackedScene" id=13]
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
6/name = "crate_tiles.png 6"
|
||||
6/texture = ExtResource( 14 )
|
||||
6/tex_offset = Vector2( 0, 0 )
|
||||
6/modulate = Color( 0.670588, 0.321569, 0.211765, 1 )
|
||||
6/modulate = Color( 0.678431, 0, 0.156863, 1 )
|
||||
6/region = Rect2( 0, 24, 8, 8 )
|
||||
6/tile_mode = 0
|
||||
6/occluder_offset = Vector2( 0, 0 )
|
||||
|
|
@ -150,15 +150,12 @@
|
|||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
[sub_resource type="DynamicFont" id=8]
|
||||
size = 5
|
||||
outline_size = 1
|
||||
outline_color = Color( 0, 0, 0, 1 )
|
||||
extra_spacing_bottom = -4
|
||||
font_data = ExtResource( 10 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
extra_spacing_top = -3
|
||||
extra_spacing_bottom = -3
|
||||
extra_spacing_top = -1
|
||||
extra_spacing_bottom = -1
|
||||
font_data = ExtResource( 9 )
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
|
|
@ -204,25 +201,23 @@ position = Vector2( 91, -45 )
|
|||
position = Vector2( -76, 42 )
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="Key" type="Label" parent="Node2D"]
|
||||
modulate = Color( 1, 0, 0.301961, 1 )
|
||||
margin_left = -6.0
|
||||
margin_top = -6.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "c"
|
||||
uppercase = true
|
||||
[node name="X" type="HBoxContainer" parent="Node2D"]
|
||||
margin_left = -3.0
|
||||
margin_top = -3.0
|
||||
margin_right = 37.0
|
||||
margin_bottom = 4.0
|
||||
custom_constants/separation = 3
|
||||
|
||||
[node name="Label" type="Label" parent="Node2D"]
|
||||
margin_left = 13.0
|
||||
margin_top = -4.0
|
||||
margin_right = 45.0
|
||||
margin_bottom = 9.0
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
[node name="Key" parent="Node2D/X" instance=ExtResource( 10 )]
|
||||
action = "action"
|
||||
text = "c"
|
||||
|
||||
[node name="Desc" type="Label" parent="Node2D/X"]
|
||||
margin_left = 10.0
|
||||
margin_top = 1.0
|
||||
margin_right = 34.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 8 )
|
||||
text = "lift"
|
||||
uppercase = true
|
||||
|
||||
[editable path="GameCamera"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
extends Node2D
|
||||
extends CanvasItem
|
||||
|
||||
onready var fill = $Box/Fill
|
||||
var is_selected = false
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export var text := "key" setget set_text
|
|||
onready var white := $White
|
||||
onready var black := $Black
|
||||
onready var label := $Label
|
||||
onready var sprite := $Sprite
|
||||
|
||||
var is_gamepad := false
|
||||
|
||||
|
|
@ -28,29 +29,51 @@ var swap := {"control" : "ctrl",
|
|||
"delete" : "del",
|
||||
"pageup" : "pgup",
|
||||
"pagedown" : "pgdn",
|
||||
"scrolllock" : "scrlk",
|
||||
}
|
||||
|
||||
var images := {"up" : 0,
|
||||
"down" : 1,
|
||||
"left" : 2,
|
||||
"right" : 3,
|
||||
"," : 4}
|
||||
|
||||
export var font_width := 6
|
||||
|
||||
func _ready():
|
||||
set_action()
|
||||
set_text()
|
||||
if Engine.editor_hint: return
|
||||
|
||||
func set_text(arg := text):
|
||||
text = arg
|
||||
var l = text.length() * font_width
|
||||
text = arg.to_lower()
|
||||
var frame = -1
|
||||
|
||||
rect_min_size = Vector2(l + 3, 9)
|
||||
rect_size = rect_min_size
|
||||
if swap.has(text):
|
||||
text = swap[text]
|
||||
|
||||
if images.has(text):
|
||||
frame = images[text]
|
||||
|
||||
var l = (text.length() if frame < 0 else 1) * font_width
|
||||
|
||||
var out_size = Vector2(l + 3, 9)
|
||||
var in_size = Vector2(l + 1, 7)
|
||||
rect_min_size = in_size
|
||||
rect_size = in_size
|
||||
|
||||
if is_instance_valid(sprite):
|
||||
sprite.visible = frame > -1
|
||||
sprite.frame = max(0, frame)
|
||||
|
||||
if is_instance_valid(label):
|
||||
label.text = text
|
||||
label.visible = frame < 0
|
||||
label.text = text if frame < 0 else ""
|
||||
label.rect_size = Vector2.ONE
|
||||
if is_instance_valid(white):
|
||||
white.rect_size = in_size
|
||||
if is_instance_valid(black):
|
||||
black.rect_size = rect_min_size
|
||||
black.rect_size = out_size
|
||||
|
||||
update()
|
||||
|
||||
|
|
@ -78,10 +101,5 @@ func is_type(event):
|
|||
return test
|
||||
|
||||
func parse_event(event : InputEvent):
|
||||
var s = str(event.as_text().to_lower())
|
||||
|
||||
if swap.has(s):
|
||||
s = swap[s]
|
||||
|
||||
self.text = s
|
||||
self.text = str(event.as_text())
|
||||
update()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://src/menu/options/Key.gd" type="Script" id=2]
|
||||
[ext_resource path="res://media/image/keymap.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 5
|
||||
|
|
@ -11,29 +12,39 @@ extra_spacing_bottom = -1
|
|||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Key" type="Control"]
|
||||
margin_right = 21.0
|
||||
margin_bottom = 9.0
|
||||
rect_min_size = Vector2( 21, 9 )
|
||||
margin_right = 7.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 7, 7 )
|
||||
size_flags_vertical = 4
|
||||
script = ExtResource( 2 )
|
||||
action = "jump"
|
||||
text = "f"
|
||||
|
||||
[node name="Black" type="ColorRect" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
margin_right = 21.0
|
||||
margin_bottom = 9.0
|
||||
margin_left = -1.0
|
||||
margin_top = -1.0
|
||||
margin_right = 6.0
|
||||
margin_bottom = 6.0
|
||||
|
||||
[node name="White" type="ColorRect" parent="."]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 8.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 7.0
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
margin_left = 2.0
|
||||
margin_top = 2.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 7.0
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 2.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "key"
|
||||
text = "f"
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
visible = false
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
position = Vector2( 4, 4 )
|
||||
texture = ExtResource( 3 )
|
||||
hframes = 4
|
||||
vframes = 4
|
||||
frame = 4
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ func select_item(arg := 0):
|
|||
menu_items[cursor].deselect()
|
||||
|
||||
cursor = clamp(arg, 0, menu_items.size() - 1)
|
||||
node_cursor.rect_position.y = menu_items[cursor].position.y - 2
|
||||
node_cursor.rect_global_position = menu_items[cursor].rect_global_position - Vector2(2, 2)
|
||||
node_cursor.rect_size = menu_items[cursor].rect_size + Vector2(4, 4)
|
||||
|
||||
if menu_items[cursor].has_method("select"):
|
||||
menu_items[cursor].select()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://src/menu/options/OptionsMenu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://src/menu/options/Volume.tscn" type="PackedScene" id=2]
|
||||
|
|
@ -6,12 +6,9 @@
|
|||
[ext_resource path="res://media/audio/sfx/btn0.wav" type="AudioStream" id=5]
|
||||
[ext_resource path="res://media/font/m6x11.ttf" type="DynamicFontData" id=8]
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=9]
|
||||
[ext_resource path="res://media/image/9slice.png" type="Texture" id=13]
|
||||
[ext_resource path="res://src/menu/options/Fullscreen.gd" type="Script" id=20]
|
||||
[ext_resource path="res://src/menu/options/WindowSize.gd" type="Script" id=21]
|
||||
[ext_resource path="res://src/menu/options/Touch.gd" type="Script" id=22]
|
||||
[ext_resource path="res://src/menu/options/Delete.gd" type="Script" id=23]
|
||||
[ext_resource path="res://src/menu/options/Unlock.gd" type="Script" id=24]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
extra_spacing_bottom = -1
|
||||
|
|
@ -31,7 +28,7 @@ margin_bottom = 128.0
|
|||
rect_min_size = Vector2( 228, 128 )
|
||||
|
||||
[node name="Cursor" type="ColorRect" parent="Center/Control"]
|
||||
modulate = Color( 1, 0, 0.301961, 1 )
|
||||
modulate = Color( 0, 0, 1, 1 )
|
||||
margin_left = 56.0
|
||||
margin_top = 23.0
|
||||
margin_right = 200.0
|
||||
|
|
@ -49,105 +46,112 @@ custom_constants/shadow_as_outline = 1
|
|||
custom_fonts/font = SubResource( 1 )
|
||||
text = "OPTIONS"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="Center/Control"]
|
||||
visible = false
|
||||
show_behind_parent = true
|
||||
margin_left = 51.0
|
||||
margin_top = 18.0
|
||||
margin_right = 201.0
|
||||
margin_bottom = 108.0
|
||||
rect_min_size = Vector2( 24, 24 )
|
||||
texture = ExtResource( 13 )
|
||||
patch_margin_left = 8
|
||||
patch_margin_top = 8
|
||||
patch_margin_right = 8
|
||||
patch_margin_bottom = 8
|
||||
axis_stretch_horizontal = 1
|
||||
axis_stretch_vertical = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="MenuItems" type="Node2D" parent="Center/Control"]
|
||||
position = Vector2( 14, 0 )
|
||||
z_index = 20
|
||||
z_as_relative = false
|
||||
[node name="MenuItems" type="VBoxContainer" parent="Center/Control"]
|
||||
margin_left = 72.0
|
||||
margin_top = 40.0
|
||||
margin_right = 188.0
|
||||
margin_bottom = 100.0
|
||||
|
||||
[node name="Sounds" parent="Center/Control/MenuItems" instance=ExtResource( 2 )]
|
||||
margin_right = 116.0
|
||||
|
||||
[node name="Music" parent="Center/Control/MenuItems" instance=ExtResource( 2 )]
|
||||
position = Vector2( 50, 49 )
|
||||
margin_top = 12.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 20.0
|
||||
bus = 2
|
||||
|
||||
[node name="Label" parent="Center/Control/MenuItems/Music" index="0"]
|
||||
margin_right = 20.0
|
||||
text = "Music"
|
||||
|
||||
[node name="AudioStreamPlayer" parent="Center/Control/MenuItems/Music" index="3"]
|
||||
[node name="Spacer" parent="Center/Control/MenuItems/Music" index="1"]
|
||||
margin_left = 22.0
|
||||
margin_right = 65.0
|
||||
|
||||
[node name="Arrow" parent="Center/Control/MenuItems/Music" index="2"]
|
||||
margin_left = 67.0
|
||||
margin_right = 70.0
|
||||
|
||||
[node name="Meter" parent="Center/Control/MenuItems/Music" index="3"]
|
||||
margin_left = 72.0
|
||||
margin_right = 111.0
|
||||
|
||||
[node name="Arrow2" parent="Center/Control/MenuItems/Music" index="4"]
|
||||
margin_left = 113.0
|
||||
margin_right = 116.0
|
||||
|
||||
[node name="AudioStreamPlayer" parent="Center/Control/MenuItems/Music" index="5"]
|
||||
stream = ExtResource( 5 )
|
||||
bus = "Music"
|
||||
|
||||
[node name="Fullscreen" type="Node2D" parent="Center/Control/MenuItems"]
|
||||
position = Vector2( 50, 61 )
|
||||
[node name="Fullscreen" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 24.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 32.0
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/Fullscreen"]
|
||||
margin_top = 1.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 9.0
|
||||
margin_right = 38.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "Fullscreen"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/Fullscreen"]
|
||||
margin_left = 42.0
|
||||
margin_right = 92.0
|
||||
margin_bottom = 8.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Box" type="ColorRect" parent="Center/Control/MenuItems/Fullscreen"]
|
||||
margin_left = 99.0
|
||||
margin_top = -1.0
|
||||
margin_right = 109.0
|
||||
margin_bottom = 9.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
margin_left = 96.0
|
||||
margin_right = 104.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 8, 8 )
|
||||
|
||||
[node name="Back" type="ColorRect" parent="Center/Control/MenuItems/Fullscreen/Box"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 9.0
|
||||
margin_bottom = 9.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 7.0
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
|
||||
[node name="Fill" type="ColorRect" parent="Center/Control/MenuItems/Fullscreen/Box"]
|
||||
margin_left = 2.0
|
||||
margin_top = 2.0
|
||||
margin_right = 8.0
|
||||
margin_bottom = 8.0
|
||||
margin_right = 6.0
|
||||
margin_bottom = 6.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="WindowSize" type="Node2D" parent="Center/Control/MenuItems"]
|
||||
position = Vector2( 50, 73 )
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/MenuItems/Fullscreen"]
|
||||
margin_left = 108.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 8, 0 )
|
||||
|
||||
[node name="WindowSize" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 36.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 44.0
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_top = 1.0
|
||||
margin_right = 50.0
|
||||
margin_bottom = 9.0
|
||||
margin_right = 45.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "Window Size"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Scale" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_left = 48.0
|
||||
margin_top = 1.0
|
||||
margin_right = 80.0
|
||||
margin_bottom = 9.0
|
||||
margin_left = 49.0
|
||||
margin_right = 74.0
|
||||
margin_bottom = 8.0
|
||||
size_flags_horizontal = 3
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "1x"
|
||||
align = 1
|
||||
|
|
@ -156,78 +160,57 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="Resolution" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_left = 72.0
|
||||
margin_top = 1.0
|
||||
margin_right = 136.0
|
||||
margin_bottom = 9.0
|
||||
margin_left = 78.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "228 x 128"
|
||||
align = 1
|
||||
|
||||
[node name="TouchControls" type="Node2D" parent="Center/Control/MenuItems"]
|
||||
position = Vector2( 50, 85 )
|
||||
[node name="TouchControls" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 48.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 56.0
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/TouchControls"]
|
||||
margin_top = 1.0
|
||||
margin_right = 56.0
|
||||
margin_bottom = 9.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "Touch Controls"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/TouchControls"]
|
||||
margin_left = 60.0
|
||||
margin_right = 92.0
|
||||
margin_bottom = 8.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Box" type="ColorRect" parent="Center/Control/MenuItems/TouchControls"]
|
||||
margin_left = 99.0
|
||||
margin_top = -1.0
|
||||
margin_right = 109.0
|
||||
margin_bottom = 9.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
margin_left = 96.0
|
||||
margin_right = 104.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 8, 8 )
|
||||
|
||||
[node name="Back" type="ColorRect" parent="Center/Control/MenuItems/TouchControls/Box"]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 9.0
|
||||
margin_bottom = 9.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 7.0
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Fill" type="ColorRect" parent="Center/Control/MenuItems/TouchControls/Box"]
|
||||
margin_left = 2.0
|
||||
margin_top = 2.0
|
||||
margin_right = 8.0
|
||||
margin_bottom = 8.0
|
||||
margin_right = 6.0
|
||||
margin_bottom = 6.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="DeleteSaveData" type="Node2D" parent="Center/Control/MenuItems"]
|
||||
position = Vector2( 50, 97 )
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/DeleteSaveData"]
|
||||
margin_top = 1.0
|
||||
margin_right = 128.0
|
||||
margin_bottom = 9.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "Delete Save Data"
|
||||
align = 1
|
||||
|
||||
[node name="UnlockAll" type="Node2D" parent="Center/Control/MenuItems"]
|
||||
position = Vector2( 50, 109 )
|
||||
script = ExtResource( 24 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/UnlockAll"]
|
||||
margin_top = 1.0
|
||||
margin_right = 128.0
|
||||
margin_bottom = 9.0
|
||||
custom_fonts/font = ExtResource( 9 )
|
||||
text = "Unlock All"
|
||||
align = 1
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/MenuItems/TouchControls"]
|
||||
margin_left = 108.0
|
||||
margin_right = 116.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 8, 0 )
|
||||
|
||||
[editable path="Center/Control/MenuItems/Music"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
extends Node2D
|
||||
extends CanvasItem
|
||||
|
||||
onready var fill = $Box/Fill
|
||||
var is_selected = false
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
extends Node2D
|
||||
extends CanvasItem
|
||||
|
||||
export var bus := 1
|
||||
|
||||
onready var arrows := $Arrows
|
||||
onready var arrows := [$Arrow/Sprite, $Arrow2/Sprite]
|
||||
onready var audio := $AudioStreamPlayer
|
||||
onready var meter := $Meter
|
||||
onready var meter := $Meter.get_children()
|
||||
onready var label := $Label
|
||||
|
||||
export var col_on := Color("00e436")
|
||||
|
|
@ -15,10 +15,12 @@ func _ready():
|
|||
audio.bus = AudioServer.get_bus_name(bus)
|
||||
|
||||
func select():
|
||||
arrows.visible = true
|
||||
for i in arrows:
|
||||
i.visible = true
|
||||
|
||||
func deselect():
|
||||
arrows.visible = false
|
||||
for i in arrows:
|
||||
i.visible = false
|
||||
|
||||
func scroll(arg = 1):
|
||||
Shared.set_bus_volume(bus, Shared.bus_volume[bus] + arg)
|
||||
|
|
@ -27,6 +29,5 @@ func scroll(arg = 1):
|
|||
audio.play()
|
||||
|
||||
func set_color():
|
||||
var m = meter.get_children()
|
||||
for i in 10: # 0 - 9
|
||||
m[i].color = col_on if i < Shared.bus_volume[bus] else col_off
|
||||
meter[i].color = col_on if i < Shared.bus_volume[bus] else col_off
|
||||
|
|
|
|||
|
|
@ -5,32 +5,51 @@
|
|||
[ext_resource path="res://src/menu/options/Volume.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/font/m3x6.tres" type="DynamicFont" id=4]
|
||||
|
||||
[node name="Volume" type="Node2D"]
|
||||
position = Vector2( 50, 37 )
|
||||
[node name="Volume" type="HBoxContainer"]
|
||||
margin_right = 112.0
|
||||
margin_bottom = 8.0
|
||||
custom_constants/separation = 2
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_top = 1.0
|
||||
margin_right = 42.0
|
||||
margin_bottom = 9.0
|
||||
margin_right = 24.0
|
||||
margin_bottom = 8.0
|
||||
custom_fonts/font = ExtResource( 4 )
|
||||
text = "Sounds"
|
||||
|
||||
[node name="Meter" type="Node2D" parent="."]
|
||||
position = Vector2( 89, 0 )
|
||||
[node name="Spacer" type="Control" parent="."]
|
||||
margin_left = 26.0
|
||||
margin_right = 61.0
|
||||
margin_bottom = 8.0
|
||||
size_flags_horizontal = 11
|
||||
|
||||
[node name="Arrow" type="Control" parent="."]
|
||||
margin_left = 63.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Arrow"]
|
||||
position = Vector2( 2, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="Meter" type="HBoxContainer" parent="."]
|
||||
margin_left = 68.0
|
||||
margin_right = 107.0
|
||||
margin_bottom = 8.0
|
||||
custom_constants/separation = 1
|
||||
|
||||
[node name="1" type="ColorRect" parent="Meter"]
|
||||
margin_right = 3.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="2" type="ColorRect" parent="Meter"]
|
||||
margin_left = 4.0
|
||||
margin_right = 7.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -40,6 +59,7 @@ __meta__ = {
|
|||
margin_left = 8.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -49,6 +69,7 @@ __meta__ = {
|
|||
margin_left = 12.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -58,6 +79,7 @@ __meta__ = {
|
|||
margin_left = 16.0
|
||||
margin_right = 19.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -67,6 +89,7 @@ __meta__ = {
|
|||
margin_left = 20.0
|
||||
margin_right = 23.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -76,6 +99,7 @@ __meta__ = {
|
|||
margin_left = 24.0
|
||||
margin_right = 27.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -85,6 +109,7 @@ __meta__ = {
|
|||
margin_left = 28.0
|
||||
margin_right = 31.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -94,6 +119,7 @@ __meta__ = {
|
|||
margin_left = 32.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -103,21 +129,20 @@ __meta__ = {
|
|||
margin_left = 36.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Arrows" type="Node2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2( 89, 0 )
|
||||
[node name="Arrow2" type="Control" parent="."]
|
||||
margin_left = 109.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="tinyArrow" type="Sprite" parent="Arrows"]
|
||||
position = Vector2( -2, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="tinyArrow2" type="Sprite" parent="Arrows"]
|
||||
position = Vector2( 41, 4 )
|
||||
[node name="Sprite" type="Sprite" parent="Arrow2"]
|
||||
position = Vector2( 1, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
flip_h = true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
extends Node2D
|
||||
extends CanvasItem
|
||||
|
||||
onready var label_scale := $Scale
|
||||
onready var label_res := $Resolution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue