diff --git a/global.gd b/global.gd index 948c027..eb37fd5 100644 --- a/global.gd +++ b/global.gd @@ -50,7 +50,7 @@ var firstrun const musictracks = ["res://music/midorinoyume.ogg", "res://music/seahorse.ogg", "res://music/chinesegoat.ogg", "res://music/doyoufeelold.ogg", "res://music/doyiuneedahealer.ogg", "res://music/adayatceres.ogg", "res://music/twintroublemakers.ogg", "res://music/easyquiz.ogg", "res://music/neowave.ogg", "res://music/multivectorsubmarines.ogg", "res://music/halfgeniegirls.ogg", "res://music/rusianmaverickfairy.ogg", "res://music/blacksmithofdestruction.ogg", "res://music/shininglikefireworks.ogg", "res://music/sadtrashcan.ogg", "res://music/akikoletter.ogg", "res://music/asadcat.ogg", "res://music/lilydesire.ogg", "res://music/scholartrip.ogg", "res://music/quantumice.ogg", "res://music/unreeeal.ogg", "res://music/alsa.ogg", "res://music/silverblue.ogg"] const sfxtracks = ["res://sfx/braindamage.wav", "res://sfx/gaugefill.wav", "res://sfx/boomboombakudan.wav"] var debug = false -const release = "R0.1.11-alpha" +const release = "R0.1.11-dev" var sk = false var gamepad = 0 var quest = [0, 0, 0, 0, 0, 0] diff --git a/levels/Cutscenes/unfunaversary/firstclass.gd b/levels/Cutscenes/unfunaversary/firstclass.gd index 7a25aa1..e9610fa 100644 --- a/levels/Cutscenes/unfunaversary/firstclass.gd +++ b/levels/Cutscenes/unfunaversary/firstclass.gd @@ -4,7 +4,7 @@ extends Node2D # Called when the node enters the scene tree for the first time. func _ready() -> void: if !Global.debug: - Global.cplace = [0, 0, 0] + Global.cplace = [0, 0, 0]W # Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/levels/ui/debug.gd b/levels/ui/debug.gd index 74285fb..e22bf3e 100644 --- a/levels/ui/debug.gd +++ b/levels/ui/debug.gd @@ -53,7 +53,7 @@ func _on_sound_test_pressed(): func _on_back_pressed(): Global.debug = false - get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn") + get_tree().change_scene_to_file("res://levels/ui/settings.tscn") func _on_gamepad_test_pressed(): diff --git a/levels/ui/settings.gd b/levels/ui/settings.gd new file mode 100644 index 0000000..e5b3216 --- /dev/null +++ b/levels/ui/settings.gd @@ -0,0 +1,91 @@ +extends Control +const gamepadtest = preload("res://gamepad.gd") +var vsync +var fullscreen +var xw +var gldrv +func _ready(): + vsync = $VBoxContainer/L20 + fullscreen = $VBoxContainer/Lilytest + xw = $VBoxContainer/Dialogtest + gldrv = $VBoxContainer/Bullethell + #Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + $VBoxContainer/L20.grab_focus() + if DisplayServer.window_get_vsync_mode() == 1: + vsync.set_text(tr("SETTING_VSYNCT")) + else: + vsync.set_text(tr("SETTING_VSYNCF")) + if DisplayServer.window_get_mode() == 3: + fullscreen.set_text(tr("SETTING_FULLSCREEN")) + else: + fullscreen.set_text(tr("SETTING_WINDOWED")) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + +func _level(): + # This is like autoloading the scene, only + # it happens after already loading the main scene. + get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn") + #Global.live = 1 + #Global.gamelevel = randi() % 3 + #if Global.gamelevel == 0: + # get_tree().change_scene_to_file("res://backgounds/galaxy.tscn") + #elif Global.gamelevel == 1: + # get_tree().change_scene_to_file("res://backgounds/wormhole.tscn") + #else: + # get_tree().change_scene_to_file("res://backgounds/abstract.tscn") + #get_tree().root.add_child(title) + #get_tree().root.remove_child(boot) + #boot.queue_free() + +func _input(event): + gamepadtest.new(event) + # Mouse in viewport coordinates. + if Input.is_action_just_pressed("ui_cancel"): + _on_back_pressed() + #print("Mouse Click/Unclick at: ", event.position) +# if highlighted == 1: +# _on_debug_pressed() +# if highlighted == 2: +# _on_exit_pressed() +# else: +# _on_start_pressed() +# elif Input.is_action_pressed("ui_up"): +# focus_next + + + + + + +func _on_back_pressed(): + get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn") + + +func _on_l_20_pressed(): + if DisplayServer.window_get_vsync_mode() == 1: + DisplayServer.window_set_vsync_mode(0) + vsync.set_text(tr("SETTING_VSYNCF")) + else: + DisplayServer.window_set_vsync_mode(1) + vsync.set_text(tr("SETTING_VSYNCT")) + + +func _on_lilytest_pressed() -> void: + if DisplayServer.window_get_mode() == 3: + DisplayServer.window_set_mode(0) + fullscreen.set_text(tr("SETTING_WINDOWED")) + else: + DisplayServer.window_set_mode(3) + fullscreen.set_text(tr("SETTING_FULLSCREEN")) + + +func _on_dialogtest_pressed() -> void: + get_tree().change_scene_to_file("res://levels/ui/debug.tscn") + + +func _on_bullethell_pressed() -> void: + pass diff --git a/levels/ui/settings.tscn b/levels/ui/settings.tscn new file mode 100644 index 0000000..bfab99a --- /dev/null +++ b/levels/ui/settings.tscn @@ -0,0 +1,100 @@ +[gd_scene load_steps=6 format=3 uid="uid://c30jrya5fjras"] + +[ext_resource type="Script" path="res://levels/ui/settings.gd" id="1_7pd0a"] +[ext_resource type="Texture2D" uid="uid://bxa27c7gnivwx" path="res://backgounds/night-sky-at-ceres.jpg" id="2_pw0o8"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_4donf"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6u0xs"] +bg_color = Color(0, 0.8, 0, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r2qrn"] +bg_color = Color(0, 0.8, 0, 1) + +[node name="Settings" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_7pd0a") + +[node name="Night Sky" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 1280.0 +offset_bottom = 720.0 +texture = ExtResource("2_pw0o8") + +[node name="Game name" type="Label" parent="."] +layout_mode = 0 +offset_left = 35.0 +offset_top = 3.0 +offset_right = 1235.0 +offset_bottom = 73.0 +theme_override_font_sizes/font_size = 40 +text = "BUTTON_SETTINGS" +horizontal_alignment = 1 + +[node name="Bottomhud" parent="." instance=ExtResource("3_4donf")] +layout_mode = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -139.0 +offset_top = -395.0 +offset_right = 139.0 +grow_horizontal = 2 +grow_vertical = 0 + +[node name="L20" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "CERES_L20_DESC" + +[node name="Lilytest" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "MENU_MAP" + +[node name="Dialogtest" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "BUTTON_DEBUG" + +[node name="Bullethell" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "BUTTON_PLACEHOLDER" + +[node name="Credits" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "BUTTON_PLACEHOLDER" + +[node name="WIP" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") +text = "BUTTON_PLACEHOLDER" + +[node name="Back" type="Button" parent="VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 32 +theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn") +text = "BUTTON_RETURN" + +[connection signal="pressed" from="VBoxContainer/L20" to="." method="_on_l_20_pressed"] +[connection signal="pressed" from="VBoxContainer/Lilytest" to="." method="_on_lilytest_pressed"] +[connection signal="pressed" from="VBoxContainer/Dialogtest" to="." method="_on_dialogtest_pressed"] +[connection signal="pressed" from="VBoxContainer/Bullethell" to="." method="_on_bullethell_pressed"] +[connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"] diff --git a/levels/ui/tmenu.gd b/levels/ui/tmenu.gd index 9924a0a..cd772fc 100644 --- a/levels/ui/tmenu.gd +++ b/levels/ui/tmenu.gd @@ -56,7 +56,7 @@ func _on_start_pressed(): func _on_debug_pressed(): - get_tree().change_scene_to_file("res://levels/ui/debug.tscn") + get_tree().change_scene_to_file("res://levels/ui/settings.tscn") func _on_exit_pressed(): diff --git a/levels/ui/tmenu.tscn b/levels/ui/tmenu.tscn index b8ac746..03c19e1 100644 --- a/levels/ui/tmenu.tscn +++ b/levels/ui/tmenu.tscn @@ -64,7 +64,7 @@ text = "BUTTON_START" layout_mode = 2 theme_override_font_sizes/font_size = 80 theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs") -text = "BUTTON_DEBUG" +text = "BUTTON_SETTINGS" [node name="Savefile" type="Button" parent="VBoxContainer"] layout_mode = 2 diff --git a/text.csv b/text.csv index e729380..5fc591f 100644 --- a/text.csv +++ b/text.csv @@ -32,6 +32,11 @@ START_THISFIRST;Try this First;Prueba Esto Primero;まずはこれを試して START_CHALLENGE;True Challenge;Reto Verdadero;真の挑戦 START_MANIAC;Maniac;Maniático;一事狂 BUTTON_RETURN;Return;Atrás;戻る +BUTTON_SETTINGS;Settings;Ajustes;設定 +SETTING_VSYNCT;V-Sync On;Sincronización Vertical Activada;垂直同期オン +SETTING_VSYNCF;V-Sync Off;Sincronización Vertical Desactivada;垂直同期オフ +SETTING_FULLSCREEN;Fullscreen;Pantalla Completa;全画面表示 +SETTING_WINDOWED;Window;Ventana;ウィンドウ BUTTON_GAMEPADTEST;Gamepad Test;Prueba de mando;ゲームパッドテスト BUTTON_SCENESELECT;Scene Selector;Selector de escena;シーンセレクター BUTTON_SOUNDTEST;Sound Test;Prueba de sonido;サウンドテスト