action icons on control ui

This commit is contained in:
adrienmalin 2019-01-16 13:40:53 +01:00
parent 762dd1bdf1
commit 1916c80784
10 changed files with 81 additions and 233 deletions

View File

@ -229,7 +229,7 @@ extra_spacing_bottom = 5
font_data = ExtResource( 12 ) font_data = ExtResource( 12 )
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ] _sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
[node name="Main" type="WorldEnvironment" index="0"] [node name="Main" type="WorldEnvironment"]
environment = SubResource( 2 ) environment = SubResource( 2 )
script = ExtResource( 1 ) script = ExtResource( 1 )
@ -285,7 +285,7 @@ _sections_unfolded = [ "Transform" ]
[node name="DirectionalLight" type="DirectionalLight" parent="." index="2"] [node name="DirectionalLight" type="DirectionalLight" parent="." index="2"]
transform = Transform( -0.241094, 0.489231, -0.838169, 0.896995, 0.442041, 0, 0.370504, -0.751834, -0.545411, 5, 30, 0 ) transform = Transform( 0.332668, 0.771982, -0.541642, 0.579657, 0.285656, 0.763151, 0.743861, -0.567843, -0.352456, 5, 30, 0 )
layers = 1 layers = 1
light_color = Color( 1, 1, 1, 1 ) light_color = Color( 1, 1, 1, 1 )
light_energy = 3.0 light_energy = 3.0
@ -426,7 +426,7 @@ autostart = false
[node name="AutoShiftTimer" type="Timer" parent="." index="9"] [node name="AutoShiftTimer" type="Timer" parent="." index="9"]
process_mode = 1 process_mode = 1
wait_time = 0.02 wait_time = 0.03
one_shot = false one_shot = false
autostart = false autostart = false
@ -550,6 +550,8 @@ _sections_unfolded = [ "Margin", "custom_colors", "custom_fonts" ]
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"] [connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"] [connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"] [connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]

View File

@ -1,21 +1,18 @@
[gd_scene load_steps=6 format=2] [gd_scene load_steps=12 format=2]
[ext_resource path="res://controls.gd" type="Script" id=1] [ext_resource path="res://controls.gd" type="Script" id=1]
[ext_resource path="res://fonts/TitleFont.tres" type="DynamicFont" id=2] [ext_resource path="res://fonts/TitleFont.tres" type="DynamicFont" id=2]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=3] [ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=3]
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=4] [ext_resource path="res://icons/arrowLeft.png" type="Texture" id=4]
[ext_resource path="res://icons/arrowRight.png" type="Texture" id=5]
[ext_resource path="res://icons/clockwise.png" type="Texture" id=6]
[ext_resource path="res://icons/counterclockwise.png" type="Texture" id=7]
[ext_resource path="res://icons/arrowDown.png" type="Texture" id=8]
[ext_resource path="res://icons/harddrop.png" type="Texture" id=9]
[ext_resource path="res://icons/hold.png" type="Texture" id=10]
[ext_resource path="res://icons/pause.png" type="Texture" id=11]
[sub_resource type="DynamicFont" id=2] [node name="controls_ui" type="Control" index="0"]
size = 20
use_mipmaps = true
use_filter = false
extra_spacing_top = -4
extra_spacing_bottom = -4
font_data = ExtResource( 3 )
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
[node name="controls_ui" type="Control"]
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
@ -95,31 +92,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/move_left" index="0"] [node name="Button" type="Button" parent="bindings/move_left" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 69.0
margin_bottom = 29.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "move
left"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Rect", "custom_fonts" ]
[node name="Button" type="Button" parent="bindings/move_left" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -135,7 +108,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -144,6 +117,12 @@ flat = false
align = 1 align = 1
_sections_unfolded = [ "Rect" ] _sections_unfolded = [ "Rect" ]
[node name="arrowLeft" type="Sprite" parent="bindings/move_left" index="1"]
position = Vector2( 30, 20 )
scale = Vector2( 0.9, 0.9 )
texture = ExtResource( 4 )
[node name="move_right" type="Control" parent="bindings" index="1"] [node name="move_right" type="Control" parent="bindings" index="1"]
anchor_left = 0.0 anchor_left = 0.0
@ -161,32 +140,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/move_right" index="0"] [node name="Button" type="Button" parent="bindings/move_right" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 5.0
margin_top = -1.0
margin_right = 80.0
margin_bottom = 31.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "move
right"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/move_right" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -203,7 +157,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -211,15 +165,21 @@ group = null
flat = false flat = false
align = 1 align = 1
[node name="arrowRight" type="Sprite" parent="bindings/move_right" index="1"]
position = Vector2( 34, 19 )
texture = ExtResource( 5 )
_sections_unfolded = [ "Transform" ]
[node name="rotate_clockwise" type="Control" parent="bindings" index="2"] [node name="rotate_clockwise" type="Control" parent="bindings" index="2"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
anchor_right = 0.0 anchor_right = 0.0
anchor_bottom = 0.0 anchor_bottom = 0.0
margin_left = 50.0 margin_left = 230.0
margin_top = 100.0 margin_top = 100.0
margin_right = 90.0 margin_right = 270.0
margin_bottom = 140.0 margin_bottom = 140.0
rect_pivot_offset = Vector2( 0, 0 ) rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false rect_clip_content = false
@ -228,30 +188,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/rotate_clockwise" index="0"] [node name="Button" type="Button" parent="bindings/rotate_clockwise" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 118.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "rotate
clockwise"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/rotate_clockwise" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -267,7 +204,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -276,16 +213,21 @@ flat = false
align = 1 align = 1
_sections_unfolded = [ "custom_fonts" ] _sections_unfolded = [ "custom_fonts" ]
[node name="clockwise" type="Sprite" parent="bindings/rotate_clockwise" index="1"]
position = Vector2( 30, 15 )
texture = ExtResource( 6 )
[node name="rotate_counterclockwise" type="Control" parent="bindings" index="3"] [node name="rotate_counterclockwise" type="Control" parent="bindings" index="3"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
anchor_right = 0.0 anchor_right = 0.0
anchor_bottom = 0.0 anchor_bottom = 0.0
margin_left = 226.0 margin_left = 45.0
margin_top = 101.0 margin_top = 100.0
margin_right = 266.0 margin_right = 85.0
margin_bottom = 141.0 margin_bottom = 140.0
rect_pivot_offset = Vector2( 0, 0 ) rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false rect_clip_content = false
mouse_filter = 0 mouse_filter = 0
@ -293,33 +235,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/rotate_counterclockwise" index="0"] [node name="Button" type="Button" parent="bindings/rotate_counterclockwise" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 5.0
margin_top = -2.0
margin_right = 177.0
margin_bottom = 37.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "rotate
counter
clockwise"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/rotate_counterclockwise" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -336,7 +252,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -345,6 +261,11 @@ flat = false
align = 1 align = 1
_sections_unfolded = [ "Rect" ] _sections_unfolded = [ "Rect" ]
[node name="counterclockwise" type="Sprite" parent="bindings/rotate_counterclockwise" index="1"]
position = Vector2( 34, 14 )
texture = ExtResource( 7 )
[node name="soft_drop" type="Control" parent="bindings" index="4"] [node name="soft_drop" type="Control" parent="bindings" index="4"]
anchor_left = 0.0 anchor_left = 0.0
@ -362,30 +283,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/soft_drop" index="0"] [node name="Button" type="Button" parent="bindings/soft_drop" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 66.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "soft
drop"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/soft_drop" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -401,7 +299,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -409,6 +307,12 @@ group = null
flat = false flat = false
align = 1 align = 1
[node name="arrowDown" type="Sprite" parent="bindings/soft_drop" index="1"]
position = Vector2( 30, 20 )
texture = ExtResource( 8 )
_sections_unfolded = [ "Transform" ]
[node name="hard_drop" type="Control" parent="bindings" index="5"] [node name="hard_drop" type="Control" parent="bindings" index="5"]
anchor_left = 0.0 anchor_left = 0.0
@ -426,32 +330,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/hard_drop" index="0"] [node name="Button" type="Button" parent="bindings/hard_drop" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 5.0
margin_top = -1.0
margin_right = 75.0
margin_bottom = 31.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "hard
drop"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/hard_drop" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -468,7 +347,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -476,6 +355,11 @@ group = null
flat = false flat = false
align = 1 align = 1
[node name="harddrop" type="Sprite" parent="bindings/hard_drop" index="1"]
position = Vector2( 34, 19 )
texture = ExtResource( 9 )
[node name="hold" type="Control" parent="bindings" index="6"] [node name="hold" type="Control" parent="bindings" index="6"]
anchor_left = 0.0 anchor_left = 0.0
@ -493,29 +377,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/hold" index="0"] [node name="Button" type="Button" parent="bindings/hold" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 55.0
margin_bottom = 40.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "hold"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="Button" type="Button" parent="bindings/hold" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -531,7 +393,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -539,6 +401,11 @@ group = null
flat = false flat = false
align = 1 align = 1
[node name="hold" type="Sprite" parent="bindings/hold" index="1"]
position = Vector2( 30, 20 )
texture = ExtResource( 10 )
[node name="pause" type="Control" parent="bindings" index="7"] [node name="pause" type="Control" parent="bindings" index="7"]
anchor_left = 0.0 anchor_left = 0.0
@ -556,33 +423,7 @@ mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
[node name="Label" type="Label" parent="bindings/pause" index="0"] [node name="Button" type="Button" parent="bindings/pause" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 5.0
margin_top = 3.0
margin_right = 106.0
margin_bottom = 35.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 2
size_flags_vertical = 0
custom_fonts/font = SubResource( 2 )
custom_colors/font_color = Color( 0.752941, 0.921569, 0.988235, 1 )
text = "pause
resume"
valign = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_fonts" ]
[node name="Button" type="Button" parent="bindings/pause" index="1"]
anchor_left = 0.0 anchor_left = 0.0
anchor_top = 0.0 anchor_top = 0.0
@ -599,7 +440,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0 mouse_default_cursor_shape = 0
size_flags_horizontal = 2 size_flags_horizontal = 2
size_flags_vertical = 2 size_flags_vertical = 2
custom_fonts/font = ExtResource( 4 ) custom_fonts/font = ExtResource( 3 )
toggle_mode = false toggle_mode = false
enabled_focus_mode = 2 enabled_focus_mode = 2
shortcut = null shortcut = null
@ -607,4 +448,9 @@ group = null
flat = false flat = false
align = 1 align = 1
[node name="pause" type="Sprite" parent="bindings/pause" index="1"]
position = Vector2( 34, 19 )
texture = ExtResource( 11 )

BIN
source/icons/arrowDown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
source/icons/arrowLeft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
source/icons/arrowRight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
source/icons/clockwise.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
source/icons/harddrop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

BIN
source/icons/hold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

BIN
source/icons/pause.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB