Removed exit button and video settings for web build
This commit is contained in:
@@ -114,6 +114,8 @@ func _apply_all_settings() -> void:
|
||||
|
||||
|
||||
func _apply_video_settings() -> void:
|
||||
if OS.get_name() == "Web": return
|
||||
|
||||
if _fullscreen:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
||||
else:
|
||||
|
||||
@@ -8,10 +8,19 @@ extends Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if OS.get_name() == "Web":
|
||||
_setup_for_web()
|
||||
|
||||
start_button.grab_focus()
|
||||
get_viewport().gui_focus_changed.connect(_on_gui_focus_changed)
|
||||
|
||||
|
||||
func _setup_for_web() -> void:
|
||||
quit_button.hide()
|
||||
start_button.focus_neighbor_top = options_button.get_path()
|
||||
options_button.focus_neighbor_bottom = start_button.get_path()
|
||||
|
||||
|
||||
func _on_gui_focus_changed(_node: Control) -> void:
|
||||
SoundManager.play_ui_stream(SoundManager.ui_stream_select)
|
||||
|
||||
|
||||
@@ -18,15 +18,29 @@ var _play_sound := false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
_load_current_settings()
|
||||
_connect_window_factor_buttons()
|
||||
|
||||
fullscreen_button.grab_focus()
|
||||
|
||||
if OS.get_name() == "Web":
|
||||
_setup_for_web()
|
||||
master_slider.grab_focus()
|
||||
|
||||
_play_sound = true
|
||||
get_viewport().gui_focus_changed.connect(_on_gui_focus_changed)
|
||||
|
||||
|
||||
func _setup_for_web() -> void:
|
||||
$%FullscreenLabel.hide()
|
||||
$%WindowFactorLabel.hide()
|
||||
fullscreen_button.hide()
|
||||
window_factor_buttons.hide()
|
||||
master_slider.focus_neighbor_top = back_button.get_path()
|
||||
back_button.focus_neighbor_bottom = master_slider.get_path()
|
||||
|
||||
|
||||
func _connect_window_factor_buttons() -> void:
|
||||
for child in window_factor_buttons.get_children():
|
||||
if child is Button:
|
||||
|
||||
@@ -40,6 +40,7 @@ theme_override_constants/v_separation = 17
|
||||
columns = 2
|
||||
|
||||
[node name="FullscreenLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FullscreenCheckButton" type="CheckButton" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
@@ -49,6 +50,7 @@ focus_neighbor_top = NodePath("../../HBoxContainer/BackButton")
|
||||
text = "Fullscreen"
|
||||
|
||||
[node name="WindowFactorLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Window
|
||||
factor"
|
||||
@@ -88,6 +90,7 @@ text = "Master"
|
||||
|
||||
[node name="MasterSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
step = 10.0
|
||||
value = 50.0
|
||||
@@ -101,6 +104,7 @@ text = "UI"
|
||||
|
||||
[node name="UISlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
step = 10.0
|
||||
tick_count = 11
|
||||
@@ -113,6 +117,7 @@ text = "SFX"
|
||||
|
||||
[node name="SFXSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
step = 10.0
|
||||
tick_count = 11
|
||||
@@ -125,6 +130,7 @@ text = "Music"
|
||||
|
||||
[node name="MusicSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
step = 10.0
|
||||
tick_count = 11
|
||||
|
||||
Reference in New Issue
Block a user