mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
background darkness option (:
This commit is contained in:
parent
5fface5eb1
commit
248ae6efe6
6 changed files with 199 additions and 112 deletions
|
|
@ -80,6 +80,8 @@ var time_elapsed := 0
|
|||
var auto_save_clock := 0
|
||||
var auto_save_time := 1800
|
||||
var window_option := 0 setget set_window_option
|
||||
var background_option := 10 setget set_background_option
|
||||
signal background_signal
|
||||
|
||||
func _ready():
|
||||
print("Shared._ready(): ")
|
||||
|
|
@ -321,6 +323,10 @@ func set_window_option(arg := window_option):
|
|||
OS.set_window_position(Vector2.ZERO if window_option == 2 else (OS.get_screen_size() * 0.5 - OS.get_window_size() * 0.5))
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE if window_option < 3 else Input.MOUSE_MODE_HIDDEN
|
||||
|
||||
func set_background_option(arg := background_option):
|
||||
background_option = clamp(arg, 0, 10)
|
||||
emit_signal("background_signal")
|
||||
|
||||
func save_options(path := options_path):
|
||||
var data = {}
|
||||
data["sfx"] = bus_volume[1]
|
||||
|
|
@ -330,6 +336,7 @@ func save_options(path := options_path):
|
|||
data["view"] = int(window_option)
|
||||
var ws = OS.window_size
|
||||
data["size"] = str(ws.x) + "," + str(ws.y)
|
||||
data["back"] = int(background_option)
|
||||
data["time"] = time_elapsed
|
||||
|
||||
print("save_options, path: ", path, " time: ", time_elapsed)
|
||||
|
|
@ -360,6 +367,8 @@ func load_options(path := options_path):
|
|||
if ws.size() == 2:
|
||||
OS.window_size = Vector2(float(ws[0]), float(ws[1]))
|
||||
set_window_option()
|
||||
if dict.has("back"):
|
||||
self.background_option = int(dict["back"])
|
||||
if dict.has("time"):
|
||||
time_elapsed = abs(int(dict["time"]))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=14 format=2]
|
||||
[gd_scene load_steps=16 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]
|
||||
|
|
@ -7,7 +7,9 @@
|
|||
[ext_resource path="res://media/audio/sfx/btn0.wav" type="AudioStream" id=5]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=6]
|
||||
[ext_resource path="res://media/font/ThaleahFat.ttf" type="DynamicFontData" id=7]
|
||||
[ext_resource path="res://media/image/tinyArrow5.png" type="Texture" id=8]
|
||||
[ext_resource path="res://media/image/tinyArrow.png" type="Texture" id=9]
|
||||
[ext_resource path="res://src/menu/options/detail.gd" type="Script" id=10]
|
||||
[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]
|
||||
|
|
@ -30,9 +32,9 @@ pause_mode = 2
|
|||
layer = 30
|
||||
script = ExtResource( 1 )
|
||||
parent_path = NodePath(".")
|
||||
list_path = NodePath("Center/Control/CenterContainer/MenuItems")
|
||||
list_path = NodePath("Center/Control/MenuItems")
|
||||
cursor_path = NodePath("Center/Control/Cursor")
|
||||
cursor_expand = Vector2( 4, 4 )
|
||||
cursor_expand = Vector2( 4, 2 )
|
||||
is_audio_scroll = true
|
||||
is_audio_back = true
|
||||
is_close_btn_no = true
|
||||
|
|
@ -63,21 +65,19 @@ margin_bottom = 35.0
|
|||
script = ExtResource( 4 )
|
||||
color_blink = PoolColorArray( 0, 0, 1, 1, 0, 0.482353, 1, 1 )
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="Center/Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="MenuItems" type="VBoxContainer" parent="Center/Control/CenterContainer"]
|
||||
[node name="MenuItems" type="VBoxContainer" parent="Center/Control"]
|
||||
margin_left = 53.0
|
||||
margin_top = 11.0
|
||||
margin_top = 10.0
|
||||
margin_right = 175.0
|
||||
margin_bottom = 116.0
|
||||
margin_bottom = 110.0
|
||||
rect_min_size = Vector2( 122, 0 )
|
||||
custom_constants/separation = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Header" type="Label" parent="Center/Control/CenterContainer/MenuItems" groups=["no_item"]]
|
||||
[node name="Header" type="Label" parent="Center/Control/MenuItems" groups=["no_item"]]
|
||||
margin_top = 4.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 12.0
|
||||
margin_bottom = 16.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
|
|
@ -85,103 +85,105 @@ custom_fonts/font = SubResource( 4 )
|
|||
text = "OPTIONS"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems"]
|
||||
margin_top = 16.0
|
||||
[node name="Keyboard" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 18.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 24.0
|
||||
rect_min_size = Vector2( 0, 8 )
|
||||
margin_bottom = 25.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/CenterContainer/MenuItems/Keyboard"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/Keyboard"]
|
||||
margin_top = 1.0
|
||||
margin_right = 84.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "Keyboard Setup"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/CenterContainer/MenuItems/Keyboard"]
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/Keyboard"]
|
||||
margin_left = 88.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/CenterContainer/MenuItems/Keyboard"]
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/MenuItems/Keyboard"]
|
||||
margin_left = 114.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 8, 0 )
|
||||
|
||||
[node name="Gamepad" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems"]
|
||||
margin_top = 28.0
|
||||
[node name="Gamepad" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 27.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 36.0
|
||||
rect_min_size = Vector2( 0, 8 )
|
||||
margin_bottom = 34.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
script = ExtResource( 3 )
|
||||
is_gamepad = true
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/CenterContainer/MenuItems/Gamepad"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/Gamepad"]
|
||||
margin_top = 1.0
|
||||
margin_right = 78.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "gamepad Setup"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/CenterContainer/MenuItems/Gamepad"]
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/Gamepad"]
|
||||
margin_left = 82.0
|
||||
margin_right = 110.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/CenterContainer/MenuItems/Gamepad"]
|
||||
[node name="Spacer2" type="Control" parent="Center/Control/MenuItems/Gamepad"]
|
||||
margin_left = 114.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 8, 0 )
|
||||
|
||||
[node name="Sounds" parent="Center/Control/CenterContainer/MenuItems" instance=ExtResource( 2 )]
|
||||
margin_top = 40.0
|
||||
[node name="Sounds" parent="Center/Control/MenuItems" instance=ExtResource( 2 )]
|
||||
margin_top = 36.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 48.0
|
||||
margin_bottom = 43.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
|
||||
[node name="Music" parent="Center/Control/CenterContainer/MenuItems" instance=ExtResource( 2 )]
|
||||
margin_top = 52.0
|
||||
[node name="Music" parent="Center/Control/MenuItems" instance=ExtResource( 2 )]
|
||||
margin_top = 45.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 60.0
|
||||
margin_bottom = 52.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
bus = 2
|
||||
|
||||
[node name="Label" parent="Center/Control/CenterContainer/MenuItems/Music" index="0"]
|
||||
[node name="Label" parent="Center/Control/MenuItems/Music" index="0"]
|
||||
margin_right = 30.0
|
||||
text = "Music"
|
||||
|
||||
[node name="Spacer" parent="Center/Control/CenterContainer/MenuItems/Music" index="1"]
|
||||
[node name="Spacer" parent="Center/Control/MenuItems/Music" index="1"]
|
||||
margin_left = 32.0
|
||||
margin_right = 71.0
|
||||
|
||||
[node name="Arrow" parent="Center/Control/CenterContainer/MenuItems/Music" index="2"]
|
||||
[node name="Arrow" parent="Center/Control/MenuItems/Music" index="2"]
|
||||
margin_left = 73.0
|
||||
margin_right = 76.0
|
||||
|
||||
[node name="Meter" parent="Center/Control/CenterContainer/MenuItems/Music" index="3"]
|
||||
[node name="Meter" parent="Center/Control/MenuItems/Music" index="3"]
|
||||
margin_left = 78.0
|
||||
margin_right = 117.0
|
||||
|
||||
[node name="Arrow2" parent="Center/Control/CenterContainer/MenuItems/Music" index="4"]
|
||||
[node name="Arrow2" parent="Center/Control/MenuItems/Music" index="4"]
|
||||
margin_left = 119.0
|
||||
margin_right = 122.0
|
||||
|
||||
[node name="AudioStreamPlayer" parent="Center/Control/CenterContainer/MenuItems/Music" index="5"]
|
||||
[node name="AudioStreamPlayer" parent="Center/Control/MenuItems/Music" index="5"]
|
||||
stream = ExtResource( 5 )
|
||||
bus = "Music"
|
||||
|
||||
[node name="View" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems"]
|
||||
margin_top = 64.0
|
||||
[node name="View" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 54.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 72.0
|
||||
rect_min_size = Vector2( 116, 8 )
|
||||
margin_bottom = 61.0
|
||||
rect_min_size = Vector2( 116, 7 )
|
||||
custom_constants/separation = 2
|
||||
script = ExtResource( 20 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/CenterContainer/MenuItems/View"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/View"]
|
||||
margin_top = 1.0
|
||||
margin_right = 24.0
|
||||
margin_bottom = 6.0
|
||||
|
|
@ -191,23 +193,23 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/CenterContainer/MenuItems/View"]
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/View"]
|
||||
margin_left = 26.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Arrow" type="Control" parent="Center/Control/CenterContainer/MenuItems/View"]
|
||||
[node name="Arrow" type="Control" parent="Center/Control/MenuItems/View"]
|
||||
margin_left = 28.0
|
||||
margin_right = 31.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/CenterContainer/MenuItems/View/Arrow"]
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/View/Arrow"]
|
||||
position = Vector2( 2, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
texture = ExtResource( 8 )
|
||||
|
||||
[node name="Label2" type="Label" parent="Center/Control/CenterContainer/MenuItems/View"]
|
||||
[node name="Label2" type="Label" parent="Center/Control/MenuItems/View"]
|
||||
margin_left = 33.0
|
||||
margin_top = 1.0
|
||||
margin_right = 117.0
|
||||
|
|
@ -218,32 +220,32 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Arrow2" type="Control" parent="Center/Control/CenterContainer/MenuItems/View"]
|
||||
[node name="Arrow2" type="Control" parent="Center/Control/MenuItems/View"]
|
||||
margin_left = 119.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/CenterContainer/MenuItems/View/Arrow2"]
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/View/Arrow2"]
|
||||
position = Vector2( 1, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
texture = ExtResource( 8 )
|
||||
flip_h = true
|
||||
|
||||
[node name="WindowSize" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems"]
|
||||
margin_top = 76.0
|
||||
[node name="WindowSize" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 63.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 84.0
|
||||
rect_min_size = Vector2( 0, 8 )
|
||||
margin_bottom = 70.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
script = ExtResource( 21 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/CenterContainer/MenuItems/WindowSize"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_top = 1.0
|
||||
margin_right = 24.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "Size"
|
||||
|
||||
[node name="Scale" type="Label" parent="Center/Control/CenterContainer/MenuItems/WindowSize"]
|
||||
[node name="Scale" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_left = 28.0
|
||||
margin_top = 1.0
|
||||
margin_right = 64.0
|
||||
|
|
@ -256,7 +258,7 @@ __meta__ = {
|
|||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Resolution" type="Label" parent="Center/Control/CenterContainer/MenuItems/WindowSize"]
|
||||
[node name="Resolution" type="Label" parent="Center/Control/MenuItems/WindowSize"]
|
||||
margin_left = 68.0
|
||||
margin_top = 1.0
|
||||
margin_right = 122.0
|
||||
|
|
@ -265,38 +267,38 @@ custom_fonts/font = SubResource( 2 )
|
|||
text = "228 x 128"
|
||||
align = 1
|
||||
|
||||
[node name="Touch" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems"]
|
||||
margin_top = 88.0
|
||||
[node name="Touch" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 72.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 96.0
|
||||
rect_min_size = Vector2( 0, 8 )
|
||||
margin_bottom = 79.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
custom_constants/separation = 2
|
||||
script = ExtResource( 22 )
|
||||
|
||||
[node name="Label" type="Label" parent="Center/Control/CenterContainer/MenuItems/Touch"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/Touch"]
|
||||
margin_top = 1.0
|
||||
margin_right = 72.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "Touch screen"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/CenterContainer/MenuItems/Touch"]
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/Touch"]
|
||||
margin_left = 74.0
|
||||
margin_right = 74.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Arrow" type="Control" parent="Center/Control/CenterContainer/MenuItems/Touch"]
|
||||
[node name="Arrow" type="Control" parent="Center/Control/MenuItems/Touch"]
|
||||
margin_left = 76.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/CenterContainer/MenuItems/Touch/Arrow"]
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/Touch/Arrow"]
|
||||
position = Vector2( 2, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
|
||||
[node name="Label2" type="Label" parent="Center/Control/CenterContainer/MenuItems/Touch"]
|
||||
[node name="Label2" type="Label" parent="Center/Control/MenuItems/Touch"]
|
||||
margin_left = 81.0
|
||||
margin_top = 1.0
|
||||
margin_right = 117.0
|
||||
|
|
@ -304,23 +306,73 @@ margin_bottom = 6.0
|
|||
custom_fonts/font = SubResource( 2 )
|
||||
text = "always"
|
||||
|
||||
[node name="Arrow2" type="Control" parent="Center/Control/CenterContainer/MenuItems/Touch"]
|
||||
[node name="Arrow2" type="Control" parent="Center/Control/MenuItems/Touch"]
|
||||
margin_left = 119.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/CenterContainer/MenuItems/Touch/Arrow2"]
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/Touch/Arrow2"]
|
||||
position = Vector2( 1, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
flip_h = true
|
||||
|
||||
[node name="Time" type="HBoxContainer" parent="Center/Control/CenterContainer/MenuItems" groups=["no_item"]]
|
||||
margin_top = 100.0
|
||||
[node name="Detail" type="HBoxContainer" parent="Center/Control/MenuItems"]
|
||||
margin_top = 81.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 105.0
|
||||
margin_bottom = 88.0
|
||||
rect_min_size = Vector2( 0, 7 )
|
||||
custom_constants/separation = 2
|
||||
script = ExtResource( 10 )
|
||||
|
||||
[node name="TimeLabel" type="Label" parent="Center/Control/CenterContainer/MenuItems/Time"]
|
||||
[node name="Label" type="Label" parent="Center/Control/MenuItems/Detail"]
|
||||
margin_top = 1.0
|
||||
margin_right = 60.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "background"
|
||||
|
||||
[node name="Spacer" type="Control" parent="Center/Control/MenuItems/Detail"]
|
||||
margin_left = 62.0
|
||||
margin_right = 86.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Arrow" type="Control" parent="Center/Control/MenuItems/Detail"]
|
||||
margin_left = 88.0
|
||||
margin_right = 91.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/Detail/Arrow"]
|
||||
position = Vector2( 2, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
|
||||
[node name="Label2" type="Label" parent="Center/Control/MenuItems/Detail"]
|
||||
margin_left = 93.0
|
||||
margin_top = 1.0
|
||||
margin_right = 117.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = SubResource( 2 )
|
||||
text = "full"
|
||||
|
||||
[node name="Arrow2" type="Control" parent="Center/Control/MenuItems/Detail"]
|
||||
margin_left = 119.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Center/Control/MenuItems/Detail/Arrow2"]
|
||||
position = Vector2( 1, 4 )
|
||||
texture = ExtResource( 9 )
|
||||
flip_h = true
|
||||
|
||||
[node name="Time" type="HBoxContainer" parent="Center/Control/MenuItems" groups=["no_item"]]
|
||||
margin_top = 90.0
|
||||
margin_right = 122.0
|
||||
margin_bottom = 95.0
|
||||
|
||||
[node name="TimeLabel" type="Label" parent="Center/Control/MenuItems/Time"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 122.0
|
||||
margin_bottom = 5.0
|
||||
|
|
@ -329,4 +381,4 @@ custom_fonts/font = SubResource( 2 )
|
|||
text = "01:23"
|
||||
align = 1
|
||||
|
||||
[editable path="Center/Control/CenterContainer/MenuItems/Music"]
|
||||
[editable path="Center/Control/MenuItems/Music"]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://media/image/tinyArrow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://media/audio/sfx/sfx14.wav" type="AudioStream" id=2]
|
||||
[ext_resource path="res://src/menu/options/Volume.gd" type="Script" id=3]
|
||||
[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=4]
|
||||
[ext_resource path="res://media/image/tinyArrow5.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="DynamicFont" id=2]
|
||||
size = 5
|
||||
|
|
@ -14,7 +14,7 @@ font_data = ExtResource( 4 )
|
|||
|
||||
[node name="Volume" type="HBoxContainer"]
|
||||
margin_right = 112.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
custom_constants/separation = 2
|
||||
script = ExtResource( 3 )
|
||||
|
||||
|
|
@ -28,36 +28,36 @@ text = "Sounds"
|
|||
[node name="Spacer" type="Control" parent="."]
|
||||
margin_left = 38.0
|
||||
margin_right = 61.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
size_flags_horizontal = 11
|
||||
|
||||
[node name="Arrow" type="Control" parent="."]
|
||||
margin_left = 63.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Arrow"]
|
||||
position = Vector2( 2, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
texture = ExtResource( 5 )
|
||||
|
||||
[node name="Meter" type="HBoxContainer" parent="."]
|
||||
margin_left = 68.0
|
||||
margin_right = 107.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.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 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
|
||||
[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 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -66,8 +66,8 @@ __meta__ = {
|
|||
[node name="3" type="ColorRect" parent="Meter"]
|
||||
margin_left = 8.0
|
||||
margin_right = 11.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -76,8 +76,8 @@ __meta__ = {
|
|||
[node name="4" type="ColorRect" parent="Meter"]
|
||||
margin_left = 12.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -86,8 +86,8 @@ __meta__ = {
|
|||
[node name="5" type="ColorRect" parent="Meter"]
|
||||
margin_left = 16.0
|
||||
margin_right = 19.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -96,8 +96,8 @@ __meta__ = {
|
|||
[node name="6" type="ColorRect" parent="Meter"]
|
||||
margin_left = 20.0
|
||||
margin_right = 23.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 0, 0.894118, 0.211765, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -106,8 +106,8 @@ __meta__ = {
|
|||
[node name="7" type="ColorRect" parent="Meter"]
|
||||
margin_left = 24.0
|
||||
margin_right = 27.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -116,8 +116,8 @@ __meta__ = {
|
|||
[node name="8" type="ColorRect" parent="Meter"]
|
||||
margin_left = 28.0
|
||||
margin_right = 31.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -126,8 +126,8 @@ __meta__ = {
|
|||
[node name="9" type="ColorRect" parent="Meter"]
|
||||
margin_left = 32.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -136,8 +136,8 @@ __meta__ = {
|
|||
[node name="10" type="ColorRect" parent="Meter"]
|
||||
margin_left = 36.0
|
||||
margin_right = 39.0
|
||||
margin_bottom = 8.0
|
||||
rect_min_size = Vector2( 3, 8 )
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 5 )
|
||||
color = Color( 1, 0, 0.301961, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
@ -146,12 +146,12 @@ __meta__ = {
|
|||
[node name="Arrow2" type="Control" parent="."]
|
||||
margin_left = 109.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 8.0
|
||||
margin_bottom = 7.0
|
||||
rect_min_size = Vector2( 3, 0 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Arrow2"]
|
||||
position = Vector2( 1, 4 )
|
||||
texture = ExtResource( 1 )
|
||||
texture = ExtResource( 5 )
|
||||
flip_h = true
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
|
|
|
|||
19
src/menu/options/detail.gd
Normal file
19
src/menu/options/detail.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends CanvasItem
|
||||
|
||||
onready var label := $Label2
|
||||
var text = ["full", "dark", "none"]
|
||||
|
||||
func _ready():
|
||||
yield(get_tree(), "idle_frame")
|
||||
text()
|
||||
|
||||
func scroll(arg := 1):
|
||||
Shared.background_option += arg
|
||||
text()
|
||||
Audio.play("menu_pause", 0.9, 1.1)
|
||||
|
||||
func text():
|
||||
label.text = str(int(Shared.background_option) * 10) + "%"
|
||||
|
||||
func act():
|
||||
scroll(1)
|
||||
|
|
@ -9,6 +9,9 @@ func _ready():
|
|||
tile_set = tile_set.duplicate()
|
||||
if Engine.is_editor_hint(): return
|
||||
|
||||
Shared.connect("background_signal", self, "background_signal")
|
||||
background_signal()
|
||||
|
||||
set_brick_color()
|
||||
set_grass_color()
|
||||
set_wood_color()
|
||||
|
|
@ -24,3 +27,7 @@ func set_grass_color(arg := grass_color):
|
|||
func set_wood_color(arg := wood_color):
|
||||
wood_color = arg
|
||||
tile_set.tile_set_modulate(6, wood_color)
|
||||
|
||||
func background_signal():
|
||||
var f = float(Shared.background_option)
|
||||
modulate = Color.black.linear_interpolate(Color.white, f / 10.0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue