generated from SGDA/GodotExampleProject
feat: base
This commit is contained in:
1
template/scenes/menus/main_menu/main_menu.gd
Normal file
1
template/scenes/menus/main_menu/main_menu.gd
Normal file
@ -0,0 +1 @@
|
||||
extends MainMenu
|
1
template/scenes/menus/main_menu/main_menu.gd.uid
Normal file
1
template/scenes/menus/main_menu/main_menu.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://cdr2s1004bt1i
|
11
template/scenes/menus/main_menu/main_menu.tscn
Normal file
11
template/scenes/menus/main_menu/main_menu.tscn
Normal file
@ -0,0 +1,11 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cd0m6j0ha1inn"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/main_menu/main_menu.tscn" id="1_wvjo8"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/main_menu/main_menu.gd" id="2_aha6c"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/master_options_menu_with_tabs.tscn" id="3_gh2py"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/credits/scrollable_credits.tscn" id="4_e2xrs"]
|
||||
|
||||
[node name="MainMenu" instance=ExtResource("1_wvjo8")]
|
||||
script = ExtResource("2_aha6c")
|
||||
options_packed_scene = ExtResource("3_gh2py")
|
||||
credits_packed_scene = ExtResource("4_e2xrs")
|
39
template/scenes/menus/main_menu/main_menu_with_animations.gd
Normal file
39
template/scenes/menus/main_menu/main_menu_with_animations.gd
Normal file
@ -0,0 +1,39 @@
|
||||
extends MainMenu
|
||||
|
||||
var animation_state_machine : AnimationNodeStateMachinePlayback
|
||||
|
||||
func intro_done() -> void:
|
||||
animation_state_machine.travel("OpenMainMenu")
|
||||
|
||||
func _is_in_intro() -> bool:
|
||||
return animation_state_machine.get_current_node() == "Intro"
|
||||
|
||||
func _event_is_mouse_button_released(event : InputEvent) -> bool:
|
||||
return event is InputEventMouseButton and not event.is_pressed()
|
||||
|
||||
func _event_skips_intro(event : InputEvent) -> bool:
|
||||
return event.is_action_released("ui_accept") or \
|
||||
event.is_action_released("ui_select") or \
|
||||
event.is_action_released("ui_cancel") or \
|
||||
_event_is_mouse_button_released(event)
|
||||
|
||||
func _open_sub_menu(menu : Node) -> void:
|
||||
super._open_sub_menu(menu)
|
||||
animation_state_machine.travel("OpenSubMenu")
|
||||
|
||||
func _close_sub_menu() -> void:
|
||||
super._close_sub_menu()
|
||||
animation_state_machine.travel("OpenMainMenu")
|
||||
|
||||
func _input(event : InputEvent) -> void:
|
||||
if _is_in_intro() and _event_skips_intro(event):
|
||||
intro_done()
|
||||
return
|
||||
super._input(event)
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
animation_state_machine = $MenuAnimationTree.get("parameters/playback")
|
||||
|
||||
func _on_continue_game_button_pressed() -> void:
|
||||
load_game_scene()
|
@ -0,0 +1 @@
|
||||
uid://b45edjepvx1qx
|
398
template/scenes/menus/main_menu/main_menu_with_animations.tscn
Normal file
398
template/scenes/menus/main_menu/main_menu_with_animations.tscn
Normal file
@ -0,0 +1,398 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://ck5glr84c7e25"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c6k5nnpbypshi" path="res://addons/maaacks_menus_template/base/scenes/menus/main_menu/main_menu.tscn" id="1_iaw2i"]
|
||||
[ext_resource type="Script" uid="uid://b45edjepvx1qx" path="res://template/scenes/menus/main_menu/main_menu_with_animations.gd" id="2_mcwxw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cuyyhte8hennl" path="res://template/scenes/menus/options_menu/master_options_menu_with_tabs.tscn" id="3_p7afn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b7v0tjak702f1" path="res://template/scenes/credits/scrollable_credits.tscn" id="4_tsej0"]
|
||||
|
||||
[sub_resource type="Animation" id="1"]
|
||||
resource_name = "Intro"
|
||||
length = 2.4
|
||||
tracks/0/type = "method"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(2.4),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"values": [{
|
||||
"args": [],
|
||||
"method": &"intro_done"
|
||||
}]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.8),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.8, 1.6),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0, 1.6, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("FlowControlContainer:mouse_filter")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 2]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0, 1.6, 2.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="6"]
|
||||
resource_name = "OpenMainMenu"
|
||||
length = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("FlowControlContainer/FlowControl/BackButton:visible")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("FlowControlContainer:mouse_filter")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [2]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("MenuContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer:lock")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="4"]
|
||||
resource_name = "OpenSubMenu"
|
||||
length = 0.2
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("FlowControlContainer/FlowControl/BackButton:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="2"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("FlowControlContainer/FlowControl/BackButton:visible")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("MenuContainer/TitleMargin/TitleContainer:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("MenuContainer/SubTitleMargin/SubTitleContainer:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer:modulate")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("FlowControlContainer:mouse_filter")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [2]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("MenuContainer:modulate")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("VersionMargin/VersionContainer:modulate")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer:lock")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_2kqig"]
|
||||
_data = {
|
||||
&"Intro": SubResource("1"),
|
||||
&"OpenMainMenu": SubResource("6"),
|
||||
&"OpenSubMenu": SubResource("4"),
|
||||
&"RESET": SubResource("2")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="7"]
|
||||
animation = &"Intro"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="10"]
|
||||
animation = &"OpenMainMenu"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="13"]
|
||||
animation = &"OpenSubMenu"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="11"]
|
||||
advance_condition = &"intro_done"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="14"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_j0orr"]
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_63dxc"]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_vikuh"]
|
||||
states/End/position = Vector2(958, 123)
|
||||
states/Intro/node = SubResource("7")
|
||||
states/Intro/position = Vector2(259, 123)
|
||||
states/OpenMainMenu/node = SubResource("10")
|
||||
states/OpenMainMenu/position = Vector2(472, 123)
|
||||
states/OpenSubMenu/node = SubResource("13")
|
||||
states/OpenSubMenu/position = Vector2(734, 123)
|
||||
states/Start/position = Vector2(82, 123)
|
||||
transitions = ["Intro", "OpenMainMenu", SubResource("11"), "OpenMainMenu", "OpenSubMenu", SubResource("14"), "Start", "Intro", SubResource("AnimationNodeStateMachineTransition_j0orr"), "OpenSubMenu", "OpenMainMenu", SubResource("AnimationNodeStateMachineTransition_63dxc")]
|
||||
graph_offset = Vector2(-180.277, 49)
|
||||
|
||||
[node name="MainMenu" instance=ExtResource("1_iaw2i")]
|
||||
script = ExtResource("2_mcwxw")
|
||||
game_scene_path = "uid://s1cx1gvt4bed"
|
||||
options_packed_scene = ExtResource("3_p7afn")
|
||||
credits_packed_scene = ExtResource("4_tsej0")
|
||||
|
||||
[node name="MenuAnimationPlayer" type="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_2kqig")
|
||||
}
|
||||
|
||||
[node name="MenuAnimationTree" type="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_vikuh")
|
||||
anim_player = NodePath("../MenuAnimationPlayer")
|
||||
parameters/conditions/intro_done = false
|
||||
|
||||
[node name="BackgroundMusicPlayer" parent="." index="3"]
|
||||
bus = &"Master"
|
||||
|
||||
[node name="VersionContainer" parent="VersionMargin" index="0"]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="TitleContainer" parent="MenuContainer/TitleMargin" index="0"]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="TitleLabel" parent="MenuContainer/TitleMargin/TitleContainer" index="0"]
|
||||
text = "Between the lines"
|
||||
|
||||
[node name="SubTitleContainer" parent="MenuContainer/SubTitleMargin" index="0"]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="SubTitleLabel" parent="MenuContainer/SubTitleMargin/SubTitleContainer" index="0"]
|
||||
text = "You better read"
|
||||
|
||||
[node name="MenuButtonsContainer" parent="MenuContainer/MenuButtonsMargin" index="0"]
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
|
||||
[node name="MenuButtonsBoxContainer" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer" index="0"]
|
||||
lock = true
|
||||
|
||||
[node name="ContinueGameButton" type="Button" parent="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer" index="1"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Continue"
|
||||
|
||||
[connection signal="pressed" from="MenuContainer/MenuButtonsMargin/MenuButtonsContainer/MenuButtonsBoxContainer/ContinueGameButton" to="." method="_on_continue_game_button_pressed"]
|
@ -0,0 +1,38 @@
|
||||
@tool
|
||||
extends ListOptionControl
|
||||
|
||||
func _set_input_device() -> void:
|
||||
var current_setting : Variant = _get_setting(default_value)
|
||||
if current_setting is bool:
|
||||
current_setting = &"Default"
|
||||
AudioServer.input_device = _get_setting(default_value)
|
||||
|
||||
func _add_microphone_audio_stream() -> void:
|
||||
var instance := AudioStreamPlayer.new()
|
||||
instance.stream = AudioStreamMicrophone.new()
|
||||
instance.autoplay = true
|
||||
add_child.call_deferred(instance)
|
||||
instance.ready.connect(_set_input_device)
|
||||
|
||||
func _ready() -> void:
|
||||
if ProjectSettings.get_setting("audio/driver/enable_input", false):
|
||||
if AudioServer.input_device.is_empty():
|
||||
_add_microphone_audio_stream()
|
||||
else:
|
||||
_set_input_device()
|
||||
if not Engine.is_editor_hint():
|
||||
option_values = AudioServer.get_input_device_list()
|
||||
else:
|
||||
hide()
|
||||
super._ready()
|
||||
|
||||
func _on_setting_changed(value : Variant) -> void:
|
||||
if value >= option_values.size(): return
|
||||
AudioServer.input_device = option_values[value]
|
||||
super._on_setting_changed(value)
|
||||
|
||||
func _value_title_map(value : Variant) -> String:
|
||||
if value is String:
|
||||
return value
|
||||
else:
|
||||
return super._value_title_map(value)
|
@ -0,0 +1 @@
|
||||
uid://xfdxru4xej5w
|
@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://ccwei8bk10jhq"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/option_control/list_option_control.tscn" id="1_tuyxr"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/audio/audio_input_option_control.gd" id="2_vhp47"]
|
||||
|
||||
[node name="AudioInputOptionControl" instance=ExtResource("1_tuyxr")]
|
||||
script = ExtResource("2_vhp47")
|
||||
option_name = "Input Device"
|
||||
option_section = 2
|
||||
key = "InputDevice"
|
||||
section = "AudioSettings"
|
||||
property_type = 4
|
||||
|
||||
[node name="OptionLabel" parent="." index="0"]
|
||||
text = "Input Device :"
|
||||
|
||||
[node name="OptionButton" parent="." index="1"]
|
||||
size_flags_horizontal = 3
|
||||
text_overrun_behavior = 1
|
||||
clip_text = true
|
@ -0,0 +1 @@
|
||||
extends AudioOptionsMenu
|
@ -0,0 +1 @@
|
||||
uid://dx2fw63m1yjyw
|
@ -0,0 +1,11 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dplpq8fcf2ypd"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/audio/audio_options_menu.tscn" id="1_aug6w"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/audio/audio_options_menu.gd" id="2_263cq"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/audio/audio_input_option_control.tscn" id="3_0tfxc"]
|
||||
|
||||
[node name="Audio" instance=ExtResource("1_aug6w")]
|
||||
script = ExtResource("2_263cq")
|
||||
|
||||
[node name="AudioInputOptionControl" parent="VBoxContainer" index="2" instance=ExtResource("3_0tfxc")]
|
||||
layout_mode = 2
|
@ -0,0 +1,65 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bwt75avqpjqny"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/maaacks_menus_template/base/scripts/capture_focus.gd" id="1_gxpl4"]
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/option_control/slider_option_control.tscn" id="2_d1tes"]
|
||||
|
||||
[node name="Inputs" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = 8
|
||||
script = ExtResource("1_gxpl4")
|
||||
search_depth = 5
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 32
|
||||
theme_override_constants/margin_bottom = 32
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 8
|
||||
alignment = 1
|
||||
|
||||
[node name="MouseSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_d1tes")]
|
||||
layout_mode = 2
|
||||
option_name = "Mouse Sensitivity"
|
||||
option_section = 1
|
||||
key = "MouseSensitivity"
|
||||
section = "InputSettings"
|
||||
|
||||
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="0"]
|
||||
text = "Mouse Sensitivity :"
|
||||
|
||||
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="1"]
|
||||
min_value = 0.25
|
||||
max_value = 2.0
|
||||
tick_count = 8
|
||||
|
||||
[node name="JoypadSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" instance=ExtResource("2_d1tes")]
|
||||
layout_mode = 2
|
||||
option_name = "Joypad Sensitivity"
|
||||
option_section = 1
|
||||
key = "JoypadSensitivity"
|
||||
section = "InputSettings"
|
||||
|
||||
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/JoypadSensitivityControl" index="0"]
|
||||
text = "Joypad Sensitivity :"
|
||||
|
||||
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/JoypadSensitivityControl" index="1"]
|
||||
min_value = 0.25
|
||||
max_value = 2.0
|
||||
tick_count = 8
|
||||
|
||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl"]
|
||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/JoypadSensitivityControl"]
|
@ -0,0 +1,2 @@
|
||||
@tool
|
||||
extends InputOptionsMenu
|
@ -0,0 +1 @@
|
||||
uid://2k7imsmqe6r5
|
@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://by4c2bh6ar28y"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/input/input_options_menu.tscn" id="1_wufmj"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/input/input_options_menu.gd" id="2_mffhs"]
|
||||
|
||||
[node name="Controls" instance=ExtResource("1_wufmj")]
|
||||
script = ExtResource("2_mffhs")
|
@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://demxytblxy5ut"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/input/input_options_menu.tscn" id="1_nal1b"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/input/input_options_menu.gd" id="2_ee01w"]
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/option_control/slider_option_control.tscn" id="3_b5f4c"]
|
||||
|
||||
[node name="Controls" instance=ExtResource("1_nal1b")]
|
||||
script = ExtResource("2_ee01w")
|
||||
|
||||
[node name="VBoxContainer" parent="." index="0"]
|
||||
theme_override_constants/separation = 16
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer" index="0"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_top = 32
|
||||
theme_override_constants/margin_bottom = 32
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer" index="0"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="MouseSensitivityControl" parent="VBoxContainer/MarginContainer/VBoxContainer" index="0" instance=ExtResource("3_b5f4c")]
|
||||
layout_mode = 2
|
||||
option_name = "Mouse Sensitivity"
|
||||
option_section = 1
|
||||
key = "MouseSensitivity"
|
||||
section = "InputSettings"
|
||||
|
||||
[node name="OptionLabel" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="0"]
|
||||
text = "Mouse Sensitivity :"
|
||||
|
||||
[node name="HSlider" parent="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl" index="1"]
|
||||
min_value = 0.25
|
||||
max_value = 2.0
|
||||
tick_count = 8
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="VBoxContainer" index="1"]
|
||||
layout_mode = 2
|
||||
|
||||
[editable path="VBoxContainer/MarginContainer/VBoxContainer/MouseSensitivityControl"]
|
@ -0,0 +1 @@
|
||||
extends MasterOptionsMenu
|
@ -0,0 +1 @@
|
||||
uid://d1ya7l3xda4yp
|
@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cinwh8mh5auss"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/master_options_menu.tscn" id="1_d0atc"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/master_options_menu.gd" id="2_fs0jy"]
|
||||
|
||||
[node name="MasterOptionsMenu" instance=ExtResource("1_d0atc")]
|
||||
script = ExtResource("2_fs0jy")
|
@ -0,0 +1,33 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cuyyhte8hennl"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/master_options_menu.tscn" id="1_hw3gx"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/master_options_menu.gd" id="2_wg46o"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/input/input_options_menu.tscn" id="3_4utcb"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/input/input_extras_menu.tscn" id="4_ycqlj"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/audio/audio_options_menu.tscn" id="5_hog5b"]
|
||||
[ext_resource type="PackedScene" path="res://template/scenes/menus/options_menu/video/video_options_menu_with_extras.tscn" id="6_qiugr"]
|
||||
|
||||
[node name="MasterOptionsMenu" instance=ExtResource("1_hw3gx")]
|
||||
script = ExtResource("2_wg46o")
|
||||
|
||||
[node name="TabContainer" parent="." index="0"]
|
||||
current_tab = 0
|
||||
|
||||
[node name="Controls" parent="TabContainer" index="1" instance=ExtResource("3_4utcb")]
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 0
|
||||
|
||||
[node name="Inputs" parent="TabContainer" index="2" instance=ExtResource("4_ycqlj")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 1
|
||||
|
||||
[node name="Audio" parent="TabContainer" index="3" instance=ExtResource("5_hog5b")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="Video" parent="TabContainer" index="4" instance=ExtResource("6_qiugr")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 3
|
1
template/scenes/menus/options_menu/mini_options_menu.gd
Normal file
1
template/scenes/menus/options_menu/mini_options_menu.gd
Normal file
@ -0,0 +1 @@
|
||||
extends MiniOptionsMenu
|
@ -0,0 +1 @@
|
||||
uid://fabhcfk2jxbv
|
@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bjpxc2wh5i3r"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/mini_options_menu.tscn" id="1_ftt34"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/mini_options_menu.gd" id="2_k6hgg"]
|
||||
|
||||
[node name="MiniOptionsMenu" instance=ExtResource("1_ftt34")]
|
||||
script = ExtResource("2_k6hgg")
|
@ -0,0 +1 @@
|
||||
extends VideoOptionsMenu
|
@ -0,0 +1 @@
|
||||
uid://bf6h2o0j53apg
|
@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://k7yb7evk5gk4"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/video/video_options_menu.tscn" id="1_72nwo"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/video/video_options_menu.gd" id="2_okeh5"]
|
||||
|
||||
[node name="Video" instance=ExtResource("1_72nwo")]
|
||||
script = ExtResource("2_okeh5")
|
@ -0,0 +1,33 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d2kekqotmmrpb"]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/video/video_options_menu.tscn" id="1_ee880"]
|
||||
[ext_resource type="Script" path="res://template/scenes/menus/options_menu/video/video_options_menu.gd" id="2_iefob"]
|
||||
[ext_resource type="PackedScene" path="res://addons/maaacks_menus_template/base/scenes/menus/options_menu/option_control/list_option_control.tscn" id="3_v2oud"]
|
||||
|
||||
[node name="Video" instance=ExtResource("1_ee880")]
|
||||
script = ExtResource("2_iefob")
|
||||
|
||||
[node name="AntiAliasingControl" parent="VBoxContainer" index="3" instance=ExtResource("3_v2oud")]
|
||||
layout_mode = 2
|
||||
lock_titles = true
|
||||
option_values = [0, 1, 2, 3]
|
||||
option_titles = Array[String](["Disabled (Fastest)", "2x", "4x", "8x (Slowest)"])
|
||||
option_name = "Anti-Aliasing"
|
||||
option_section = 3
|
||||
key = "Anti-aliasing"
|
||||
section = "VideoSettings"
|
||||
property_type = 2
|
||||
default_value = 0
|
||||
|
||||
[node name="CameraShakeControl" parent="VBoxContainer" index="4" instance=ExtResource("3_v2oud")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
lock_titles = true
|
||||
option_values = [1.0, 0.75, 0.5, 0.0]
|
||||
option_titles = Array[String](["Normal", "Reduced", "Minimal", "None"])
|
||||
option_name = "Camera Shake"
|
||||
option_section = 3
|
||||
key = "CameraShake"
|
||||
section = "VideoSettings"
|
||||
property_type = 3
|
||||
default_value = 1.0
|
Reference in New Issue
Block a user