Added main menu and settings
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*.png filter=lfs diff=lfs merge=lfs -text lockable
|
||||||
|
*.wav filter=lfs diff=lfs merge=lfs -text lockable
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[gd_resource type="AudioBusLayout" format=3 uid="uid://dcnu7cya2sckd"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
bus/1/name = &"UI"
|
||||||
|
bus/1/solo = false
|
||||||
|
bus/1/mute = false
|
||||||
|
bus/1/bypass_fx = false
|
||||||
|
bus/1/volume_db = 0.0
|
||||||
|
bus/1/send = &"Master"
|
||||||
|
bus/2/name = &"SFX"
|
||||||
|
bus/2/solo = false
|
||||||
|
bus/2/mute = false
|
||||||
|
bus/2/bypass_fx = false
|
||||||
|
bus/2/volume_db = 0.0
|
||||||
|
bus/2/send = &"Master"
|
||||||
|
bus/3/name = &"Music"
|
||||||
|
bus/3/solo = false
|
||||||
|
bus/3/mute = false
|
||||||
|
bus/3/bypass_fx = false
|
||||||
|
bus/3/volume_db = 0.0
|
||||||
|
bus/3/send = &"Master"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
extends Node2D
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c737mx0kxva7i
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://mpsu4g2b5h3a"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c737mx0kxva7i" path="res://game/levels/abstract_level.gd" id="1_o2mui"]
|
||||||
|
|
||||||
|
[node name="Level" type="Node2D"]
|
||||||
|
script = ExtResource("1_o2mui")
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
class_name CSettingsManager
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
@export var config_file_path := "user://settings.cfg"
|
||||||
|
@export var window_base_size := Vector2i(640, 360)
|
||||||
|
|
||||||
|
|
||||||
|
const CATEGORY_VIDEO = "video"
|
||||||
|
const SETTING_FULLSCREEN = "fullscreen"
|
||||||
|
const SETTING_WINDOW_FACTOR = "window_factor"
|
||||||
|
const CATEGORY_AUDIO = "audio"
|
||||||
|
const SETTING_MASTER_VOLUME = "master_volume"
|
||||||
|
const SETTING_UI_VOLUME = "ui_volume"
|
||||||
|
const SETTING_SFX_VOLUME = "sfx_volume"
|
||||||
|
const SETTING_MUSIC_VOLUME = "music_volume"
|
||||||
|
|
||||||
|
|
||||||
|
var _config: ConfigFile
|
||||||
|
|
||||||
|
var _fullscreen := false
|
||||||
|
var fullscreen : bool:
|
||||||
|
get():
|
||||||
|
return _fullscreen
|
||||||
|
set(value):
|
||||||
|
_fullscreen = value
|
||||||
|
_apply_video_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
var _window_factor := 1
|
||||||
|
var window_factor : int:
|
||||||
|
get():
|
||||||
|
return _window_factor
|
||||||
|
set(value):
|
||||||
|
_window_factor = clampi(value, 1, 5)
|
||||||
|
_apply_video_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
var _master_volume := 100
|
||||||
|
var master_volume : int:
|
||||||
|
get():
|
||||||
|
return _master_volume
|
||||||
|
set(value):
|
||||||
|
_master_volume = clampi(value, 0, 100)
|
||||||
|
_apply_audio_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
var _ui_volume := 100
|
||||||
|
var ui_volume : int:
|
||||||
|
get():
|
||||||
|
return _ui_volume
|
||||||
|
set(value):
|
||||||
|
_ui_volume = clampi(value, 0, 100)
|
||||||
|
_apply_audio_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
var _sfx_volume := 100
|
||||||
|
var sfx_volume : int:
|
||||||
|
get():
|
||||||
|
return _sfx_volume
|
||||||
|
set(value):
|
||||||
|
_sfx_volume = clampi(value, 0, 100)
|
||||||
|
_apply_audio_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
var _music_volume := 100
|
||||||
|
var music_volume : int:
|
||||||
|
get():
|
||||||
|
return _music_volume
|
||||||
|
set(value):
|
||||||
|
_music_volume = clampi(value, 0, 100)
|
||||||
|
_apply_audio_settings()
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_config = ConfigFile.new()
|
||||||
|
|
||||||
|
_load_settings()
|
||||||
|
_apply_all_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _load_settings() -> void:
|
||||||
|
if _config.load(config_file_path) == OK:
|
||||||
|
_fullscreen = _config.get_value(CATEGORY_VIDEO, SETTING_FULLSCREEN, _fullscreen)
|
||||||
|
_window_factor = _config.get_value(CATEGORY_VIDEO, SETTING_WINDOW_FACTOR, _window_factor)
|
||||||
|
|
||||||
|
_master_volume = _config.get_value(CATEGORY_AUDIO, SETTING_MASTER_VOLUME, _master_volume)
|
||||||
|
_ui_volume = _config.get_value(CATEGORY_AUDIO, SETTING_UI_VOLUME, _ui_volume)
|
||||||
|
_sfx_volume = _config.get_value(CATEGORY_AUDIO, SETTING_SFX_VOLUME, _sfx_volume)
|
||||||
|
_music_volume = _config.get_value(CATEGORY_AUDIO, SETTING_MUSIC_VOLUME, _music_volume)
|
||||||
|
|
||||||
|
_save_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _save_settings() -> void:
|
||||||
|
if _config == null:
|
||||||
|
_config = ConfigFile.new()
|
||||||
|
|
||||||
|
_config.set_value(CATEGORY_VIDEO, SETTING_FULLSCREEN, _fullscreen)
|
||||||
|
_config.set_value(CATEGORY_VIDEO, SETTING_WINDOW_FACTOR, _window_factor)
|
||||||
|
|
||||||
|
_config.set_value(CATEGORY_AUDIO, SETTING_MASTER_VOLUME, _master_volume)
|
||||||
|
_config.set_value(CATEGORY_AUDIO, SETTING_UI_VOLUME, _ui_volume)
|
||||||
|
_config.set_value(CATEGORY_AUDIO, SETTING_SFX_VOLUME, _sfx_volume)
|
||||||
|
_config.set_value(CATEGORY_AUDIO, SETTING_MUSIC_VOLUME, _music_volume)
|
||||||
|
|
||||||
|
_config.save(config_file_path)
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_all_settings() -> void:
|
||||||
|
_apply_video_settings()
|
||||||
|
_apply_audio_settings()
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_video_settings() -> void:
|
||||||
|
if _fullscreen:
|
||||||
|
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
|
||||||
|
else:
|
||||||
|
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
|
||||||
|
_apply_window_scale()
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_audio_settings() -> void:
|
||||||
|
var master_bus := AudioServer.get_bus_index(CSoundManager.MASTER_BUS)
|
||||||
|
var ui_bus := AudioServer.get_bus_index(CSoundManager.UI_BUS)
|
||||||
|
var sfx_bus := AudioServer.get_bus_index(CSoundManager.SFX_BUS)
|
||||||
|
var music_bus := AudioServer.get_bus_index(CSoundManager.MUSIC_BUS)
|
||||||
|
|
||||||
|
AudioServer.set_bus_volume_linear(master_bus, _master_volume/100.0)
|
||||||
|
AudioServer.set_bus_volume_linear(ui_bus, _ui_volume/100.0)
|
||||||
|
AudioServer.set_bus_volume_linear(sfx_bus, _sfx_volume/100.0)
|
||||||
|
AudioServer.set_bus_volume_linear(music_bus, _music_volume/100.0)
|
||||||
|
|
||||||
|
|
||||||
|
func _apply_window_scale() -> void:
|
||||||
|
if _fullscreen: return
|
||||||
|
|
||||||
|
var new_size := window_base_size * _window_factor
|
||||||
|
|
||||||
|
var current_position := DisplayServer.window_get_position()
|
||||||
|
var current_size := DisplayServer.window_get_size()
|
||||||
|
|
||||||
|
var current_center := current_position + current_size / 2
|
||||||
|
var new_position := current_center - new_size / 2
|
||||||
|
|
||||||
|
DisplayServer.window_set_size(new_size)
|
||||||
|
DisplayServer.window_set_position(new_position)
|
||||||
|
|
||||||
|
_ensure_window_on_screen()
|
||||||
|
|
||||||
|
|
||||||
|
func _ensure_window_on_screen() -> void:
|
||||||
|
if _fullscreen: return
|
||||||
|
|
||||||
|
var window_position := DisplayServer.window_get_position()
|
||||||
|
var window_size := DisplayServer.window_get_size()
|
||||||
|
var screen_size := DisplayServer.screen_get_size()
|
||||||
|
|
||||||
|
var new_x : int = clamp(window_position.x, 0, screen_size.x - window_size.x)
|
||||||
|
var new_y : int = clamp(window_position.y, 0, screen_size.y - window_size.y)
|
||||||
|
|
||||||
|
if new_x != window_position.x or new_y != window_position.y:
|
||||||
|
DisplayServer.window_set_position(Vector2i(new_x, new_y))
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://btol0m8w0msxk
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://djdt3ply0g5um"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://btol0m8w0msxk" path="res://game/managers/settings_manager.gd" id="1_4nipk"]
|
||||||
|
|
||||||
|
[node name="SettingsManager" type="Node"]
|
||||||
|
script = ExtResource("1_4nipk")
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
class_name CSoundManager
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
|
const MASTER_BUS = "Master"
|
||||||
|
const UI_BUS = "UI"
|
||||||
|
const SFX_BUS = "SFX"
|
||||||
|
const MUSIC_BUS = "Music"
|
||||||
|
|
||||||
|
|
||||||
|
@export_group("Pitch settings", "pitch")
|
||||||
|
@export_range(0.9, 1.1, 0.01) var putch_ui_min := 1.0
|
||||||
|
@export_range(0.9, 1.1, 0.01) var putch_ui_max := 1.0
|
||||||
|
@export_range(0.9, 1.1, 0.01) var putch_sfx_min := 1.0
|
||||||
|
@export_range(0.9, 1.1, 0.01) var putch_sfx_max := 1.0
|
||||||
|
|
||||||
|
@export_group("Number of players", "player_count")
|
||||||
|
@export_range(1, 10) var player_count_ui := 1
|
||||||
|
@export_range(1, 100) var player_count_sfx := 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var _ui_players : Array[AudioStreamPlayer] = []
|
||||||
|
var _sfx_players : Array[AudioStreamPlayer2D] = []
|
||||||
|
var _music_player : AudioStreamPlayer
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_create_ui_players()
|
||||||
|
_create_sfx_players()
|
||||||
|
_create_music_player()
|
||||||
|
|
||||||
|
|
||||||
|
func play_ui_stream(stream: AudioStream) -> AudioStreamPlayer:
|
||||||
|
var player := _get_free_player(_ui_players)
|
||||||
|
player.stream = stream
|
||||||
|
player.pitch_scale = randf_range(putch_ui_min, putch_ui_max)
|
||||||
|
player.play()
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func play_sfx_stream(stream: AudioStream, position: Vector2) -> AudioStreamPlayer2D:
|
||||||
|
var player := _get_free_2d_player(_sfx_players)
|
||||||
|
player.stream = stream
|
||||||
|
player.pitch_scale = randf_range(putch_ui_min, putch_ui_max)
|
||||||
|
player.position = position
|
||||||
|
player.play()
|
||||||
|
return player
|
||||||
|
|
||||||
|
|
||||||
|
func play_music_stream(stream: AudioStream) -> AudioStreamPlayer:
|
||||||
|
_music_player.stream = stream
|
||||||
|
_music_player.play()
|
||||||
|
return _music_player
|
||||||
|
|
||||||
|
|
||||||
|
func _create_ui_players() -> void:
|
||||||
|
for i in range(player_count_ui):
|
||||||
|
var player : AudioStreamPlayer = AudioStreamPlayer.new()
|
||||||
|
player.bus = UI_BUS
|
||||||
|
_ui_players.append(player)
|
||||||
|
add_child(player)
|
||||||
|
|
||||||
|
|
||||||
|
func _create_sfx_players() -> void:
|
||||||
|
for i in range(player_count_sfx):
|
||||||
|
var player : AudioStreamPlayer2D = AudioStreamPlayer2D.new()
|
||||||
|
player.bus = SFX_BUS
|
||||||
|
_sfx_players.append(player)
|
||||||
|
add_child(player)
|
||||||
|
|
||||||
|
|
||||||
|
func _create_music_player() -> void:
|
||||||
|
var player : AudioStreamPlayer = AudioStreamPlayer.new()
|
||||||
|
player.bus = MUSIC_BUS
|
||||||
|
_music_player = player
|
||||||
|
add_child(player)
|
||||||
|
|
||||||
|
|
||||||
|
func _get_free_player(players: Array[AudioStreamPlayer]) -> AudioStreamPlayer:
|
||||||
|
for player in players:
|
||||||
|
if not player.playing:
|
||||||
|
return player
|
||||||
|
return players[0]
|
||||||
|
|
||||||
|
|
||||||
|
func _get_free_2d_player(players: Array[AudioStreamPlayer2D]) -> AudioStreamPlayer2D:
|
||||||
|
for player in players:
|
||||||
|
if not player.playing:
|
||||||
|
return player
|
||||||
|
return players[0]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cx5qcukr66whc
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://drk4dvbn78dva"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cx5qcukr66whc" path="res://game/managers/sound_manager.gd" id="1_cg0sy"]
|
||||||
|
|
||||||
|
[node name="SoundManager" type="Node"]
|
||||||
|
script = ExtResource("1_cg0sy")
|
||||||
|
putch_ui_min = 0.9500000000000001
|
||||||
|
putch_ui_max = 1.05
|
||||||
|
putch_sfx_min = 0.9500000000000001
|
||||||
|
putch_sfx_max = 1.05
|
||||||
|
player_count_ui = 4
|
||||||
|
player_count_sfx = 25
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
class_name MainMenu
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
@onready var start_button : Button = $%StartButton
|
||||||
|
@onready var options_button : Button = $%OptionsButton
|
||||||
|
@onready var quit_button : Button = $%QuitButton
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_init_focus()
|
||||||
|
_setup_neighbors()
|
||||||
|
|
||||||
|
|
||||||
|
func _init_focus() -> void:
|
||||||
|
start_button.grab_focus()
|
||||||
|
|
||||||
|
|
||||||
|
func _setup_neighbors() -> void:
|
||||||
|
start_button.focus_neighbor_top = quit_button.get_path()
|
||||||
|
quit_button.focus_neighbor_bottom = start_button.get_path()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_start_button_pressed() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_options_button_pressed() -> void:
|
||||||
|
get_tree().change_scene_to_file("res://game/menu/options_menu.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_quit_button_pressed() -> void:
|
||||||
|
get_tree().quit()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c3wyvemy5hxs2
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://c4iica45gnke0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c3wyvemy5hxs2" path="res://game/menu/main_menu.gd" id="1_5d27k"]
|
||||||
|
[ext_resource type="Theme" uid="uid://bh56my8b2htnr" path="res://themes/menu.tres" id="2_qnvmd"]
|
||||||
|
[ext_resource type="Theme" uid="uid://lkf8obv8x5ve" path="res://themes/label.tres" id="3_i4f54"]
|
||||||
|
|
||||||
|
[node name="MainMenu" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_qnvmd")
|
||||||
|
script = ExtResource("1_5d27k")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 4
|
||||||
|
|
||||||
|
[node name="StartButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Start"
|
||||||
|
|
||||||
|
[node name="OptionsButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Options"
|
||||||
|
|
||||||
|
[node name="QuitButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Quit"
|
||||||
|
|
||||||
|
[node name="CopyrightLabel" type="Label" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 1
|
||||||
|
theme = ExtResource("3_i4f54")
|
||||||
|
text = "(c) Ruslan Ignatov 2026
|
||||||
|
Powered by Godot Engine"
|
||||||
|
horizontal_alignment = 2
|
||||||
|
vertical_alignment = 2
|
||||||
|
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/StartButton" to="." method="_on_start_button_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/OptionsButton" to="." method="_on_options_button_pressed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/QuitButton" to="." method="_on_quit_button_pressed"]
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
class_name OptionsMenu
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
const WINDOW_FACTOR = "window_factor"
|
||||||
|
|
||||||
|
|
||||||
|
signal back
|
||||||
|
|
||||||
|
|
||||||
|
@onready var fullscreen_button : CheckButton = $%FullscreenCheckButton
|
||||||
|
@onready var window_factor_buttons : HBoxContainer = $%WindowFactorContainer
|
||||||
|
@onready var back_button : Button = $%BackButton
|
||||||
|
@onready var master_slider : Slider = $%MasterSlider
|
||||||
|
@onready var ui_slider : Slider = $%UISlider
|
||||||
|
@onready var sfx_slider : Slider = $%SFXSlider
|
||||||
|
@onready var music_slider : Slider = $%MusicSlider
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_connect_window_factor_buttons()
|
||||||
|
_load_current_settings()
|
||||||
|
_init_focus()
|
||||||
|
_setup_neighbors()
|
||||||
|
|
||||||
|
|
||||||
|
func _play_left_sound() -> bool:
|
||||||
|
return _play_side_sound(1, 0)
|
||||||
|
|
||||||
|
|
||||||
|
func _play_right_sound() -> bool:
|
||||||
|
return _play_side_sound(0, 1)
|
||||||
|
|
||||||
|
|
||||||
|
func _play_side_sound(offset_begin: int, offset_end: int) -> bool:
|
||||||
|
for i in range(offset_begin, window_factor_buttons.get_child_count() - offset_end):
|
||||||
|
var child := window_factor_buttons.get_child(i)
|
||||||
|
if child is Button and child.has_focus():
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
|
func _connect_window_factor_buttons() -> void:
|
||||||
|
for child in window_factor_buttons.get_children():
|
||||||
|
if child is Button:
|
||||||
|
var button : Button = child
|
||||||
|
button.pressed.connect(_on_window_factor_button_pressed.bind(button))
|
||||||
|
|
||||||
|
|
||||||
|
func _on_visibility_changed() -> void:
|
||||||
|
if not is_node_ready(): return
|
||||||
|
if not visible: return
|
||||||
|
|
||||||
|
_load_current_settings()
|
||||||
|
_init_focus()
|
||||||
|
_setup_neighbors()
|
||||||
|
|
||||||
|
|
||||||
|
func _init_focus() -> void:
|
||||||
|
fullscreen_button.grab_focus()
|
||||||
|
|
||||||
|
|
||||||
|
func _setup_neighbors() -> void:
|
||||||
|
music_slider.focus_neighbor_bottom = back_button.get_path()
|
||||||
|
|
||||||
|
|
||||||
|
func _load_current_settings() -> void:
|
||||||
|
fullscreen_button.button_pressed = SettingsManager.fullscreen
|
||||||
|
for child in window_factor_buttons.get_children():
|
||||||
|
if child is Button:
|
||||||
|
var button : Button = child
|
||||||
|
var window_factor : int = button.get_meta(WINDOW_FACTOR, 0)
|
||||||
|
if window_factor == SettingsManager.window_factor:
|
||||||
|
button.button_pressed = true
|
||||||
|
_update_window_factor_disabled()
|
||||||
|
|
||||||
|
master_slider.value = SettingsManager.master_volume
|
||||||
|
ui_slider.value = SettingsManager.ui_volume
|
||||||
|
sfx_slider.value = SettingsManager.sfx_volume
|
||||||
|
music_slider.value = SettingsManager.music_volume
|
||||||
|
|
||||||
|
|
||||||
|
func _update_window_factor_disabled() -> void:
|
||||||
|
for child in window_factor_buttons.get_children():
|
||||||
|
if not child is Button: continue
|
||||||
|
child.disabled = SettingsManager.fullscreen
|
||||||
|
child.focus_mode = Control.FOCUS_NONE if SettingsManager.fullscreen else Control.FOCUS_ALL
|
||||||
|
|
||||||
|
|
||||||
|
func _on_fullscreen_check_button_toggled(toggled: bool) -> void:
|
||||||
|
SettingsManager.fullscreen = toggled
|
||||||
|
_update_window_factor_disabled()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_back_button_pressed() -> void:
|
||||||
|
get_tree().change_scene_to_file("res://game/menu/main_menu.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func _on_window_factor_button_pressed(button: Button) -> void:
|
||||||
|
var window_factor : int = button.get_meta(WINDOW_FACTOR, 0)
|
||||||
|
if window_factor > 0:
|
||||||
|
SettingsManager.window_factor = window_factor
|
||||||
|
|
||||||
|
|
||||||
|
func _on_master_volume_changed(value: float) -> void:
|
||||||
|
SettingsManager.master_volume = floor(value)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_ui_volume_changed(value: float) -> void:
|
||||||
|
SettingsManager.ui_volume = floor(value)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_sfx_volume_changed(value: float) -> void:
|
||||||
|
SettingsManager.sfx_volume = floor(value)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_music_volume_changed(value: float) -> void:
|
||||||
|
SettingsManager.music_volume = floor(value)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cesv42oxhq2px
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
[gd_scene load_steps=5 format=3 uid="uid://b0uhlmrggp8xx"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cesv42oxhq2px" path="res://game/menu/options_menu.gd" id="1_lq2ks"]
|
||||||
|
[ext_resource type="Theme" uid="uid://bh56my8b2htnr" path="res://themes/menu.tres" id="2_e2bp2"]
|
||||||
|
|
||||||
|
[sub_resource type="InputEventAction" id="InputEventAction_e2bp2"]
|
||||||
|
action = &"ui_cancel"
|
||||||
|
|
||||||
|
[sub_resource type="Shortcut" id="Shortcut_j72d6"]
|
||||||
|
events = [SubResource("InputEventAction_e2bp2")]
|
||||||
|
|
||||||
|
[node name="OptionsMenu" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_e2bp2")
|
||||||
|
script = ExtResource("1_lq2ks")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("2_e2bp2")
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_constants/h_separation = 12
|
||||||
|
theme_override_constants/v_separation = 17
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="FullscreenLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="FullscreenCheckButton" type="CheckButton" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Fullscreen"
|
||||||
|
|
||||||
|
[node name="WindowFactorLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Window
|
||||||
|
factor"
|
||||||
|
|
||||||
|
[node name="WindowFactorContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ButtonX1" type="Button" parent="MarginContainer/VBoxContainer/GridContainer/WindowFactorContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "*1"
|
||||||
|
metadata/window_factor = 1
|
||||||
|
|
||||||
|
[node name="ButtonX2" type="Button" parent="MarginContainer/VBoxContainer/GridContainer/WindowFactorContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "*2"
|
||||||
|
metadata/window_factor = 2
|
||||||
|
|
||||||
|
[node name="ButtonX3" type="Button" parent="MarginContainer/VBoxContainer/GridContainer/WindowFactorContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "*3"
|
||||||
|
metadata/window_factor = 3
|
||||||
|
|
||||||
|
[node name="ButtonX4" type="Button" parent="MarginContainer/VBoxContainer/GridContainer/WindowFactorContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "*4"
|
||||||
|
metadata/window_factor = 4
|
||||||
|
|
||||||
|
[node name="ButtonX5" type="Button" parent="MarginContainer/VBoxContainer/GridContainer/WindowFactorContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "*5"
|
||||||
|
metadata/window_factor = 5
|
||||||
|
|
||||||
|
[node name="MasterLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Master"
|
||||||
|
|
||||||
|
[node name="MasterSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
step = 10.0
|
||||||
|
value = 50.0
|
||||||
|
tick_count = 11
|
||||||
|
ticks_on_borders = true
|
||||||
|
ticks_position = 3
|
||||||
|
|
||||||
|
[node name="UILabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "UI"
|
||||||
|
|
||||||
|
[node name="UISlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
step = 10.0
|
||||||
|
tick_count = 11
|
||||||
|
ticks_on_borders = true
|
||||||
|
ticks_position = 3
|
||||||
|
|
||||||
|
[node name="SFXLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "SFX"
|
||||||
|
|
||||||
|
[node name="SFXSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
step = 10.0
|
||||||
|
tick_count = 11
|
||||||
|
ticks_on_borders = true
|
||||||
|
ticks_position = 3
|
||||||
|
|
||||||
|
[node name="MusicLabel" type="Label" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Music"
|
||||||
|
|
||||||
|
[node name="MusicSlider" type="HSlider" parent="MarginContainer/VBoxContainer/GridContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
step = 10.0
|
||||||
|
tick_count = 11
|
||||||
|
ticks_on_borders = true
|
||||||
|
ticks_position = 3
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="BackButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
shortcut = SubResource("Shortcut_j72d6")
|
||||||
|
text = "Back"
|
||||||
|
|
||||||
|
[connection signal="toggled" from="MarginContainer/VBoxContainer/GridContainer/FullscreenCheckButton" to="." method="_on_fullscreen_check_button_toggled"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/GridContainer/MasterSlider" to="." method="_on_master_volume_changed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/GridContainer/UISlider" to="." method="_on_ui_volume_changed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/GridContainer/SFXSlider" to="." method="_on_sfx_volume_changed"]
|
||||||
|
[connection signal="value_changed" from="MarginContainer/VBoxContainer/GridContainer/MusicSlider" to="." method="_on_music_volume_changed"]
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer/BackButton" to="." method="_on_back_button_pressed"]
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
class_name BWObject
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
@export var is_colored := true
|
||||||
|
@export var is_white := true
|
||||||
|
|
||||||
|
|
||||||
|
func invert() -> void:
|
||||||
|
is_white = not is_white
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b7qut5xhc5hxo
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bgtb7602a2260"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b7qut5xhc5hxo" path="res://game/objects/b_w_object.gd" id="1_jpa1b"]
|
||||||
|
|
||||||
|
[node name="BlackAndWhiteObject" type="Node2D"]
|
||||||
|
script = ExtResource("1_jpa1b")
|
||||||
|
|
||||||
|
[node name="Black" type="Node2D" parent="."]
|
||||||
|
|
||||||
|
[node name="White" type="Node2D" parent="."]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 995 B |
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://25jplsnkf61p"
|
||||||
|
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.svg"
|
||||||
|
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,25 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_image"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://b7myfapuyueyy"
|
||||||
|
path="res://.godot/imported/font16.png-8508fb402c2297494648b96d293d0e34.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/fonts/font16.png"
|
||||||
|
dest_files=["res://.godot/imported/font16.png-8508fb402c2297494648b96d293d0e34.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
character_ranges=PackedStringArray("\' \'-\'~\'")
|
||||||
|
kerning_pairs=PackedStringArray()
|
||||||
|
columns=94
|
||||||
|
rows=1
|
||||||
|
image_margin=Rect2i(0, 0, 0, 0)
|
||||||
|
character_margin=Rect2i(0, 0, 0, 0)
|
||||||
|
ascent=0
|
||||||
|
descent=0
|
||||||
|
fallbacks=[]
|
||||||
|
compress=true
|
||||||
|
scaling_mode=0
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,25 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_image"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://dxal4vyl0jy4c"
|
||||||
|
path="res://.godot/imported/font8.png-d37c339899adda35b5ea0bd08bc26657.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/fonts/font8.png"
|
||||||
|
dest_files=["res://.godot/imported/font8.png-d37c339899adda35b5ea0bd08bc26657.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
character_ranges=PackedStringArray("\' \'-\'~\'")
|
||||||
|
kerning_pairs=PackedStringArray()
|
||||||
|
columns=94
|
||||||
|
rows=1
|
||||||
|
image_margin=Rect2i(0, 0, 0, 0)
|
||||||
|
character_margin=Rect2i(0, 0, 0, 0)
|
||||||
|
ascent=0
|
||||||
|
descent=0
|
||||||
|
fallbacks=[]
|
||||||
|
compress=true
|
||||||
|
scaling_mode=0
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cw83q4jr80n4d"
|
||||||
|
path="res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/menu/buttons.png"
|
||||||
|
dest_files=["res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=5
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="OneBitGameJam8"
|
||||||
|
run/main_scene="uid://c4iica45gnke0"
|
||||||
|
config/features=PackedStringArray("4.5", "GL Compatibility")
|
||||||
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
[autoload]
|
||||||
|
|
||||||
|
SettingsManager="*res://game/managers/settings_manager.tscn"
|
||||||
|
SoundManager="*res://game/managers/sound_manager.tscn"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=640
|
||||||
|
window/size/viewport_height=360
|
||||||
|
window/stretch/mode="viewport"
|
||||||
|
window/stretch/scale_mode="integer"
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
ui_accept={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_cancel={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_left={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_right={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_up={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_down={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
textures/canvas_textures/default_texture_filter=0
|
||||||
|
renderer/rendering_method="gl_compatibility"
|
||||||
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://lkf8obv8x5ve"]
|
||||||
|
|
||||||
|
[ext_resource type="FontFile" uid="uid://dxal4vyl0jy4c" path="res://images/fonts/font8.png" id="1_uq1ai"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = ExtResource("1_uq1ai")
|
||||||
@@ -0,0 +1,195 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=31 format=3 uid="uid://bh56my8b2htnr"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cw83q4jr80n4d" path="res://images/menu/buttons.png" id="1_6tgry"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://b7myfapuyueyy" path="res://images/fonts/font16.png" id="1_xavh1"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_xavh1"]
|
||||||
|
texture = ExtResource("1_6tgry")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(0, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_im3bc"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_pw0cd"]
|
||||||
|
texture = SubResource("CompressedTexture2D_im3bc")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(16, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_6tgry"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_im3bc"]
|
||||||
|
texture = SubResource("CompressedTexture2D_6tgry")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(16, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_rukvw"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_0mtrw"]
|
||||||
|
texture = SubResource("CompressedTexture2D_rukvw")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(16, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_pw0cd"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rukvw"]
|
||||||
|
texture = SubResource("CompressedTexture2D_pw0cd")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(0, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_be6oh"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_cg3em"]
|
||||||
|
texture = SubResource("CompressedTexture2D_be6oh")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 6.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 6.0
|
||||||
|
region_rect = Rect2(0, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6tgry"]
|
||||||
|
atlas = ExtResource("1_6tgry")
|
||||||
|
region = Rect2(112, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_im3bc"]
|
||||||
|
atlas = ExtResource("1_6tgry")
|
||||||
|
region = Rect2(112, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_0mtrw"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_be6oh"]
|
||||||
|
atlas = SubResource("CompressedTexture2D_0mtrw")
|
||||||
|
region = Rect2(128, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_cg3em"]
|
||||||
|
atlas = SubResource("CompressedTexture2D_0mtrw")
|
||||||
|
region = Rect2(128, 0, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pw0cd"]
|
||||||
|
atlas = ExtResource("1_6tgry")
|
||||||
|
region = Rect2(112, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_cg3em"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2yrsw"]
|
||||||
|
atlas = SubResource("CompressedTexture2D_cg3em")
|
||||||
|
region = Rect2(128, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_hd55h"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bpsgu"]
|
||||||
|
atlas = SubResource("CompressedTexture2D_hd55h")
|
||||||
|
region = Rect2(144, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_cloxk"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fbcv1"]
|
||||||
|
atlas = SubResource("CompressedTexture2D_cloxk")
|
||||||
|
region = Rect2(160, 32, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_pwq8t"]
|
||||||
|
texture = ExtResource("1_6tgry")
|
||||||
|
texture_margin_left = 2.0
|
||||||
|
texture_margin_top = 1.0
|
||||||
|
texture_margin_right = 2.0
|
||||||
|
texture_margin_bottom = 1.0
|
||||||
|
region_rect = Rect2(144, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_ydsdf"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_l4uxn"]
|
||||||
|
texture = SubResource("CompressedTexture2D_ydsdf")
|
||||||
|
texture_margin_left = 3.0
|
||||||
|
texture_margin_top = 5.0
|
||||||
|
texture_margin_right = 3.0
|
||||||
|
texture_margin_bottom = 5.0
|
||||||
|
region_rect = Rect2(160, 16, 16, 16)
|
||||||
|
|
||||||
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_8ha7l"]
|
||||||
|
load_path = "res://.godot/imported/buttons.png-ee0aaf8a4bfe900c7d5c12efe95cc11b.ctex"
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_6w2m0"]
|
||||||
|
texture = SubResource("CompressedTexture2D_8ha7l")
|
||||||
|
texture_margin_left = 3.0
|
||||||
|
texture_margin_top = 7.0
|
||||||
|
texture_margin_right = 3.0
|
||||||
|
texture_margin_bottom = 7.0
|
||||||
|
expand_margin_top = 1.0
|
||||||
|
expand_margin_bottom = 1.0
|
||||||
|
region_rect = Rect2(144, 0, 32, 16)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = ExtResource("1_xavh1")
|
||||||
|
Button/colors/font_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/font_disabled_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/font_focus_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/font_hover_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/font_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/font_outline_color = Color(0, 0, 0, 1)
|
||||||
|
Button/colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_disabled_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||||
|
Button/colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
Button/styles/disabled = SubResource("StyleBoxTexture_xavh1")
|
||||||
|
Button/styles/focus = SubResource("StyleBoxTexture_pw0cd")
|
||||||
|
Button/styles/hover = SubResource("StyleBoxTexture_im3bc")
|
||||||
|
Button/styles/hover_pressed = SubResource("StyleBoxTexture_0mtrw")
|
||||||
|
Button/styles/normal = SubResource("StyleBoxTexture_rukvw")
|
||||||
|
Button/styles/pressed = SubResource("StyleBoxTexture_cg3em")
|
||||||
|
CheckButton/colors/button_checked_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/button_unchecked_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_disabled_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_focus_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_hover_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/font_outline_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||||
|
CheckButton/colors/icon_disabled_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/icon_focus_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/icon_hover_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/icon_hover_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/icon_normal_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/colors/icon_pressed_color = Color(0, 0, 0, 1)
|
||||||
|
CheckButton/icons/checked = SubResource("AtlasTexture_6tgry")
|
||||||
|
CheckButton/icons/checked_disabled = SubResource("AtlasTexture_im3bc")
|
||||||
|
CheckButton/icons/unchecked = SubResource("AtlasTexture_be6oh")
|
||||||
|
CheckButton/icons/unchecked_disabled = SubResource("AtlasTexture_cg3em")
|
||||||
|
HSlider/icons/grabber = SubResource("AtlasTexture_pw0cd")
|
||||||
|
HSlider/icons/grabber_disabled = SubResource("AtlasTexture_2yrsw")
|
||||||
|
HSlider/icons/grabber_highlight = SubResource("AtlasTexture_bpsgu")
|
||||||
|
HSlider/icons/tick = SubResource("AtlasTexture_fbcv1")
|
||||||
|
HSlider/styles/grabber_area = SubResource("StyleBoxTexture_pwq8t")
|
||||||
|
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxTexture_l4uxn")
|
||||||
|
HSlider/styles/slider = SubResource("StyleBoxTexture_6w2m0")
|
||||||
|
MarginContainer/constants/margin_bottom = 10
|
||||||
|
MarginContainer/constants/margin_left = 10
|
||||||
|
MarginContainer/constants/margin_right = 10
|
||||||
|
MarginContainer/constants/margin_top = 10
|
||||||
Reference in New Issue
Block a user