progress on new options screen
This commit is contained in:
parent
6ed5743144
commit
69d6a4b4f7
12 changed files with 1000 additions and 39 deletions
|
@ -15,4 +15,4 @@ expand = true
|
|||
stretch_mode = 7
|
||||
script = ExtResource( 1 )
|
||||
borders = [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 2 ), ExtResource( 6 ), ExtResource( 5 ) ]
|
||||
names = [ "Trans Rights", "Got Shards?", "Infiltration", "Here's To The Gays", "Fuck The Binary" ]
|
||||
names = [ "Trans Rights", "Got Shards?", "Infiltration", "Here Come The Gays", "Fuck The Binary" ]
|
||||
|
|
|
@ -2,13 +2,13 @@ extends CanvasLayer
|
|||
|
||||
signal fade_finished
|
||||
|
||||
func fade_in(time, reverse: bool = false, color: Color = Color.black) -> void:
|
||||
func fade_in(time: float = NAN, reverse: bool = false, color: Color = Color.black) -> void:
|
||||
var rect = $TextureRect
|
||||
rect.material.set_shader_param("color", color)
|
||||
rect.material.set_shader_param("reverse", reverse)
|
||||
$AnimationPlayer.play("FadeIn", -1, 1.0 / time)
|
||||
|
||||
func fade_out(time, reverse: bool = false, color: Color = Color.black) -> void:
|
||||
func fade_out(time: float = NAN, reverse: bool = false, color: Color = Color.black) -> void:
|
||||
var rect = $TextureRect
|
||||
rect.material.set_shader_param("color", color)
|
||||
rect.material.set_shader_param("reverse", reverse)
|
||||
|
|
|
@ -1,57 +1,97 @@
|
|||
extends Node
|
||||
|
||||
|
||||
#Enums
|
||||
enum ScalingMode {INTEGER,ASPECT,STRETCH}
|
||||
enum Filter {NONE,CRT,LCD,BILINEAR}
|
||||
enum RumbleMode {NONE,NORMAL,BPM}
|
||||
enum TransSpeed {NONE = 0,SLOW = 1,NORMAL = 2,FAST = 3}
|
||||
var TRANS_SPEEDS = [0.0000001, 0.8, 0.4, 0.2]
|
||||
enum ScalingMode {INTEGER, ASPECT, STRETCH}
|
||||
enum Filter {NONE, CRT, LCD, BILINEAR}
|
||||
enum RumbleMode {NONE, DEATHS, FULL}
|
||||
enum TransSpeed {SLOW, NORMAL, FAST, INSTANT}
|
||||
enum ScanlineType {NONE, LCD, CRT}
|
||||
enum Gore {NONE, NO_STAINS, FULL}
|
||||
enum Section {GAME, VIDEO, AUDIO, ALL}
|
||||
|
||||
|
||||
#Constants
|
||||
const TRANS_SPEEDS := [0.8, 0.4, 0.2, 0.0000001]
|
||||
|
||||
|
||||
#Game
|
||||
var rumble = RumbleMode.NONE
|
||||
var rumble: int = RumbleMode.FULL
|
||||
var gore: int = Gore.FULL
|
||||
|
||||
#Video
|
||||
var fullscreen = false setget _set_fullscreen
|
||||
var scaling_mode = ScalingMode.INTEGER setget _set_scaling_mode
|
||||
var transition_speed = TransSpeed.NORMAL setget _set_transition_speed
|
||||
var fullscreen: bool = false setget _set_fullscreen
|
||||
var window_size: float = 2.0 setget _set_window_size
|
||||
var scaling_mode: int = ScalingMode.INTEGER setget _set_scaling_mode
|
||||
var transition_speed: int = TransSpeed.NORMAL setget _set_transition_speed
|
||||
var transition_speed_secs setget , _get_transition_speed_sex
|
||||
var border: int = 0 setget _set_border
|
||||
var scanlines: int = ScanlineType.NONE setget _set_scanlines
|
||||
|
||||
#Audio
|
||||
var master_volume = 1.0 setget _set_master_volume
|
||||
var music_volume = 1.0 setget _set_music_volume
|
||||
var sound_volume = 1.0 setget _set_sound_volume
|
||||
var master_volume: float = 1.0 setget _set_master_volume
|
||||
var music_volume: float = 1.0 setget _set_music_volume
|
||||
var sound_volume: float = 1.0 setget _set_sound_volume
|
||||
var landing_sound: bool = true setget _set_landing_sound
|
||||
|
||||
# last played file
|
||||
var last_file: int = 0
|
||||
|
||||
# default values
|
||||
var defaults = null
|
||||
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
pause_mode = PAUSE_MODE_PROCESS
|
||||
# clone self into defaults before loading stored values
|
||||
if defaults == null:
|
||||
defaults = duplicate()
|
||||
load_options()
|
||||
|
||||
func _unhandled_input(event):
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if Debug.entry == false:
|
||||
if event.is_action_pressed("fullscreen"):
|
||||
_set_fullscreen(!fullscreen)
|
||||
|
||||
func load_options():
|
||||
func load_options() -> void:
|
||||
var file = ConfigFile.new()
|
||||
file.load("user://options.pr")
|
||||
# game
|
||||
rumble = file.get_value("game", "rumble", RumbleMode.NONE)
|
||||
rumble = file.get_value("game", "rumble", defaults.rumble)
|
||||
gore = file.get_value("game", "gore", defaults.gore)
|
||||
# video
|
||||
_set_fullscreen(file.get_value("video", "fullscreen", false))
|
||||
_set_scaling_mode(file.get_value("video", "scaling_mode", ScalingMode.INTEGER))
|
||||
_set_transition_speed(file.get_value("video", "transition_speed", TransSpeed.NORMAL))
|
||||
_set_fullscreen(file.get_value("video", "fullscreen", defaults.fullscreen))
|
||||
_set_window_size(file.get_value("video", "window_size", defaults.window_size))
|
||||
_set_scaling_mode(file.get_value("video", "scaling_mode", defaults.scaling_mode))
|
||||
_set_transition_speed(file.get_value("video", "transition_speed", defaults.transition_speed))
|
||||
_set_border(file.get_value("video", "border", defaults.border))
|
||||
_set_scanlines(file.get_value("video", "scanlines", defaults.scanlines))
|
||||
# audio
|
||||
_set_master_volume(file.get_value("audio", "master_volume", 1.0))
|
||||
_set_music_volume(file.get_value("audio", "music_volume", 1.0))
|
||||
_set_sound_volume(file.get_value("audio", "sound_volume", 1.0))
|
||||
_set_landing_sound(file.get_value("audio", "landing_sound", defaults.landing_sound))
|
||||
# last played file
|
||||
last_file = file.get_value("save", "last_file", 0)
|
||||
|
||||
func save_options():
|
||||
func load_defaults(section: int = Section.ALL) -> void:
|
||||
match section:
|
||||
Section.GAME, Section.ALL:
|
||||
rumble = defaults.rumble
|
||||
gore = defaults.gore
|
||||
Section.VIDEO, Section.ALL:
|
||||
fullscreen = defaults.fullscreen
|
||||
window_size = defaults.window_size
|
||||
scaling_mode = defaults.scaling_mode
|
||||
transition_speed = defaults.transition_speed
|
||||
border = defaults.border
|
||||
scanlines = defaults.scanlines
|
||||
Section.AUDIO, Section.ALL:
|
||||
master_volume = defaults.master_volume
|
||||
music_volume = defaults.music_volume
|
||||
sound_volume = defaults.sound_volume
|
||||
landing_sound = defaults.landing_sound
|
||||
|
||||
func save_options() -> void:
|
||||
var file = ConfigFile.new()
|
||||
#Game
|
||||
file.set_value("game","rumble",rumble)
|
||||
|
@ -71,33 +111,49 @@ func save_options():
|
|||
# Setters
|
||||
|
||||
# video setters
|
||||
func _set_fullscreen(value):
|
||||
func _set_fullscreen(value: bool) -> void:
|
||||
fullscreen = value
|
||||
OS.set_window_fullscreen(value)
|
||||
OS.window_fullscreen = fullscreen
|
||||
|
||||
func _set_scaling_mode(value):
|
||||
func _set_window_size(value: float) -> void:
|
||||
pass
|
||||
|
||||
func _set_scaling_mode(value: int) -> void:
|
||||
scaling_mode = value
|
||||
SceneManager.scaling_mode = scaling_mode
|
||||
get_tree().emit_signal("screen_resized") # force screen size update
|
||||
|
||||
func _set_transition_speed(value):
|
||||
func _set_transition_speed(value: int) -> void:
|
||||
transition_speed = value
|
||||
|
||||
func _get_transition_speed_sex():
|
||||
func _get_transition_speed_sex() -> float:
|
||||
return TRANS_SPEEDS[transition_speed]
|
||||
|
||||
func _set_border(value: int) -> void:
|
||||
border = value
|
||||
Border.current_border = border
|
||||
|
||||
func _set_scanlines(value: int) -> void:
|
||||
pass
|
||||
|
||||
|
||||
# audio setters
|
||||
func _set_master_volume(value):
|
||||
func _set_master_volume(value: float) -> void:
|
||||
master_volume = value
|
||||
AudioServer.set_bus_volume_db(0, linear2db(value))
|
||||
|
||||
func _set_music_volume(value):
|
||||
func _set_music_volume(value: float) -> void:
|
||||
music_volume = value
|
||||
var idx = AudioServer.get_bus_index("music")
|
||||
AudioServer.set_bus_volume_db(idx, linear2db(value))
|
||||
|
||||
func _set_sound_volume(value):
|
||||
func _set_sound_volume(value: float) -> void:
|
||||
sound_volume = value
|
||||
var idx = AudioServer.get_bus_index("sound")
|
||||
AudioServer.set_bus_volume_db(idx, linear2db(value))
|
||||
idx = AudioServer.get_bus_index("shard")
|
||||
AudioServer.set_bus_volume_db(idx, linear2db(value))
|
||||
|
||||
func _set_landing_sound(value: bool) -> void:
|
||||
landing_sound = value
|
||||
Audio.ac_land.volume_db = -15.0 if landing_sound else -INF
|
||||
|
|
|
@ -7,7 +7,7 @@ custom_features=""
|
|||
export_filter="all_resources"
|
||||
include_filter="ngio.ini"
|
||||
exclude_filter=""
|
||||
export_path="build/windows/Hero Mark 2.exe"
|
||||
export_path="build/Revolution 2083.exe"
|
||||
script_export_mode=1
|
||||
script_encryption_key=""
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ func _ready():
|
|||
else:
|
||||
$Day.visible = true
|
||||
|
||||
|
||||
func _on_AudioStreamPlayer_finished():
|
||||
Fade.fade_out(0.4)
|
||||
yield(Fade, "fade_finished")
|
||||
|
|
14
objects/hud/labeled_slider.gd
Normal file
14
objects/hud/labeled_slider.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends HSlider
|
||||
|
||||
|
||||
export var label: NodePath
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
connect("value_changed", self, "_on_value_changed")
|
||||
|
||||
|
||||
func _on_value_changed(value: float) -> void:
|
||||
var l = get_node(label)
|
||||
if l is Label:
|
||||
l.text = str(value)
|
|
@ -53,6 +53,7 @@ margin_bottom = 152.0
|
|||
theme = ExtResource( 2 )
|
||||
|
||||
[node name="Game" type="VBoxContainer" parent="Tabs"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = 10.0
|
||||
|
@ -123,8 +124,7 @@ align = 0
|
|||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = 7.0
|
||||
margin_bottom = -17.0
|
||||
margin_top = 10.0
|
||||
focus_neighbour_bottom = NodePath("Fullscreen")
|
||||
|
||||
[node name="Spacer" type="Control" parent="Tabs/Video"]
|
||||
|
@ -374,11 +374,9 @@ group = SubResource( 5 )
|
|||
text = "Fast"
|
||||
|
||||
[node name="Audio" type="VBoxContainer" parent="Tabs"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = 7.0
|
||||
margin_bottom = -37.0
|
||||
margin_top = 10.0
|
||||
focus_neighbour_bottom = NodePath("MasterVolume/MasterSlider")
|
||||
|
||||
[node name="Spacer" type="Control" parent="Tabs/Audio"]
|
||||
|
|
101
objects/hud/options_screen_scholar.gd
Normal file
101
objects/hud/options_screen_scholar.gd
Normal file
|
@ -0,0 +1,101 @@
|
|||
extends Control
|
||||
|
||||
|
||||
onready var tabs: TabContainer = $"%Tabs"
|
||||
onready var select_tab: HBoxContainer = $"%SelectTab"
|
||||
# options nodes
|
||||
onready var rumble: HBoxContainer = $"%SelectRumble"
|
||||
onready var gore: HBoxContainer = $"%SelectGore"
|
||||
onready var fullscreen: HBoxContainer = $"%SelectFullscreen"
|
||||
onready var window_size: HBoxContainer = $"%SelectWindowSize"
|
||||
onready var scaling: HBoxContainer = $"%SelectScaling"
|
||||
onready var fade_speed: HBoxContainer = $"%SelectFadeSpeed"
|
||||
onready var border: Button = $"%SelectBorder"
|
||||
onready var scanlines: HBoxContainer = $"%SelectScanlines"
|
||||
onready var master_vol: HSlider = $"%SelectMasterVol"
|
||||
onready var music_vol: HSlider = $"%SelectMusicVol"
|
||||
onready var sound_vol: HSlider = $"%SelectSoundVol"
|
||||
onready var landing_sound: HBoxContainer = $"%SelectLandingSound"
|
||||
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_init_values()
|
||||
yield(get_tree(), "idle_frame")
|
||||
$"%SelectTab".grab_focus()
|
||||
|
||||
|
||||
func _init_values() -> void:
|
||||
# game
|
||||
rumble.selection = Options.rumble
|
||||
gore.selection = Options.gore
|
||||
# video
|
||||
fullscreen.selection = 1 if Options.fullscreen else 0
|
||||
window_size.selection = int(Options.window_size) - 1
|
||||
scaling.selection = Options.scaling_mode
|
||||
fade_speed.selection = Options.transition_speed
|
||||
border._update()
|
||||
scanlines.selection = Options.scanlines
|
||||
# audio
|
||||
master_vol.value = Options.master_volume * 100.0
|
||||
music_vol.value = Options.music_volume * 100.0
|
||||
sound_vol.value = Options.sound_volume * 100.0
|
||||
landing_sound.selection = 1 if Options.landing_sound else 0
|
||||
|
||||
func _on_tab_selected(selection: int) -> void:
|
||||
tabs.current_tab = selection
|
||||
var tab = tabs.get_current_tab_control()
|
||||
var next = tab.get_node(tab.focus_next)
|
||||
if next:
|
||||
select_tab.focus_neighbour_bottom = select_tab.get_path_to(next)
|
||||
else:
|
||||
select_tab.focus_neighbour_bottom = @"."
|
||||
select_tab.update_focus_targets()
|
||||
|
||||
|
||||
#
|
||||
# GAME
|
||||
#
|
||||
func _on_Rumble_selected(selection) -> void:
|
||||
Options.rumble = selection
|
||||
|
||||
func _on_Gore_selected(selection) -> void:
|
||||
Options.gore = selection
|
||||
|
||||
|
||||
#
|
||||
# VIDEO
|
||||
#
|
||||
func _on_Fullscreen_selected(selection) -> void:
|
||||
Options.fullscreen = selection == 1 # true if 1, false otherwise
|
||||
|
||||
func _on_WindowSize_selected(selection) -> void:
|
||||
Options.window_size = float(selection + 1)
|
||||
|
||||
func _on_Scaling_selected(selection) -> void:
|
||||
Options.scaling_mode = selection
|
||||
|
||||
func _on_FadeSpeed_selected(selection) -> void:
|
||||
Options.transition_speed = selection
|
||||
|
||||
func _on_Border_selected(selection) -> void:
|
||||
Options.border = selection
|
||||
|
||||
func _on_Scanlines_selected(selection) -> void:
|
||||
Options.scanlines = selection
|
||||
|
||||
|
||||
#
|
||||
# AUDIO
|
||||
#
|
||||
func _on_MasterVol_value_changed(value: float) -> void:
|
||||
Options.master_volume = value * 0.01
|
||||
|
||||
func _on_MusicVol_value_changed(value: float) -> void:
|
||||
Options.music_volume = value * 0.01
|
||||
|
||||
func _on_SoundVol_value_changed(value: float) -> void:
|
||||
Options.sound_volume = value * 0.01
|
||||
|
||||
func _on_LandingSound_selected(selection) -> void:
|
||||
Options.landing_sound = selection == 1
|
650
objects/hud/options_screen_scholar.tscn
Normal file
650
objects/hud/options_screen_scholar.tscn
Normal file
|
@ -0,0 +1,650 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://objects/hud/options_screen_scholar.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=2]
|
||||
[ext_resource path="res://objects/hud/radio_buttons.gd" type="Script" id=3]
|
||||
[ext_resource path="res://shaders/wibble_wobble.gdshader" type="Shader" id=4]
|
||||
[ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=5]
|
||||
[ext_resource path="res://objects/hud/select_border.gd" type="Script" id=6]
|
||||
[ext_resource path="res://objects/hud/labeled_slider.gd" type="Script" id=7]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/speed = Vector2( 4, 0 )
|
||||
shader_param/ammount = Vector2( 2, 0 )
|
||||
shader_param/offset = Vector2( 0, 0 )
|
||||
shader_param/delay = Vector2( 0, 0 )
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=2]
|
||||
shader = ExtResource( 4 )
|
||||
shader_param/speed = Vector2( 4, 0 )
|
||||
shader_param/ammount = Vector2( 2, 0 )
|
||||
shader_param/offset = Vector2( 0, 0 )
|
||||
shader_param/delay = Vector2( 4, 0 )
|
||||
|
||||
[node name="OptionsScreen" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
theme = ExtResource( 2 )
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="CenterContainer"]
|
||||
margin_left = 8.0
|
||||
margin_top = 16.0
|
||||
margin_right = 248.0
|
||||
margin_bottom = 176.0
|
||||
rect_min_size = Vector2( 240, 160 )
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CenterContainer/PanelContainer"]
|
||||
margin_left = 3.0
|
||||
margin_top = 3.0
|
||||
margin_right = 237.0
|
||||
margin_bottom = 157.0
|
||||
custom_constants/margin_right = 8
|
||||
custom_constants/margin_top = 4
|
||||
custom_constants/margin_left = 8
|
||||
custom_constants/margin_bottom = 4
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer"]
|
||||
margin_left = 8.0
|
||||
margin_top = 4.0
|
||||
margin_right = 226.0
|
||||
margin_bottom = 150.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
text = "-options-"
|
||||
align = 1
|
||||
|
||||
[node name="SelectTab" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 14.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 24.0
|
||||
focus_mode = 2
|
||||
alignment = 1
|
||||
script = ExtResource( 3 )
|
||||
condense = true
|
||||
options = [ "game", "video", "audio", "input" ]
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
margin_top = 28.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 32.0
|
||||
|
||||
[node name="Tabs" type="TabContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 36.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 132.0
|
||||
focus_mode = 2
|
||||
tabs_visible = false
|
||||
|
||||
[node name="Game" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
focus_next = NodePath("Rumble/SelectRumble")
|
||||
|
||||
[node name="Rumble" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game"]
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Rumble"]
|
||||
margin_top = 1.0
|
||||
margin_right = 49.0
|
||||
margin_bottom = 11.0
|
||||
text = "Rumble:"
|
||||
|
||||
[node name="SelectRumble" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Rumble"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 53.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
focus_neighbour_top = NodePath("../../../../SelectTab")
|
||||
focus_neighbour_bottom = NodePath("../../Gore/SelectGore")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "off", "deaths", "full" ]
|
||||
|
||||
[node name="Gore" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game"]
|
||||
margin_top = 16.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 28.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Gore"]
|
||||
margin_top = 1.0
|
||||
margin_right = 35.0
|
||||
margin_bottom = 11.0
|
||||
text = "Gore:"
|
||||
|
||||
[node name="SelectGore" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Gore"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 39.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
focus_neighbour_top = NodePath("../../Rumble/SelectRumble")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "none", "no stains", "full" ]
|
||||
|
||||
[node name="Video" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
focus_next = NodePath("Fullscreen/SelectFullscreen")
|
||||
|
||||
[node name="Fullscreen" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Fullscreen"]
|
||||
margin_right = 140.0
|
||||
margin_bottom = 10.0
|
||||
text = "Start In fullscreen:"
|
||||
|
||||
[node name="SelectFullscreen" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Fullscreen"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 144.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../../../SelectTab")
|
||||
focus_neighbour_bottom = NodePath("../../WindowSize/SelectWindowSize")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "off", "on" ]
|
||||
|
||||
[node name="WindowSize" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_top = 14.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/WindowSize"]
|
||||
margin_right = 84.0
|
||||
margin_bottom = 10.0
|
||||
text = "window size:"
|
||||
|
||||
[node name="SelectWindowSize" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/WindowSize"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 88.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../Fullscreen/SelectFullscreen")
|
||||
focus_neighbour_bottom = NodePath("../../Scaling/SelectScaling")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "1x", "2x", "3x", "4x", "5x" ]
|
||||
|
||||
[node name="Scaling" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_top = 28.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 38.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scaling"]
|
||||
margin_right = 56.0
|
||||
margin_bottom = 10.0
|
||||
text = "scaling:"
|
||||
|
||||
[node name="SelectScaling" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scaling"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 60.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../WindowSize/SelectWindowSize")
|
||||
focus_neighbour_bottom = NodePath("../../FadeSpeed/SelectFadeSpeed")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "integer", "aspect", "stretch" ]
|
||||
|
||||
[node name="FadeSpeed" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_top = 42.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 52.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/FadeSpeed"]
|
||||
margin_right = 35.0
|
||||
margin_bottom = 10.0
|
||||
text = "fade:"
|
||||
|
||||
[node name="SelectFadeSpeed" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/FadeSpeed"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 39.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../Scaling/SelectScaling")
|
||||
focus_neighbour_bottom = NodePath("../../Border/HBoxContainer/SelectBorder")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "slow", "medium", "fast", "instant" ]
|
||||
|
||||
[node name="Border" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_top = 56.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 66.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border"]
|
||||
margin_right = 49.0
|
||||
margin_bottom = 10.0
|
||||
text = "border:"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border"]
|
||||
margin_left = 53.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
alignment = 1
|
||||
|
||||
[node name="BorderBackArrow" type="TextureRect" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource( 1 )
|
||||
margin_left = 30.0
|
||||
margin_top = 1.0
|
||||
margin_right = 36.0
|
||||
margin_bottom = 9.0
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource( 5 )
|
||||
flip_h = true
|
||||
|
||||
[node name="SelectBorder" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 40.0
|
||||
margin_right = 124.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_left = NodePath(".")
|
||||
focus_neighbour_top = NodePath("../../../FadeSpeed/SelectFadeSpeed")
|
||||
focus_neighbour_right = NodePath(".")
|
||||
theme = ExtResource( 2 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
text = "trans rights"
|
||||
script = ExtResource( 6 )
|
||||
|
||||
[node name="BorderNextArrow" type="TextureRect" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource( 2 )
|
||||
margin_left = 128.0
|
||||
margin_top = 1.0
|
||||
margin_right = 134.0
|
||||
margin_bottom = 9.0
|
||||
size_flags_vertical = 4
|
||||
texture = ExtResource( 5 )
|
||||
|
||||
[node name="Scanlines" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video"]
|
||||
margin_top = 70.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 80.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scanlines"]
|
||||
margin_right = 70.0
|
||||
margin_bottom = 10.0
|
||||
text = "scanlines:"
|
||||
|
||||
[node name="SelectScanlines" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scanlines"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 74.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../Scaling/SelectScaling")
|
||||
focus_neighbour_bottom = NodePath("../../Border/HBoxContainer/SelectBorder")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "none", "lcd", "crt" ]
|
||||
|
||||
[node name="Audio" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
focus_next = NodePath("Master/SelectMasterVol")
|
||||
|
||||
[node name="Master" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio"]
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Master"]
|
||||
margin_top = 1.0
|
||||
margin_right = 94.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Master vol.:"
|
||||
|
||||
[node name="SelectMasterVol" type="HSlider" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Master"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 98.0
|
||||
margin_right = 193.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../../../SelectTab")
|
||||
focus_neighbour_bottom = NodePath("../../Music/SelectMusicVol")
|
||||
size_flags_horizontal = 3
|
||||
step = 5.0
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
script = ExtResource( 7 )
|
||||
label = NodePath("../Volume")
|
||||
|
||||
[node name="Volume" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Master"]
|
||||
margin_left = 197.0
|
||||
margin_top = 1.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 11.0
|
||||
rect_min_size = Vector2( 21, 0 )
|
||||
size_flags_horizontal = 9
|
||||
text = "100"
|
||||
align = 2
|
||||
|
||||
[node name="Music" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio"]
|
||||
margin_top = 16.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 28.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Music"]
|
||||
margin_top = 1.0
|
||||
margin_right = 94.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Music vol.:"
|
||||
|
||||
[node name="SelectMusicVol" type="HSlider" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Music"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 98.0
|
||||
margin_right = 193.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../Master/SelectMasterVol")
|
||||
focus_neighbour_bottom = NodePath("../../Sound/SelectSoundVol")
|
||||
size_flags_horizontal = 3
|
||||
step = 5.0
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
script = ExtResource( 7 )
|
||||
label = NodePath("../Volume")
|
||||
|
||||
[node name="Volume" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Music"]
|
||||
margin_left = 197.0
|
||||
margin_top = 1.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 11.0
|
||||
rect_min_size = Vector2( 21, 0 )
|
||||
size_flags_horizontal = 9
|
||||
text = "100"
|
||||
align = 2
|
||||
|
||||
[node name="Sound" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio"]
|
||||
margin_top = 32.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 44.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Sound"]
|
||||
margin_top = 1.0
|
||||
margin_right = 94.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Sound vol.:"
|
||||
|
||||
[node name="SelectSoundVol" type="HSlider" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Sound"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 98.0
|
||||
margin_right = 193.0
|
||||
margin_bottom = 10.0
|
||||
focus_neighbour_top = NodePath("../../Music/SelectMusicVol")
|
||||
focus_neighbour_bottom = NodePath("../../LandingSound/SelectLandingSound")
|
||||
size_flags_horizontal = 3
|
||||
step = 5.0
|
||||
value = 100.0
|
||||
scrollable = false
|
||||
script = ExtResource( 7 )
|
||||
label = NodePath("../Volume")
|
||||
|
||||
[node name="Volume" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Sound"]
|
||||
margin_left = 197.0
|
||||
margin_top = 1.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 11.0
|
||||
rect_min_size = Vector2( 21, 0 )
|
||||
size_flags_horizontal = 9
|
||||
text = "100"
|
||||
align = 2
|
||||
|
||||
[node name="LandingSound" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio"]
|
||||
margin_top = 48.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 60.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/LandingSound"]
|
||||
margin_top = 1.0
|
||||
margin_right = 98.0
|
||||
margin_bottom = 11.0
|
||||
text = "Landing sound:"
|
||||
|
||||
[node name="SelectLandingSound" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/LandingSound"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 102.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
focus_neighbour_top = NodePath("../../Sound/SelectSoundVol")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource( 3 )
|
||||
options = [ "off", "on" ]
|
||||
|
||||
[node name="Input" type="VBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
focus_next = NodePath("Left/Keyboard")
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_right = 218.0
|
||||
margin_bottom = 12.0
|
||||
rect_min_size = Vector2( 0, 12 )
|
||||
|
||||
[node name="Spacer" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Header"]
|
||||
margin_top = 1.0
|
||||
margin_right = 92.0
|
||||
margin_bottom = 11.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Header"]
|
||||
margin_left = 96.0
|
||||
margin_top = 1.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Keyboard"
|
||||
align = 1
|
||||
|
||||
[node name="Gamepad" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Header"]
|
||||
margin_left = 159.0
|
||||
margin_top = 1.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 11.0
|
||||
size_flags_horizontal = 3
|
||||
text = "Gamepad"
|
||||
align = 1
|
||||
|
||||
[node name="Left" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 16.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 26.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Left"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "left"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Left"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Left"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Right" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 30.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 40.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Right"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "right"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Right"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Right"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Up" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 44.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 54.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Up"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "up"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Up"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Up"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Down" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 58.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 68.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Down"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "down"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Down"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Down"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Jump" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 72.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 82.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Jump"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "jump/confirm"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Jump"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Jump"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Attack" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input"]
|
||||
margin_top = 86.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 96.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Attack"]
|
||||
margin_right = 92.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 92, 0 )
|
||||
text = "attack/back"
|
||||
align = 1
|
||||
|
||||
[node name="Keyboard" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Attack"]
|
||||
margin_left = 96.0
|
||||
margin_right = 155.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[node name="Gamepad" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Input/Attack"]
|
||||
margin_left = 159.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 10.0
|
||||
size_flags_horizontal = 3
|
||||
text = "-"
|
||||
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/SelectTab" to="." method="_on_tab_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Rumble/SelectRumble" to="." method="_on_Rumble_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/Gore/SelectGore" to="." method="_on_Gore_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Fullscreen/SelectFullscreen" to="." method="_on_Fullscreen_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/WindowSize/SelectWindowSize" to="." method="_on_WindowSize_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scaling/SelectScaling" to="." method="_on_Scaling_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/FadeSpeed/SelectFadeSpeed" to="." method="_on_FadeSpeed_selected"]
|
||||
[connection signal="focus_entered" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer/SelectBorder" to="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer/SelectBorder" method="_on_focus_entered"]
|
||||
[connection signal="focus_exited" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer/SelectBorder" to="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer/SelectBorder" method="_on_focus_exited"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Border/HBoxContainer/SelectBorder" to="." method="_on_Border_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Video/Scanlines/SelectScanlines" to="." method="_on_Scanlines_selected"]
|
||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Master/SelectMasterVol" to="." method="_on_MasterVol_value_changed"]
|
||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Music/SelectMusicVol" to="." method="_on_MusicVol_value_changed"]
|
||||
[connection signal="value_changed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/Sound/SelectSoundVol" to="." method="_on_SoundVol_value_changed"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Audio/LandingSound/SelectLandingSound" to="." method="_on_LandingSound_selected"]
|
101
objects/hud/radio_buttons.gd
Normal file
101
objects/hud/radio_buttons.gd
Normal file
|
@ -0,0 +1,101 @@
|
|||
tool
|
||||
class_name RadioButtons
|
||||
extends HBoxContainer
|
||||
|
||||
|
||||
signal selected(selection)
|
||||
|
||||
|
||||
export var condense: bool = false
|
||||
export var default_selection: int = 0 setget _set_default_selection
|
||||
export (Array, String) var options: Array = [] setget _set_options
|
||||
|
||||
|
||||
onready var selection: int = default_selection setget _set_selection
|
||||
|
||||
|
||||
var _buttons: Array = []
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
focus_mode = FOCUS_ALL
|
||||
connect("focus_entered", self, "_on_focus_entered")
|
||||
|
||||
|
||||
func _set_default_selection(value: int) -> void:
|
||||
if value < 0:
|
||||
value = 0
|
||||
elif value >= options.size() and value != 0:
|
||||
value = options.size() - 1
|
||||
default_selection = value
|
||||
if not _buttons.empty():
|
||||
_buttons[default_selection].pressed = true
|
||||
|
||||
|
||||
func _set_options(value: Array) -> void:
|
||||
options = value
|
||||
_init_buttons()
|
||||
|
||||
|
||||
func _set_selection(value: int) -> void:
|
||||
selection = value
|
||||
_buttons[selection].pressed = true
|
||||
|
||||
|
||||
func update_focus_targets() -> void:
|
||||
for b in _buttons:
|
||||
b.focus_neighbour_top = "../%s" % focus_neighbour_top
|
||||
b.focus_neighbour_bottom = "../%s" % focus_neighbour_bottom
|
||||
|
||||
|
||||
func _init_buttons() -> void:
|
||||
# initialize buttons array
|
||||
for child in get_children():
|
||||
remove_child(child)
|
||||
child.queue_free()
|
||||
_buttons.clear()
|
||||
_buttons.resize(options.size())
|
||||
|
||||
# set up new buttons
|
||||
var group := ButtonGroup.new()
|
||||
for i in options.size():
|
||||
# create new button
|
||||
var b := Button.new()
|
||||
b.text = options[i]
|
||||
b.toggle_mode = true
|
||||
b.group = group
|
||||
# size flags
|
||||
if condense:
|
||||
b.size_flags_horizontal = 0
|
||||
else:
|
||||
b.size_flags_horizontal = SIZE_EXPAND | SIZE_SHRINK_CENTER
|
||||
b.size_flags_vertical = 0
|
||||
# connect signal with index as payload
|
||||
b.connect("focus_entered", self, "_on_button_selected", [i])
|
||||
# add button to children and array
|
||||
_buttons[i] = b
|
||||
add_child(b)
|
||||
# sync top/bottom focus to self
|
||||
b.focus_neighbour_top = "../%s" % focus_neighbour_top
|
||||
b.focus_neighbour_bottom = "../%s" % focus_neighbour_bottom
|
||||
# set up focus between buttons
|
||||
if i > 0:
|
||||
var prev_b: Button = _buttons[i - 1]
|
||||
b.focus_neighbour_left = b.get_path_to(prev_b)
|
||||
prev_b.focus_neighbour_right = prev_b.get_path_to(b)
|
||||
elif i == 0:
|
||||
b.focus_neighbour_left = @"."
|
||||
elif i == options.size() - 1:
|
||||
b.focus_neighbour_right = @"."
|
||||
_buttons[default_selection].pressed = true
|
||||
|
||||
|
||||
func _on_focus_entered() -> void:
|
||||
_buttons[selection].grab_focus()
|
||||
|
||||
|
||||
func _on_button_selected(i: int) -> void:
|
||||
if i != selection:
|
||||
selection = i
|
||||
emit_signal("selected", i)
|
||||
_buttons[i].pressed = true
|
36
objects/hud/select_border.gd
Normal file
36
objects/hud/select_border.gd
Normal file
|
@ -0,0 +1,36 @@
|
|||
extends Button
|
||||
|
||||
|
||||
signal selected(selection)
|
||||
|
||||
|
||||
onready var back_arrow: TextureRect = $"%BorderBackArrow"
|
||||
onready var next_arrow: TextureRect = $"%BorderNextArrow"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
text = Border.names[Border.current_border]
|
||||
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_left"):
|
||||
Border.current_border -= 1
|
||||
_update()
|
||||
elif event.is_action_pressed("ui_right"):
|
||||
Border.current_border += 1
|
||||
_update()
|
||||
|
||||
|
||||
func _update() -> void:
|
||||
emit_signal("selected", Border.current_border)
|
||||
text = Border.names[Border.current_border]
|
||||
|
||||
|
||||
func _on_focus_entered() -> void:
|
||||
back_arrow.visible = true
|
||||
next_arrow.visible = true
|
||||
|
||||
|
||||
func _on_focus_exited() -> void:
|
||||
back_arrow.visible = false
|
||||
next_arrow.visible = false
|
|
@ -29,6 +29,11 @@ _global_script_classes=[ {
|
|||
"language": "GDScript",
|
||||
"path": "res://addons/godot_state_charts/parallel_state.gd"
|
||||
}, {
|
||||
"base": "HBoxContainer",
|
||||
"class": "RadioButtons",
|
||||
"language": "GDScript",
|
||||
"path": "res://objects/hud/radio_buttons.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "State",
|
||||
"language": "GDScript",
|
||||
|
@ -54,6 +59,7 @@ _global_script_class_icons={
|
|||
"CompoundState": "res://addons/godot_state_charts/compound_state.svg",
|
||||
"LevelEntry": "",
|
||||
"ParallelState": "res://addons/godot_state_charts/parallel_state.svg",
|
||||
"RadioButtons": "",
|
||||
"State": "res://addons/godot_state_charts/state.svg",
|
||||
"StateChart": "res://addons/godot_state_charts/state_chart.svg",
|
||||
"StateChartDebug": "",
|
||||
|
@ -71,10 +77,10 @@ config/icon="res://icon.png"
|
|||
[autoload]
|
||||
|
||||
Border="*res://autoloads/border.tscn"
|
||||
Audio="*res://autoloads/audio.tscn"
|
||||
Options="*res://autoloads/options.gd"
|
||||
Save="*res://autoloads/save.gd"
|
||||
Game="*res://autoloads/game.gd"
|
||||
Audio="*res://autoloads/audio.tscn"
|
||||
LevelData="*res://autoloads/level_data.tscn"
|
||||
Debug="*res://autoloads/debug.tscn"
|
||||
TouchControls="*res://autoloads/touch_controls.tscn"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue