ajout de panneaux de contrôles, de paramètres et refactorisation de la gestion de l'audio

This commit is contained in:
2025-11-22 15:10:41 +01:00
parent dbe8f03531
commit 435415363c
171 changed files with 2165 additions and 922 deletions

View File

@@ -1,11 +1,9 @@
[gd_scene load_steps=13 format=3 uid="uid://fnv0qhkh40mv"]
[gd_scene load_steps=11 format=3 uid="uid://fnv0qhkh40mv"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_0ssee"]
[ext_resource type="Script" uid="uid://bvb4v66bqteuc" path="res://gui/game/announce/scripts/announce.gd" id="1_4evne"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_yrhd4"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_7nrno"]
[ext_resource type="AudioStream" uid="uid://ccq04ahrwr3bv" path="res://gui/game/announce/assets/sfx/alarm.wav" id="5_iwcrn"]
[ext_resource type="AudioStream" uid="uid://d1cpi438ep0ys" path="res://gui/game/announce/assets/sfx/quota_announcement.wav" id="6_oh30d"]
[sub_resource type="LabelSettings" id="LabelSettings_vbart"]
font = ExtResource("2_yrhd4")
@@ -162,13 +160,3 @@ unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_dvva5")
}
[node name="Alarm" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("5_iwcrn")
volume_db = -7.668
[node name="Announce" type="AudioStreamPlayer" parent="."]
unique_name_in_owner = true
stream = ExtResource("6_oh30d")
volume_db = -7.668

View File

@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ccq04ahrwr3bv"
path="res://.godot/imported/alarm.wav-e0f6b7b4874e69f8a83b072a97c636f4.sample"
[deps]
source_file="res://gui/game/announce/assets/sfx/alarm.wav"
dest_files=["res://.godot/imported/alarm.wav-e0f6b7b4874e69f8a83b072a97c636f4.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View File

@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d1cpi438ep0ys"
path="res://.godot/imported/quota_announcement.wav-ebdd79fb160b0596cac5cfcd6835a186.sample"
[deps]
source_file="res://gui/game/announce/assets/sfx/quota_announcement.wav"
dest_files=["res://.godot/imported/quota_announcement.wav-ebdd79fb160b0596cac5cfcd6835a186.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

View File

@@ -9,4 +9,4 @@ func announce(title : String, text : String, band_color : Color = YELLOW_COLOR):
%AnnounceText.text = text
%AnnounceTexture.modulate = band_color
%AnimationPlayer.play("pass")
%Announce.play()
AudioManager.play_sfx("Announce")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://753270jjxmfg"]
[gd_scene load_steps=19 format=3 uid="uid://753270jjxmfg"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_m317d"]
[ext_resource type="Script" uid="uid://b7f10wuounfan" path="res://gui/game/card/scripts/card.gd" id="2_kpm7h"]
@@ -19,37 +19,6 @@ corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[sub_resource type="Resource" id="Resource_mwhj8"]
script = ExtResource("5_7wc8v")
title_text = "Title"
title_icon = ExtResource("6_7wc8v")
text = "Text"
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_kpm7h"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_7wc8v"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_pmldi"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_gibok"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_vnqhg"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_on5kv"]
script = ExtResource("5_7wc8v")
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
[sub_resource type="Resource" id="Resource_plgbn"]
script = ExtResource("3_7wc8v")
title = "Hello"
@@ -57,7 +26,6 @@ type_icon = ExtResource("6_7wc8v")
texture = ExtResource("7_mwhj8")
important_stat_text = "10"
important_stat_icon = ExtResource("3_kpm7h")
sections = Array[ExtResource("5_7wc8v")]([SubResource("Resource_mwhj8"), SubResource("Resource_kpm7h"), SubResource("Resource_7wc8v"), SubResource("Resource_pmldi"), SubResource("Resource_gibok"), SubResource("Resource_vnqhg"), SubResource("Resource_on5kv"), null])
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnqhg"]
@@ -83,8 +51,8 @@ _data = {
[node name="Card" type="PanelContainer"]
custom_minimum_size = Vector2(250, 0)
offset_right = 140.0
offset_bottom = 60.0
offset_right = 250.0
offset_bottom = 377.0
size_flags_horizontal = 0
size_flags_vertical = 0
theme = ExtResource("1_m317d")

View File

@@ -1,13 +1,16 @@
[gd_scene load_steps=14 format=3 uid="uid://csiacsndm62ll"]
[gd_scene load_steps=17 format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_8d1kg"]
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://gui/game/pause/resources/blur.gdshader" id="2_apjlw"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_0pdto"]
[ext_resource type="PackedScene" uid="uid://g6lbgg1fhc25" path="res://gui/menu/settings/settings.tscn" id="4_58dya"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_apjlw"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://common/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://bewr0t1wi8pff" path="res://common/icons/rotate.svg" id="6_58dya"]
[ext_resource type="Texture2D" uid="uid://cixd5j8yqpavg" path="res://common/icons/settings.svg" id="6_yj6f1"]
[ext_resource type="Texture2D" uid="uid://bkwhrq4sp5dcp" path="res://common/icons/device-gamepad.svg" id="7_7c7ks"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="7_yj6f1"]
[ext_resource type="PackedScene" uid="uid://b4qe1dwwsk87t" path="res://gui/menu/controls/controls.tscn" id="11_urlqn"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58dya"]
shader = ExtResource("2_apjlw")
@@ -15,8 +18,8 @@ shader_parameter/strength = 3.3
shader_parameter/mix_percentage = 0.3
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("2_8d1kg")
font_size = 50
font = ExtResource("4_apjlw")
font_size = 30
[sub_resource type="Animation" id="Animation_58dya"]
length = 0.001
@@ -103,7 +106,7 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Tutorial" type="MarginContainer" parent="Container"]
[node name="MarginContainer" type="MarginContainer" parent="Container"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
@@ -112,54 +115,69 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
[node name="VBoxContainer" type="VBoxContainer" parent="Container/Tutorial"]
[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer"]
layout_mode = 2
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 9
theme_override_constants/separation = 20
alignment = 1
[node name="PauseTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
[node name="PauseTitle" type="Label" parent="Container/MarginContainer/Pause"]
layout_mode = 2
text = "PAUSE"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "CONTROLS"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "CONTROLS_TEXT"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Container/Tutorial/VBoxContainer"]
[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/Pause"]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
[node name="Resume" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Resume" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
theme = ExtResource("1_51ks3")
text = "RESUME_GAME"
icon = ExtResource("5_apjlw")
[node name="Restart" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Settings" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "SETTINGS"
icon = ExtResource("6_yj6f1")
[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "CONTROLS"
icon = ExtResource("7_7c7ks")
[node name="Restart" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "RESTART"
icon = ExtResource("6_58dya")
[node name="Quit" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
layout_mode = 2
text = "QUIT"
icon = ExtResource("7_yj6f1")
[node name="Settings" parent="." instance=ExtResource("4_58dya")]
unique_name_in_owner = true
visible = false
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 2
[node name="Controls" parent="." instance=ExtResource("11_urlqn")]
unique_name_in_owner = true
visible = false
mouse_filter = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_yj6f1")
}
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Container/Tutorial/VBoxContainer/HBoxContainer/Quit" to="." method="_on_quit_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Settings" to="." method="_on_settings_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Controls" to="." method="_on_controls_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Restart" to="." method="_on_restart_pressed"]
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Quit" to="." method="_on_quit_pressed"]

View File

@@ -12,7 +12,8 @@ func set_pause(p):
%AnimationPlayer.play_backwards("pause")
pause = p
get_tree().paused = pause
%Settings.close_settings()
%Controls.close_controls()
func _input(_event):
if Input.is_action_just_pressed("pause"):
@@ -31,3 +32,9 @@ func _on_quit_pressed():
func _on_game_gui_pause_asked():
pause = true
func _on_settings_pressed():
%Settings.open_settings()
func _on_controls_pressed():
%Controls.open_controls()

View File

@@ -0,0 +1,35 @@
[gd_scene load_steps=3 format=3 uid="uid://b4qe1dwwsk87t"]
[ext_resource type="Script" uid="uid://dmefdkcsmgr4l" path="res://gui/menu/controls/scripts/controls.gd" id="1_g86te"]
[ext_resource type="PackedScene" uid="uid://brxrl7sipyy6k" path="res://gui/menu/window/window.tscn" id="1_mnd1d"]
[node name="Controls" 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_g86te")
[node name="ControlsWindow" parent="." instance=ExtResource("1_mnd1d")]
unique_name_in_owner = true
custom_minimum_size = Vector2(900, 500)
layout_mode = 1
title = "CONTROLS"
[node name="WindowTitle" parent="ControlsWindow/WindowHeader/MarginContainer" index="0"]
text = "CONTROLS"
[node name="MarginContainer" type="MarginContainer" parent="ControlsWindow/WindowContent/MarginContainer/ContentContainer" index="0"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 0
[node name="ControlsContainer" type="VBoxContainer" parent="ControlsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
[editable path="ControlsWindow"]

View File

@@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://dapsvw31ux0j2"]
[ext_resource type="PackedScene" uid="uid://d3agt2njfgddb" path="res://gui/menu/window/content_label.tscn" id="1_ganst"]
[ext_resource type="Script" uid="uid://dhs6kispjoecs" path="res://gui/menu/controls/scripts/input_group.gd" id="1_kkwd7"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="3_s602q"]
[node name="InputGroup" type="HBoxContainer"]
size_flags_horizontal = 3
script = ExtResource("1_kkwd7")
[node name="Text" parent="." instance=ExtResource("1_ganst")]
unique_name_in_owner = true
layout_mode = 2
text = "Input"
[node name="Button" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
theme = ExtResource("3_s602q")
text = "Text"
[connection signal="button_down" from="Button" to="." method="_on_button_button_down"]
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]

View File

@@ -0,0 +1,33 @@
@tool
extends Control
const INPUT_GROUP_SCENE = preload("res://gui/menu/controls/input_group.tscn")
@export_tool_button("Update", "Callable") var update_action = create_input_list
func _ready():
create_input_list()
if not Engine.is_editor_hint():
%ControlsWindow.close_window()
show()
func open_controls():
%ControlsWindow.open_window()
func close_controls():
%ControlsWindow.close_window()
func create_input_list():
InputMap.load_from_project_settings()
for child in %ControlsContainer.get_children():
child.queue_free()
for action in InputMap.get_actions():
if action.substr(0, 3) != "ui_":
var input_group = instantiate_input_group()
input_group.action_name = action
%ControlsContainer.add_child(input_group)
func instantiate_input_group() -> InputGroup:
return INPUT_GROUP_SCENE.instantiate() as InputGroup

View File

@@ -0,0 +1 @@
uid://dmefdkcsmgr4l

View File

@@ -0,0 +1,38 @@
@tool
extends HBoxContainer
class_name InputGroup
const MAX_INPUT_NAME = 30
var event : InputEvent = null
var is_remapping := false
@export var action_name : String :
set(v):
action_name = v
var events : Array[InputEvent] = InputMap.action_get_events(action_name)
event = null if events.size() == 0 else events[0]
update()
func update():
%Text.text = action_name.to_upper()
var input_name = "UNASSIGNED" if event == null else event.as_text()
if input_name.length() > MAX_INPUT_NAME:
input_name = input_name.substr(0,MAX_INPUT_NAME) + "..."
%Button.text = input_name
# (%Button as Button).add_theme_color_override("font_color", Color.RED if )
func _input(new_event):
if is_remapping:
if (
new_event is InputEventKey or (new_event is InputEventMouseButton and new_event.is_pressed())
):
is_remapping = false
GameInfo.update_input(action_name, event, new_event)
event = new_event
update()
func _on_button_button_down():
if !is_remapping:
is_remapping = true
%Button.text = "PRESS_KEY"

View File

@@ -0,0 +1 @@
uid://dhs6kispjoecs

View File

@@ -3,7 +3,5 @@ extends Node
@export_file var start_scene_path : String
func _ready():
var preferred_language = OS.get_locale_language()
TranslationServer.set_locale(preferred_language)
get_tree().change_scene_to_file(start_scene_path)

View File

@@ -0,0 +1,53 @@
@tool
extends Control
class_name GuiSettings
@onready var settings : SettingsData = GameInfo.game_data.settings
@export_tool_button("Open", "Callable") var open_action = open_settings
@export_tool_button("Close", "Callable") var close_action = close_settings
func _ready():
setup_languages()
setup_sound()
setup_video()
if not Engine.is_editor_hint():
%SettingsWindow.close_window()
show()
func open_settings():
%SettingsWindow.open_window()
func close_settings():
%SettingsWindow.close_window()
func setup_languages():
var optionButton := (%LanguageOptionButton as OptionButton)
optionButton.clear()
for language in SettingsData.AVAILABLE_LANGUAGES_LABEL:
optionButton.add_item(language)
optionButton.selected = SettingsData.AVAILABLE_LANGUAGES.find(settings.language)
func setup_sound():
%MusicSlider.value = settings.music_volume
%EnvSlider.value = settings.ambiance_volume
%SFXSlider.value = settings.sfx_volume
func setup_video():
%FullScreenCheckBox.button_pressed = settings.full_screen
func _on_language_option_button_item_selected(index: int):
settings.language = SettingsData.AVAILABLE_LANGUAGES[index]
func _on_full_screen_check_box_toggled(toggled_on: bool):
settings.full_screen = toggled_on
func _on_music_slider_value_changed(value: float):
settings.music_volume = min(1.0, value)
func _on_env_slider_value_changed(value: float):
settings.ambiance_volume = min(1.0, value)
func _on_sfx_slider_value_changed(value: float):
settings.sfx_volume = min(1.0, value)

View File

@@ -0,0 +1 @@
uid://bms0xtv8vh2qg

View File

@@ -0,0 +1,137 @@
[gd_scene load_steps=6 format=3 uid="uid://g6lbgg1fhc25"]
[ext_resource type="Script" uid="uid://bms0xtv8vh2qg" path="res://gui/menu/settings/scripts/settings.gd" id="1_7t8mv"]
[ext_resource type="PackedScene" uid="uid://brxrl7sipyy6k" path="res://gui/menu/window/window.tscn" id="1_gkn1k"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_7t8mv"]
[ext_resource type="PackedScene" uid="uid://cvjqp3oewr3rv" path="res://gui/menu/window/content_title.tscn" id="3_rbiwc"]
[ext_resource type="PackedScene" uid="uid://d3agt2njfgddb" path="res://gui/menu/window/content_label.tscn" id="4_rbiwc"]
[node name="Settings" type="Control"]
process_mode = 3
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
script = ExtResource("1_7t8mv")
[node name="SettingsWindow" parent="." instance=ExtResource("1_gkn1k")]
unique_name_in_owner = true
process_mode = 3
layout_mode = 1
offset_left = -349.99994
offset_right = 350.00006
mouse_filter = 0
title = "SETTINGS"
[node name="WindowTitle" parent="SettingsWindow/WindowHeader/MarginContainer" index="0"]
text = "SETTINGS"
[node name="MarginContainer" type="MarginContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer" index="0"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 5
theme_override_constants/margin_top = 0
[node name="SettingsContent" type="VBoxContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="LanguageTitle" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" instance=ExtResource("3_rbiwc")]
layout_mode = 2
title = "LANGUAGE"
[node name="LanguageSettings" type="GridContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent"]
layout_mode = 2
columns = 2
[node name="LanguageText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/LanguageSettings" instance=ExtResource("4_rbiwc")]
layout_mode = 2
[node name="LanguageOptionButton" type="OptionButton" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/LanguageSettings"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
theme = ExtResource("2_7t8mv")
selected = 0
item_count = 2
popup/item_0/text = "English"
popup/item_0/id = 0
popup/item_1/text = "Français"
popup/item_1/id = 1
[node name="SoundTitle" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" instance=ExtResource("3_rbiwc")]
layout_mode = 2
title = "SOUND"
[node name="SoundSliders" type="GridContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent"]
layout_mode = 2
columns = 2
[node name="MusicText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders" instance=ExtResource("4_rbiwc")]
layout_mode = 2
text = "MUSIC_VOLUME"
[node name="MusicSlider" type="HSlider" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource("2_7t8mv")
max_value = 1.0
step = 0.01
value = 1.0
[node name="EvironmentText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders" instance=ExtResource("4_rbiwc")]
layout_mode = 2
text = "ENVIRONMENT_VOLUME"
[node name="EnvSlider" type="HSlider" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 1
max_value = 1.0
step = 0.01
[node name="SFXText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders" instance=ExtResource("4_rbiwc")]
layout_mode = 2
text = "SFX_VOLUME"
[node name="SFXSlider" type="HSlider" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 1
max_value = 1.0
step = 0.01
[node name="VideoTitle" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent" instance=ExtResource("3_rbiwc")]
layout_mode = 2
title = "VIDEO"
[node name="VideoSettings" type="GridContainer" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent"]
layout_mode = 2
columns = 2
[node name="FullScreenText" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings" instance=ExtResource("4_rbiwc")]
layout_mode = 2
text = "FULLSCREEN"
[node name="FullScreenCheckBox" type="CheckBox" parent="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
size_flags_vertical = 4
theme = ExtResource("2_7t8mv")
[connection signal="item_selected" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/LanguageSettings/LanguageOptionButton" to="." method="_on_language_option_button_item_selected"]
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/MusicSlider" to="." method="_on_music_slider_value_changed"]
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/EnvSlider" to="." method="_on_env_slider_value_changed"]
[connection signal="value_changed" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/SoundSliders/SFXSlider" to="." method="_on_sfx_slider_value_changed"]
[connection signal="toggled" from="SettingsWindow/WindowContent/MarginContainer/ContentContainer/MarginContainer/SettingsContent/VideoSettings/FullScreenCheckBox" to="." method="_on_full_screen_check_box_toggled"]
[editable path="SettingsWindow"]

View File

@@ -0,0 +1,14 @@
[gd_scene load_steps=4 format=3 uid="uid://d3agt2njfgddb"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_qjfiv"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="2_klh4u"]
[sub_resource type="LabelSettings" id="LabelSettings_yj6f1"]
font = ExtResource("2_klh4u")
font_size = 20
font_color = Color(0.13725491, 0.39215687, 0.6666667, 1)
[node name="LanguageText" type="Label"]
theme = ExtResource("1_qjfiv")
text = "Language"
label_settings = SubResource("LabelSettings_yj6f1")

View File

@@ -0,0 +1,29 @@
[gd_scene load_steps=5 format=3 uid="uid://cvjqp3oewr3rv"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_g1qh5"]
[ext_resource type="Script" uid="uid://cj3o5y7cyipcs" path="res://gui/menu/window/scripts/content_title.gd" id="1_xbmdr"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="2_xbmdr"]
[sub_resource type="LabelSettings" id="LabelSettings_58dya"]
font = ExtResource("2_xbmdr")
font_size = 30
font_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
[node name="ContentTitle" type="HBoxContainer"]
script = ExtResource("1_xbmdr")
title = "TITLE"
[node name="Text" type="Label" parent="."]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("1_g1qh5")
theme_override_colors/font_color = Color(0.13725491, 0.39215687, 0.6666667, 1)
text = "TITLE"
label_settings = SubResource("LabelSettings_58dya")
[node name="ColorRect" type="ColorRect" parent="."]
custom_minimum_size = Vector2(0, 2)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 8
color = Color(0.0627451, 0.05882353, 0.16862746, 1)

View File

@@ -0,0 +1,11 @@
@tool
extends HBoxContainer
@export var title : String = "" :
set(v):
title = v
if is_node_ready():
%Text.text = v
func _ready():
%Text.text = title

View File

@@ -0,0 +1 @@
uid://cj3o5y7cyipcs

View File

@@ -0,0 +1,30 @@
@tool
extends VBoxContainer
class_name GuiWindow
signal closed
@export var title : String : set = update_title
@export_tool_button("Open", "Callable") var open_action = open_window
@export_tool_button("Close", "Callable") var close_action = close_window
func _ready():
update_title(title)
func update_title(text : String):
title = text
if (is_node_ready()):
%WindowTitle.text = title
func _on_close_button_pressed():
close_window()
func open_window():
show()
%ControlAnimationPlayer.appear()
func close_window():
%ControlAnimationPlayer.disappear(0.3)
await get_tree().create_timer(0.3).timeout
hide()
closed.emit()

View File

@@ -0,0 +1 @@
uid://bvsjrf5n8jp1i

107
gui/menu/window/window.tscn Normal file
View File

@@ -0,0 +1,107 @@
[gd_scene load_steps=10 format=3 uid="uid://brxrl7sipyy6k"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="1_0d57l"]
[ext_resource type="Script" uid="uid://bvsjrf5n8jp1i" path="res://gui/menu/window/scripts/window.gd" id="1_8s3xn"]
[ext_resource type="Texture2D" uid="uid://ottk0ccw1d1r" path="res://common/icons/square-rounded-x.svg" id="2_8s3xn"]
[ext_resource type="Script" uid="uid://0dhj8sdpil7q" path="res://gui/tools/control_animation_player.gd" id="2_n80be"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="4_ghh86"]
[ext_resource type="Texture2D" uid="uid://bxrn0qho5jo7f" path="res://common/icons/square-rounded-x-nofill.svg" id="5_ghh86"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yj6f1"]
bg_color = Color(1, 0.6509804, 0.09019608, 1)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
expand_margin_bottom = 50.0
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("1_0d57l")
font_size = 30
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7c7ks"]
bg_color = Color(1, 1, 1, 1)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[node name="Window" type="VBoxContainer"]
custom_minimum_size = Vector2(700, 500)
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -250.0
offset_top = -250.0
offset_right = 250.00012
offset_bottom = 250.00122
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_constants/separation = 10
script = ExtResource("1_8s3xn")
title = "Hello"
[node name="ControlAnimationPlayer" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("2_n80be")
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
[node name="WindowHeader" type="Panel" parent="."]
custom_minimum_size = Vector2(0, 50)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_yj6f1")
[node name="MarginContainer" type="MarginContainer" parent="WindowHeader"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 58.0
grow_horizontal = 2
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 0
[node name="WindowTitle" type="Label" parent="WindowHeader/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
text = "Hello"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="CloseButton" type="TextureButton" parent="WindowHeader/MarginContainer"]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 4
theme = ExtResource("4_ghh86")
texture_normal = ExtResource("2_8s3xn")
texture_hover = ExtResource("5_ghh86")
ignore_texture_size = true
stretch_mode = 5
[node name="WindowContent" type="Panel" parent="."]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_7c7ks")
[node name="MarginContainer" type="MarginContainer" parent="WindowContent"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("4_ghh86")
[node name="ContentContainer" type="ScrollContainer" parent="WindowContent/MarginContainer"]
unique_name_in_owner = true
layout_mode = 2
horizontal_scroll_mode = 0
[connection signal="pressed" from="WindowHeader/MarginContainer/CloseButton" to="." method="_on_close_button_pressed"]

View File

@@ -29,7 +29,7 @@ func _ready():
func _input(_event):
if player:
if Input.is_action_just_pressed("move"):
if Input.is_action_just_pressed("move_pointer"):
player.try_move(
player.get_global_mouse_position()
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

View File

@@ -1,10 +1,15 @@
[gd_resource type="Theme" load_steps=13 format=3 uid="uid://bgcmd213j6gk1"]
[gd_resource type="Theme" load_steps=35 format=3 uid="uid://bgcmd213j6gk1"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="1_g7s0b"]
[ext_resource type="Texture2D" uid="uid://bqcsma3tkbefi" path="res://common/icons/square-rounded-check.svg" id="2_36amo"]
[ext_resource type="FontFile" uid="uid://c7k6ssq6ocwdk" path="res://gui/ressources/fonts/Ubuntu/Ubuntu-M.ttf" id="2_ab4w8"]
[ext_resource type="FontFile" uid="uid://3workc27eb0r" path="res://gui/ressources/fonts/Ubuntu/Ubuntu-B.ttf" id="3_36amo"]
[ext_resource type="Texture2D" uid="uid://b6dwhn0uotdgu" path="res://common/icons/square-rounded-nofill.svg" id="3_feqcm"]
[ext_resource type="Texture2D" uid="uid://xt032oyjwdoy" path="res://gui/ressources/textures/slider.svg" id="4_1lj4c"]
[ext_resource type="FontFile" uid="uid://dxbmvk18hg103" path="res://gui/ressources/fonts/Ubuntu/Ubuntu-BI.ttf" id="4_feqcm"]
[ext_resource type="FontFile" uid="uid://bnmaweyw0kfcy" path="res://gui/ressources/fonts/Ubuntu/Ubuntu-MI.ttf" id="5_1lj4c"]
[ext_resource type="Texture2D" uid="uid://2hbbmhlgj8ue" path="res://gui/ressources/textures/slider-highlight.svg" id="5_frr6k"]
[ext_resource type="Texture2D" uid="uid://chelw5jxqyyi4" path="res://gui/ressources/textures/option-button-icon.svg" id="7_frr6k"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hv6r3"]
bg_color = Color(0.976471, 0.741176, 0.4, 1)
@@ -42,8 +47,84 @@ corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1lj4c"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_frr6k"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4pupg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_x0rpt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_c6ec6"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5ugto"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_qux7a"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mqali"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2ul3a"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_74wu0"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2lmp7"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_feqcm"]
bg_color = Color(1, 0.6509804, 0.09019608, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1lj4c"]
bg_color = Color(0.6852761, 0.4354346, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_frr6k"]
bg_color = Color(0.45452476, 0.45452416, 0.4545238, 1)
border_width_left = 15
border_width_top = 5
border_width_right = 15
border_width_bottom = 5
border_color = Color(0.45490196, 0.45490196, 0.45490196, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4pupg"]
bg_color = Color(0.9019608, 0.5568628, 0, 1)
border_width_left = 15
border_width_top = 5
border_width_right = 15
border_width_bottom = 5
border_color = Color(0.9019608, 0.5568628, 0, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c6ec6"]
bg_color = Color(0.9019608, 0.5568628, 0, 1)
border_width_left = 15
border_width_top = 5
border_width_right = 15
border_width_bottom = 5
border_color = Color(0.9019608, 0.5568628, 0, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_x0rpt"]
bg_color = Color(1, 0.6509804, 0.09019608, 1)
border_width_left = 15
border_width_top = 5
border_width_right = 15
border_width_bottom = 5
border_color = Color(1, 0.6509804, 0.09019608, 1)
corner_radius_top_left = 10
corner_radius_top_right = 10
corner_radius_bottom_right = 10
corner_radius_bottom_left = 10
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g7s0b"]
bg_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
bg_color = Color(0.043137256, 0.039215688, 0.11764706, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ab4w8"]
bg_color = Color(0.03, 0.03, 0.03, 0.42745098)
@@ -62,19 +143,52 @@ corner_radius_bottom_left = 5
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hv6r3"]
[resource]
Button/colors/font_color = Color(1, 1, 1, 1)
Button/font_sizes/font_size = 25
Button/fonts/font = ExtResource("1_g7s0b")
Button/styles/hover = SubResource("StyleBoxFlat_hv6r3")
Button/styles/normal = SubResource("StyleBoxFlat_y48f0")
Button/styles/pressed = SubResource("StyleBoxFlat_st1o2")
CheckBox/colors/checkbox_checked_color = Color(1, 0.6509804, 0.09019608, 1)
CheckBox/colors/checkbox_unchecked_color = Color(0.45882353, 0.45882353, 0.45882353, 1)
CheckBox/constants/icon_max_width = 30
CheckBox/icons/checked = ExtResource("2_36amo")
CheckBox/icons/checked_disabled = ExtResource("2_36amo")
CheckBox/icons/radio_unchecked_disabled = ExtResource("3_feqcm")
CheckBox/icons/unchecked = ExtResource("3_feqcm")
CheckBox/icons/unchecked_disabled = ExtResource("3_feqcm")
CheckBox/styles/disabled = SubResource("StyleBoxEmpty_1lj4c")
CheckBox/styles/disabled_mirrored = SubResource("StyleBoxEmpty_frr6k")
CheckBox/styles/focus = SubResource("StyleBoxEmpty_4pupg")
CheckBox/styles/hover = SubResource("StyleBoxEmpty_x0rpt")
CheckBox/styles/hover_mirrored = SubResource("StyleBoxEmpty_c6ec6")
CheckBox/styles/hover_pressed = SubResource("StyleBoxEmpty_5ugto")
CheckBox/styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_qux7a")
CheckBox/styles/normal = SubResource("StyleBoxEmpty_mqali")
CheckBox/styles/normal_mirrored = SubResource("StyleBoxEmpty_2ul3a")
CheckBox/styles/pressed = SubResource("StyleBoxEmpty_74wu0")
CheckBox/styles/pressed_mirrored = SubResource("StyleBoxEmpty_2lmp7")
GridContainer/constants/h_separation = 15
GridContainer/constants/v_separation = 15
HBoxContainer/constants/separation = 15
HSlider/icons/grabber = ExtResource("4_1lj4c")
HSlider/icons/grabber_highlight = ExtResource("5_frr6k")
HSlider/styles/grabber_area = SubResource("StyleBoxFlat_feqcm")
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_1lj4c")
Label/fonts/font = ExtResource("2_ab4w8")
MarginContainer/constants/margin_bottom = 15
MarginContainer/constants/margin_left = 15
MarginContainer/constants/margin_right = 15
MarginContainer/constants/margin_top = 15
OptionButton/colors/font_color = Color(1, 1, 1, 1)
OptionButton/font_sizes/font_size = 18
OptionButton/fonts/font = ExtResource("1_g7s0b")
OptionButton/icons/arrow = ExtResource("7_frr6k")
OptionButton/styles/disabled = SubResource("StyleBoxFlat_frr6k")
OptionButton/styles/focus = SubResource("StyleBoxFlat_4pupg")
OptionButton/styles/hover = SubResource("StyleBoxFlat_c6ec6")
OptionButton/styles/normal = SubResource("StyleBoxFlat_x0rpt")
OptionButton/styles/pressed = SubResource("StyleBoxFlat_x0rpt")
Panel/styles/panel = SubResource("StyleBoxFlat_g7s0b")
ProgressBar/styles/background = SubResource("StyleBoxFlat_ab4w8")
ProgressBar/styles/fill = SubResource("StyleBoxFlat_36amo")

View File

@@ -1,35 +0,0 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://byyfovm1ha5ya"
path="res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"
[deps]
source_file="res://gui/ressources/fonts/AtomicMd-3zXDZ.ttf"
dest_files=["res://.godot/imported/AtomicMd-3zXDZ.ttf-0d8ee2c5d0b5b97084be121e0cf9710b.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -1,35 +0,0 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://c8xf3tfnpufk3"
path="res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"
[deps]
source_file="res://gui/ressources/fonts/spincycle_3d_ot.otf"
dest_files=["res://.godot/imported/spincycle_3d_ot.otf-f71d33fbaded9da2ba85d0eb20bfd1e1.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="#ffffff"
class="icon icon-tabler icons-tabler-filled icon-tabler-caret-down"
version="1.1"
id="svg2"
sodipodi:docname="option-button-icon.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="37"
inkscape:cx="11.986486"
inkscape:cy="12"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
d="M18 9c.852 0 1.297 .986 .783 1.623l-.076 .084l-6 6a1 1 0 0 1 -1.32 .083l-.094 -.083l-6 -6l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057v-.118l.005 -.058l.009 -.06l.01 -.052l.032 -.108l.027 -.067l.07 -.132l.065 -.09l.073 -.081l.094 -.083l.077 -.054l.096 -.054l.036 -.017l.067 -.027l.108 -.032l.053 -.01l.06 -.01l.057 -.004l12.059 -.002z"
id="path2" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chelw5jxqyyi4"
path="res://.godot/imported/option-button-icon.svg-0ddd3d2a7a3191b09cfd688f684d4976.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/ressources/textures/option-button-icon.svg"
dest_files=["res://.godot/imported/option-button-icon.svg-0ddd3d2a7a3191b09cfd688f684d4976.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

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="#ffffff"
class="icon icon-tabler icons-tabler-filled icon-tabler-square-rounded"
version="1.1"
id="svg2"
sodipodi:docname="slider-highlight.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="37"
inkscape:cx="11.986486"
inkscape:cy="12"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
d="M12 2c-.218 0 -.432 .002 -.642 .005l-.616 .017l-.299 .013l-.579 .034l-.553 .046c-4.785 .464 -6.732 2.411 -7.196 7.196l-.046 .553l-.034 .579c-.005 .098 -.01 .198 -.013 .299l-.017 .616l-.004 .318l-.001 .324c0 .218 .002 .432 .005 .642l.017 .616l.013 .299l.034 .579l.046 .553c.464 4.785 2.411 6.732 7.196 7.196l.553 .046l.579 .034c.098 .005 .198 .01 .299 .013l.616 .017l.642 .005l.642 -.005l.616 -.017l.299 -.013l.579 -.034l.553 -.046c4.785 -.464 6.732 -2.411 7.196 -7.196l.046 -.553l.034 -.579c.005 -.098 .01 -.198 .013 -.299l.017 -.616l.005 -.642l-.005 -.642l-.017 -.616l-.013 -.299l-.034 -.579l-.046 -.553c-.464 -4.785 -2.411 -6.732 -7.196 -7.196l-.553 -.046l-.579 -.034a28.058 28.058 0 0 0 -.299 -.013l-.616 -.017l-.318 -.004l-.324 -.001z"
id="path2"
style="fill:#e68e00;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2hbbmhlgj8ue"
path="res://.godot/imported/slider-highlight.svg-1a1d9ee06af74286034ac5a9baf0d7d1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/ressources/textures/slider-highlight.svg"
dest_files=["res://.godot/imported/slider-highlight.svg-1a1d9ee06af74286034ac5a9baf0d7d1.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

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="#ffffff"
class="icon icon-tabler icons-tabler-filled icon-tabler-square-rounded"
version="1.1"
id="svg2"
sodipodi:docname="slider.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="37"
inkscape:cx="11.986486"
inkscape:cy="12"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
d="M12 2c-.218 0 -.432 .002 -.642 .005l-.616 .017l-.299 .013l-.579 .034l-.553 .046c-4.785 .464 -6.732 2.411 -7.196 7.196l-.046 .553l-.034 .579c-.005 .098 -.01 .198 -.013 .299l-.017 .616l-.004 .318l-.001 .324c0 .218 .002 .432 .005 .642l.017 .616l.013 .299l.034 .579l.046 .553c.464 4.785 2.411 6.732 7.196 7.196l.553 .046l.579 .034c.098 .005 .198 .01 .299 .013l.616 .017l.642 .005l.642 -.005l.616 -.017l.299 -.013l.579 -.034l.553 -.046c4.785 -.464 6.732 -2.411 7.196 -7.196l.046 -.553l.034 -.579c.005 -.098 .01 -.198 .013 -.299l.017 -.616l.005 -.642l-.005 -.642l-.017 -.616l-.013 -.299l-.034 -.579l-.046 -.553c-.464 -4.785 -2.411 -6.732 -7.196 -7.196l-.553 -.046l-.579 -.034a28.058 28.058 0 0 0 -.299 -.013l-.616 -.017l-.318 -.004l-.324 -.001z"
id="path2"
style="fill:#ffa617;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -2,22 +2,24 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://qx75h1k3wmm1"
path="res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"
uid="uid://xt032oyjwdoy"
path="res://.godot/imported/slider.svg-eca942f8d104c4813c5c55cde5db2c5b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/ressources/Tablette info.png"
dest_files=["res://.godot/imported/Tablette info.png-e89cd3fdb4a303341f3bbad730de279c.ctex"]
source_file="res://gui/ressources/textures/slider.svg"
dest_files=["res://.godot/imported/slider.svg-eca942f8d104c4813c5c55cde5db2c5b.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
@@ -25,6 +27,10 @@ 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
@@ -32,3 +38,6 @@ 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

View File

@@ -6,6 +6,51 @@ class_name ControlAnimationPlayer
@export_tool_button("Test Shake", "Callable") var shake_action = shake
@export_tool_button("Test Bounce", "Callable") var bounce_action = bounce
@export_tool_button("Test Appear", "Callable") var appear_action = appear
@export_tool_button("Test Disappear", "Callable") var disappear_action = disappear
func disappear(
duration : float = 0.3,
offset : int = 20,
transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_LINEAR,
):
add_tween(
"modulate",
Color.TRANSPARENT,
duration,
transition_type
)
await add_tween(
"position",
target.position + Vector2.UP * offset,
duration,
transition_type
).finished
target.position += Vector2.DOWN * offset
func appear(
duration : float = 0.3,
offset : int = 20,
transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_LINEAR,
):
add_tween(
"modulate",
Color.WHITE,
duration,
transition_type
).finished
target.position += Vector2.UP * offset
await add_tween(
"position",
target.position + Vector2.DOWN * offset,
duration,
transition_type
).finished
func bounce(
duration : float = 0.4,
@@ -60,4 +105,5 @@ func add_tween(
var tween : Tween = get_tree().create_tween()
tween.set_trans(transition_type)
tween.tween_property(target, property, value, seconds)
tween.set_pause_mode(Tween.TWEEN_PAUSE_PROCESS)
return tween