option for speccy help
This commit is contained in:
parent
dce789752f
commit
bc234930b0
4 changed files with 43 additions and 7 deletions
|
@ -19,6 +19,7 @@ const TRANS_SPEEDS := [0.8, 0.4, 0.2, 0.0000001]
|
|||
var rumble: int = RumbleMode.FULL
|
||||
var gore: int = Gore.FULL
|
||||
var speedrun_timer: bool = false setget _set_speedrun_timer
|
||||
var speccy_help: bool = false
|
||||
var scoreboard_name: String = "" setget _set_scoreboard_name
|
||||
var scoreboard_id: int = -1
|
||||
|
||||
|
@ -66,6 +67,7 @@ func load_options() -> void:
|
|||
rumble = file.get_value("game", "rumble", defaults.rumble)
|
||||
gore = file.get_value("game", "gore", defaults.gore)
|
||||
_set_speedrun_timer(file.get_value("game", "speedrun_timer", defaults.speedrun_timer))
|
||||
speccy_help = file.get_value("game", "speccy_help", defaults.speccy_help)
|
||||
_set_scoreboard_name(file.get_value("game", "scoreboard_name", ""))
|
||||
randomize()
|
||||
scoreboard_id = file.get_value("game", "scoreboard_id", randi())
|
||||
|
@ -90,6 +92,7 @@ func load_defaults(section: int = Section.ALL) -> void:
|
|||
rumble = defaults.rumble
|
||||
gore = defaults.gore
|
||||
speedrun_timer = defaults.speedrun_timer
|
||||
speccy_help = defaults.speccy_help
|
||||
scoreboard_name = defaults.scoreboard_name
|
||||
scoreboard_id = randi()
|
||||
Section.VIDEO, Section.ALL:
|
||||
|
@ -111,6 +114,7 @@ func save_options() -> void:
|
|||
file.set_value("game", "rumble", rumble)
|
||||
file.set_value("game", "gore", gore)
|
||||
file.set_value("game", "speedrun_timer", speedrun_timer)
|
||||
file.set_value("game", "speccy_help", speccy_help)
|
||||
file.set_value("game", "scoreboard_name", scoreboard_name)
|
||||
file.set_value("game", "scoreboard_id", scoreboard_id)
|
||||
#Video
|
||||
|
|
|
@ -14,6 +14,7 @@ onready var select_tab: HBoxContainer = $"%SelectTab"
|
|||
onready var rumble: HBoxContainer = $"%SelectRumble"
|
||||
onready var gore: HBoxContainer = $"%SelectGore"
|
||||
onready var speedrun_timer: HBoxContainer = $"%SelectSpeedrunTimer"
|
||||
onready var speccy_help: HBoxContainer = $"%SelectSpeccyHelp"
|
||||
onready var fullscreen: HBoxContainer = $"%SelectFullscreen"
|
||||
onready var window_size: HBoxContainer = $"%SelectWindowSize"
|
||||
onready var scaling: HBoxContainer = $"%SelectScaling"
|
||||
|
@ -49,6 +50,7 @@ func _init_values() -> void:
|
|||
rumble.selection = Options.rumble
|
||||
gore.selection = Options.gore
|
||||
speedrun_timer.selection = 1 if Options.speedrun_timer else 0
|
||||
speccy_help.selection = 1 if Options.speccy_help else 0
|
||||
# video
|
||||
fullscreen.selection = 1 if Options.fullscreen else 0
|
||||
window_size.selection = int(Options.window_size) - 1
|
||||
|
@ -86,6 +88,9 @@ func _on_Gore_selected(selection) -> void:
|
|||
func _on_SelectSpeedrunTimer_selected(selection) -> void:
|
||||
Options.speedrun_timer = selection == 1
|
||||
|
||||
func _on_SelectSpeccyHelp_selected(selection) -> void:
|
||||
Options.speccy_help = selection == 1
|
||||
|
||||
|
||||
#
|
||||
# VIDEO
|
||||
|
|
|
@ -180,21 +180,46 @@ text = "Speedrun Timer:"
|
|||
|
||||
[node name="SelectSpeedrunTimer" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/SpeedrunTimer"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 109.0
|
||||
margin_right = 218.0
|
||||
margin_left = 144.0
|
||||
margin_right = 183.0
|
||||
margin_bottom = 12.0
|
||||
focus_neighbour_top = NodePath("../../Gore/SelectGore")
|
||||
focus_neighbour_bottom = NodePath("../../SpeccyHelp/SelectSpeccyHelp")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
script = ExtResource( 3 )
|
||||
condense = true
|
||||
options = [ "off", "on" ]
|
||||
|
||||
[node name="SpeccyHelp" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game"]
|
||||
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/Game/SpeccyHelp"]
|
||||
margin_top = 1.0
|
||||
margin_right = 119.0
|
||||
margin_bottom = 11.0
|
||||
text = "Help from speccy:"
|
||||
|
||||
[node name="SelectSpeccyHelp" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/SpeccyHelp"]
|
||||
unique_name_in_owner = true
|
||||
margin_left = 151.0
|
||||
margin_right = 190.0
|
||||
margin_bottom = 12.0
|
||||
focus_neighbour_top = NodePath("../../SpeedrunTimer/SelectSpeedrunTimer")
|
||||
focus_neighbour_bottom = NodePath("../../ScoreBoardName/PlayerNameInput")
|
||||
focus_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_horizontal = 6
|
||||
script = ExtResource( 3 )
|
||||
condense = true
|
||||
options = [ "off", "on" ]
|
||||
|
||||
[node name="ScoreBoardName" type="HBoxContainer" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game"]
|
||||
margin_top = 48.0
|
||||
margin_top = 64.0
|
||||
margin_right = 218.0
|
||||
margin_bottom = 58.0
|
||||
margin_bottom = 74.0
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName"]
|
||||
margin_right = 112.0
|
||||
|
@ -206,7 +231,7 @@ margin_left = 130.0
|
|||
margin_right = 203.0
|
||||
margin_bottom = 10.0
|
||||
rect_min_size = Vector2( 73, 0 )
|
||||
focus_neighbour_top = NodePath("../../SpeedrunTimer/SelectSpeedrunTimer")
|
||||
focus_neighbour_top = NodePath("../../SpeccyHelp/SelectSpeccyHelp")
|
||||
size_flags_horizontal = 6
|
||||
custom_constants/line_spacing = 0
|
||||
custom_styles/focus = SubResource( 5 )
|
||||
|
@ -889,6 +914,7 @@ align = 1
|
|||
[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/Game/SpeedrunTimer/SelectSpeedrunTimer" to="." method="_on_SelectSpeedrunTimer_selected"]
|
||||
[connection signal="selected" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/SpeccyHelp/SelectSpeccyHelp" to="." method="_on_SelectSpeccyHelp_selected"]
|
||||
[connection signal="focus_entered" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" to="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" method="_on_focus_entered"]
|
||||
[connection signal="focus_exited" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" to="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" method="_on_focus_exited"]
|
||||
[connection signal="gui_input" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" to="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/Tabs/Game/ScoreBoardName/PlayerNameInput" method="_on_gui_input"]
|
||||
|
|
|
@ -17,7 +17,8 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func appear() -> void:
|
||||
$AnimationPlayer.play("fun")
|
||||
if Options.speccy_help:
|
||||
$AnimationPlayer.play("fun")
|
||||
|
||||
|
||||
func switch_action() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue