first commit 🎉

This commit is contained in:
anyreso 2026-02-17 23:36:57 -05:00
commit 6e724f67fe
805 changed files with 62098 additions and 0 deletions

View file

@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://bec7g0fax3c8o"]
[ext_resource type="FontFile" uid="uid://hbggv2tf174i" path="res://assets/fonts/Exo2/Exo2.ttf" id="1_u2ykv"]
[resource]
default_font = ExtResource("1_u2ykv")

View file

@ -0,0 +1,46 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name HUD extends CanvasLayer
@export var health_bar:ProgressBar
@export var energy_bar:ProgressBar
@export var timer_label:Label
@export var objective_label:Label
@export var debug_label:Label
@export var ammo_label:Label
@export var dialog:Control
func _ready() -> void:
visibility_changed.connect(_on_visibility_changed)
func _on_ammo_changed(new_ammo: int) -> void:
ammo_label.text = str(new_ammo)
func _on_visibility_changed() -> void:
process_mode = PROCESS_MODE_INHERIT if visible else PROCESS_MODE_DISABLED
func ask(question:String, callback:Callable, answer_yes:String = "Yes", answer_no:String = "No") -> void:
if dialog.visible:
dialog.toggle()
return
dialog.label.text = question
dialog.left_button.text = answer_no
dialog.right_button.text = answer_yes
if not callback.is_null():
if not dialog.right_button.pressed.is_connected(callback):
dialog.right_button.pressed.connect(callback, CONNECT_ONE_SHOT)
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
dialog.show()

View file

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

View file

@ -0,0 +1,298 @@
[gd_scene load_steps=16 format=3 uid="uid://bcv81ku26xo"]
[ext_resource type="Script" uid="uid://c53qq3k6tl8px" path="res://scenes/interfaces/hud/timer_label.gd" id="1_6qrx6"]
[ext_resource type="StyleBox" uid="uid://dcn1ll2ra4lwn" path="res://scenes/interfaces/hud/vitals/background.tres" id="1_gmv44"]
[ext_resource type="Script" uid="uid://b7c1u1wthu7t7" path="res://scenes/interfaces/hud/hud.gd" id="1_yev76"]
[ext_resource type="StyleBox" uid="uid://bq7rjpm38pao7" path="res://scenes/interfaces/hud/vitals/health_foreground.tres" id="2_6ejsl"]
[ext_resource type="Theme" uid="uid://bec7g0fax3c8o" path="res://scenes/interfaces/global_theme.tres" id="2_gbqw5"]
[sub_resource type="GDScript" id="GDScript_2hhw4"]
script/source = "extends PanelContainer
@export var label:Label
@export var left_button:Button
@export var right_button:Button
func _ready() -> void:
left_button.pressed.connect(toggle)
right_button.pressed.connect(toggle)
func toggle() -> void:
visible = !visible
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE if visible else Input.MOUSE_MODE_CAPTURED
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2hhw4"]
content_margin_left = 20.0
content_margin_top = 20.0
content_margin_right = 20.0
content_margin_bottom = 20.0
[sub_resource type="Shader" id="Shader_l1eho"]
code = "shader_type canvas_item;
uniform sampler2D noise : repeat_enable;
uniform vec4 line_color : source_color;
uniform float line_count : hint_range(0.0, 2.0, 0.05) = 0.5;
uniform float line_density : hint_range(0.0, 1.0) = 0.5;
uniform float line_falloff : hint_range(0.0, 1.0) = 0.25;
uniform float mask_size : hint_range(0.0, 1.0) = 0.1;
uniform float mask_edge : hint_range(0.0, 1.0) = 0.5;
uniform float animation_speed : hint_range(1.0, 20.0) = 0.5;
float inv_lerp(float from, float to, float value) {
return (value - from) / (to - from);
}
vec2 polar_coordinates(vec2 uv, vec2 center, float zoom, float repeat) {
vec2 dir = uv - center;
float radius = length(dir) * 2.0;
float angle = atan(dir.y, dir.x) / (2.0 * PI);
return mod(vec2(radius * zoom, angle * repeat), 1.0);
}
vec2 rotate_uv(vec2 uv, vec2 pivot, float rotation) {
float cosa = cos(rotation);
float sina = sin(rotation);
uv -= pivot;
return vec2(
cosa * uv.x - sina * uv.y,
cosa * uv.y + sina * uv.x
) + pivot;
}
void fragment() {
vec2 rotated_uv = rotate_uv(UV, vec2(0.5), floor(fract(TIME) * animation_speed));
vec2 polar_uv = polar_coordinates(rotated_uv, vec2(0.5), 0.01, line_count);
vec3 lines = texture(noise, polar_uv).rgb;
float mask_value = length(UV - vec2(0.5));
float mask = inv_lerp(mask_size, mask_edge, mask_value);
float result = 1.0 - (mask * line_density);
result = smoothstep(result, result + line_falloff, lines.r);
COLOR.rgb = line_color.rgb;
COLOR.a = min(line_color.a, result);
}
"
[sub_resource type="FastNoiseLite" id="FastNoiseLite_24jps"]
frequency = 0.065
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_24jps"]
noise = SubResource("FastNoiseLite_24jps")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_l76g6"]
shader = SubResource("Shader_l1eho")
shader_parameter/noise = SubResource("NoiseTexture2D_24jps")
shader_parameter/line_color = Color(1, 1, 1, 1)
shader_parameter/line_count = 1.0
shader_parameter/line_density = 0.3
shader_parameter/line_falloff = 0.75
shader_parameter/mask_size = 0.3
shader_parameter/mask_edge = 0.45
shader_parameter/animation_speed = 20.0
[sub_resource type="SystemFont" id="SystemFont_oo638"]
subpixel_positioning = 0
[sub_resource type="GDScript" id="GDScript_w8l21"]
script/source = "extends Label
@onready var player : Player = owner.get_parent()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if not OS.is_debug_build():
queue_free()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta : float) -> void:
text = \"\"
text += \"fps: %d (%.2f mspf)\\n\" % [Engine.get_frames_per_second(), 1000.0 / Engine.get_frames_per_second()]
text += \"position: %d, %d, %d\\n\" % [player.position.x, player.position.y, player.position.z]
text += \"speed: %d km/h\\n\" % (player.linear_velocity.length() * 3.6)
var velocity_xz := Vector3(player.linear_velocity.x, 0., player.linear_velocity.z)
text += \"speed_xz: %d km/h\\n\" % (velocity_xz.length() * 3.6)
var viewport_render_size : Vector2i = get_viewport().size * get_viewport().scaling_3d_scale
text += \"3D viewport resolution: %d × %d (%d%%)\\n\" \\
% [viewport_render_size.x, viewport_render_size.y, round(get_viewport().scaling_3d_scale * 100)]
text += \"health: %d\\n\" % player.health.value
text += \"energy: %d\\n\" % player.energy.value
text += \"%s: %s %s %s %s\" % [player.multiplayer.get_unique_id(), player.local_predictions.size(), player.input.history.size(), player.control_states.size(), Engine.get_physics_frames()]
"
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f23s3"]
bg_color = Color(0.0901961, 0.87451, 0.760784, 0.65098)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
anti_aliasing = false
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_2pxd4"]
properties/0/path = NodePath("MarginContainer/Multiplayer/TimerLabel:text")
properties/0/spawn = true
properties/0/replication_mode = 2
properties/1/path = NodePath("MarginContainer/Multiplayer/ObjectiveLabel:visible")
properties/1/spawn = true
properties/1/replication_mode = 2
[node name="HUD" type="CanvasLayer" node_paths=PackedStringArray("health_bar", "energy_bar", "timer_label", "objective_label", "debug_label", "ammo_label", "dialog")]
script = ExtResource("1_yev76")
health_bar = NodePath("MarginContainer/HBoxContainer/VBoxContainer/HealthBar")
energy_bar = NodePath("MarginContainer/HBoxContainer/VBoxContainer/EnergyBar")
timer_label = NodePath("MarginContainer/Multiplayer/TimerLabel")
objective_label = NodePath("MarginContainer/Multiplayer/ObjectiveLabel")
debug_label = NodePath("MarginContainer/DebugLabel")
ammo_label = NodePath("MarginContainer/HBoxContainer/HBoxContainer/AmmoLabel")
dialog = NodePath("Dialog")
[node name="Dialog" type="PanelContainer" parent="." node_paths=PackedStringArray("label", "left_button", "right_button")]
visible = false
top_level = true
z_index = 4
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
script = SubResource("GDScript_2hhw4")
label = NodePath("CenterContainer/VBoxContainer/Label")
left_button = NodePath("CenterContainer/VBoxContainer/HBoxContainer/LeftButton")
right_button = NodePath("CenterContainer/VBoxContainer/HBoxContainer/RightButton")
[node name="CenterContainer" type="CenterContainer" parent="Dialog"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Dialog/CenterContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="Dialog/CenterContainer/VBoxContainer"]
custom_minimum_size = Vector2(320, 0)
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_2hhw4")
text = "Are you sure you want to leave?"
horizontal_alignment = 1
autowrap_mode = 3
[node name="HBoxContainer" type="HBoxContainer" parent="Dialog/CenterContainer/VBoxContainer"]
layout_mode = 2
[node name="LeftButton" type="Button" parent="Dialog/CenterContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "No"
[node name="RightButton" type="Button" parent="Dialog/CenterContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Yes"
[node name="Speedlines" type="ColorRect" parent="."]
visible = false
material = SubResource("ShaderMaterial_l76g6")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
[node name="MarginContainer" type="MarginContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("2_gbqw5")
theme_override_constants/margin_left = 24
theme_override_constants/margin_top = 24
theme_override_constants/margin_right = 24
theme_override_constants/margin_bottom = 24
[node name="Multiplayer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
mouse_filter = 2
[node name="TimerLabel" type="Label" parent="MarginContainer/Multiplayer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_font_sizes/font_size = 22
text = "Warmup"
horizontal_alignment = 1
script = ExtResource("1_6qrx6")
[node name="ObjectiveLabel" type="Label" parent="MarginContainer/Multiplayer"]
visible = false
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.75, 0, 1)
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.5)
theme_override_font_sizes/font_size = 24
text = "YOU ARE THE RABBIT"
horizontal_alignment = 1
uppercase = true
[node name="DebugLabel" type="Label" parent="MarginContainer"]
layout_mode = 2
size_flags_vertical = 0
theme_override_fonts/font = SubResource("SystemFont_oo638")
script = SubResource("GDScript_w8l21")
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 10
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 8
size_flags_stretch_ratio = 0.2
theme_override_constants/separation = 6
[node name="HealthBar" type="ProgressBar" parent="MarginContainer/HBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 8)
layout_mode = 2
mouse_filter = 2
theme_override_styles/background = ExtResource("1_gmv44")
theme_override_styles/fill = ExtResource("2_6ejsl")
max_value = 255.0
step = 1.0
value = 255.0
show_percentage = false
[node name="EnergyBar" type="ProgressBar" parent="MarginContainer/HBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 8)
layout_mode = 2
mouse_filter = 2
theme_override_styles/background = ExtResource("1_gmv44")
theme_override_styles/fill = SubResource("StyleBoxFlat_f23s3")
value = 100.0
show_percentage = false
[node name="Spacer" type="Control" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.6
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.2
[node name="AmmoLabel" type="Label" parent="MarginContainer/HBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 20
text = "24
"
horizontal_alignment = 2
vertical_alignment = 1
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_interval = 0.1
replication_config = SubResource("SceneReplicationConfig_2pxd4")

View file

@ -0,0 +1,48 @@
[gd_scene load_steps=7 format=3 uid="uid://bbeecp3jusppn"]
[ext_resource type="Script" uid="uid://b4eysyabiblgn" path="res://scenes/interfaces/hud/iffs/iff.gd" id="1_g6kgb"]
[ext_resource type="Shader" uid="uid://n2dcb4l0qun2" path="res://scenes/interfaces/progress_bar/resources/visual_shader.res" id="2_8cjkh"]
[ext_resource type="PackedScene" uid="uid://chy8tm6hvummq" path="res://scenes/interfaces/progress_bar/ProgressBar3D.tscn" id="2_h0pl8"]
[ext_resource type="Texture2D" uid="uid://d4i7h27euhnvk" path="res://scenes/interfaces/waypoint/assets/minimal.svg" id="4_sjeyi"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4quui"]
render_priority = 0
shader = ExtResource("2_8cjkh")
[sub_resource type="QuadMesh" id="QuadMesh_ks8vt"]
resource_local_to_scene = true
material = SubResource("ShaderMaterial_4quui")
size = Vector2(0.35, 0.025)
center_offset = Vector3(0, 0.09, 0)
[node name="IFF" type="Node3D"]
script = ExtResource("1_g6kgb")
value = 128.0
border = 0.4
billboard = 1
[node name="Username" type="Label3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
offset = Vector2(0, 64)
billboard = 1
fixed_size = true
text = "Newblood"
font_size = 24
[node name="ProgressBar3D" parent="." instance=ExtResource("2_h0pl8")]
instance_shader_parameters/billboard = 1
instance_shader_parameters/border = 0.0
instance_shader_parameters/fill = Color(1, 1, 1, 1)
instance_shader_parameters/size = Vector2(0.35, 0.025)
mesh = SubResource("QuadMesh_ks8vt")
border = 0.0
billboard = 1
fill = Color(1, 1, 1, 1)
[node name="Chevron" type="Sprite3D" parent="."]
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0, 0, 0)
offset = Vector2(0, 64)
pixel_size = 0.001
billboard = 1
fixed_size = true
texture = ExtResource("4_sjeyi")

View file

@ -0,0 +1,113 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
@tool
class_name IFF extends Node3D
signal health_changed(new_value:float)
signal fill_changed(color:Color)
signal background_changed(color:Color)
signal billboard_changed(new_billboard:int)
signal border_changed(new_border:float)
# If `true`, the waypoint fades as the camera get closer.
#@export var fade:bool = true
## The minimum [member value].
@export var min_value:float = 0.:
set(new_value):
min_value = new_value
value = value
## The maximum [member value].
@export var max_value:float = 255.:
set(new_value):
max_value = new_value
value = value
## Current value.
@export var value:float = 255.:
set(new_value):
value = clampf(new_value, min_value, max_value)
health_changed.emit(value)
## The border for the progress bar.
@export_range(0., 1.) var border:float = .2:
set(new_border):
border = new_border
border_changed.emit(border)
## The username to display on top of this indicator.
@export var username:String = "Username":
set = set_username
func set_username(new_name:String) -> void:
username = new_name
if is_inside_tree():
label.text = new_name
## The foreground color to use for this indicator.
@export var fill:Color = Color.WHITE:
set(value):
fill = value
fill_changed.emit(fill)
## The background color to use for this indicator.
@export var background:Color = Color(0, 0, 0, 0.5):
set(color):
background = color
background_changed.emit(color)
## The billboard mode to use. See [member BaseMaterial3D.BillboardMode] for possible values.
@export_enum("Disabled", "Enabled", "Y-Billboard") var billboard:int = 2:
set(new_billboard):
billboard = new_billboard
billboard_changed.emit(billboard)
@onready var label:Label3D = $Username
@onready var chevron:Sprite3D = $Chevron
@onready var health_bar:ProgressBar3D = $ProgressBar3D
func _ready() -> void:
label.text = username
background_changed.connect(_on_background_changed)
border_changed.connect(_on_border_changed)
health_changed.connect(_on_health_changed)
billboard_changed.connect(_on_billboard_changed)
fill_changed.connect(_on_fill_changed)
func _on_billboard_changed(new_billboard:int) -> void:
label.billboard = new_billboard as BaseMaterial3D.BillboardMode
health_bar.billboard = new_billboard
chevron.billboard = new_billboard as BaseMaterial3D.BillboardMode
func _on_border_changed(new_border:float) -> void:
health_bar.border = new_border
func _on_username_changed(new_username:String) -> void:
# The label's text can only be set once the node is ready.
if is_inside_tree():
label.text = new_username
func _on_background_changed(color:Color) -> void:
label.outline_modulate = color
health_bar.background = color
func _on_fill_changed(color:Color) -> void:
label.modulate = color
health_bar.fill = color
chevron.modulate = color
func _on_health_changed(new_value:float) -> void:
health_bar.value = new_value

View file

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

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="26.53857mm"
height="26.538568mm"
viewBox="0 0 26.53857 26.538568"
version="1.1"
id="svg1"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<linearGradient
id="linearGradient1">
<stop
style="stop-color:#ffff00;stop-opacity:1;"
offset="0"
id="stop1" />
<stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="1"
id="stop2" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient1"
id="linearGradient2"
x1="60.761497"
y1="51.722984"
x2="92.511497"
y2="51.722984"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.86468252,0,0,0.86468252,10.370258,6.999024)" />
</defs>
<g
id="layer1"
transform="translate(-63.367213,-38.4537)">
<circle
style="fill:none;stroke:url(#linearGradient2);stroke-width:3.66051;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;paint-order:markers stroke fill"
id="path1"
cx="76.636497"
cy="51.722984"
r="11.43903" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1mwcg0cd0msw"
path="res://.godot/imported/throw_force_texture.svg-aa388451f93d94e423c5bb4620e2dc0f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/interfaces/hud/throw_force_texture.svg"
dest_files=["res://.godot/imported/throw_force_texture.svg-aa388451f93d94e423c5bb4620e2dc0f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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,29 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends Label
var timer: Timer = null
func _ready() -> void:
visible = false
process_mode = Node.PROCESS_MODE_DISABLED
func _process(_delta: float) -> void:
if timer and not timer.is_stopped() \
and !(multiplayer.multiplayer_peer is OfflineMultiplayerPeer) \
and multiplayer.is_server():
var minutes: int = int(timer.time_left / 60)
var seconds : int = int(fmod(timer.time_left, 60))
text = "%d:%02d" % [minutes, seconds]

View file

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

View file

@ -0,0 +1,9 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://dcn1ll2ra4lwn"]
[resource]
bg_color = Color(0, 0, 0, 0.25)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
anti_aliasing = false

View file

@ -0,0 +1,10 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bq7rjpm38pao7"]
[resource]
resource_local_to_scene = true
bg_color = Color(0.025, 0.75, 0.1, 0.65)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
anti_aliasing = false

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1tjamjm8qjog"
path="res://.godot/imported/background.webp-47c15a765221b774d4584cd0536867b9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/interfaces/menus/boot/background.webp"
dest_files=["res://.godot/imported/background.webp-47c15a765221b774d4584cd0536867b9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

View file

@ -0,0 +1,69 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name MainMenu extends CanvasLayer
@export var multiplayer_panel:MultiplayerPanelContainer
@export var settings_panel:SettingsPanelContainer
@export var demo_scene:PackedScene
signal host_pressed
signal join_pressed
const scene:PackedScene = preload("res://scenes/interfaces/menus/boot/boot.tscn")
static func instantiate() -> Match:
return scene.instantiate()
func _ready() -> void:
multiplayer_panel.menu_pressed.connect(_on_main_menu_pressed)
settings_panel.closed.connect(_on_main_menu_pressed)
if owner.has_method("_on_join_pressed"):
multiplayer_panel.join_pressed.connect(owner._on_join_pressed)
if owner.has_method("_on_host_pressed"):
multiplayer_panel.host_pressed.connect(owner._on_host_pressed)
#
#multiplayer.connected_to_server.connect(_on_connected_to_server)
#multiplayer.connection_failed.connect(multiplayer_panel.modal.hide)
func _on_demo_pressed() -> void:
get_tree().change_scene_to_packed(demo_scene)
func _on_multiplayer_pressed() -> void:
multiplayer_panel.hide()
multiplayer_panel.tab_container.current_tab = 0
settings_panel.hide()
$MainPanelContainer.hide()
multiplayer_panel.show()
show()
func _on_settings_pressed() -> void:
multiplayer_panel.hide()
multiplayer_panel.tab_container.current_tab = 0
settings_panel.show()
$MainPanelContainer.hide()
show()
func _on_main_menu_pressed() -> void:
multiplayer_panel.hide()
settings_panel.hide()
multiplayer_panel.tab_container.current_tab = 0
$MainPanelContainer.show()
show()
func _on_connected_to_server() -> void:
multiplayer_panel.modal.hide()
hide()

View file

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

View file

@ -0,0 +1,107 @@
[gd_scene load_steps=10 format=3 uid="uid://bjctlqvs33nqy"]
[ext_resource type="Script" uid="uid://p7rbfyfo2utx" path="res://scenes/interfaces/menus/boot/boot.gd" id="1_6acql"]
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://scenes/interfaces/menus/boot/background.webp" id="1_ph586"]
[ext_resource type="PackedScene" uid="uid://boviiugcnfyrj" path="res://scenes/singleplayer.tscn" id="2_0b20u"]
[ext_resource type="PackedScene" uid="uid://7chfb47enqwm" path="res://scenes/interfaces/menus/boot/multiplayer/multiplayer_panel_container.tscn" id="3_d2ufv"]
[ext_resource type="PackedScene" uid="uid://cvu66n4bm10w3" path="res://scenes/interfaces/menus/boot/settings/settings_panel_container.tscn" id="4_yk7cf"]
[ext_resource type="Theme" uid="uid://bec7g0fax3c8o" path="res://scenes/interfaces/global_theme.tres" id="5_unqvv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c4ymk"]
bg_color = Color(0, 0, 0, 0)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dq4me"]
bg_color = Color(0, 0.5, 0.5, 0.2)
[sub_resource type="GDScript" id="GDScript_dxvyd"]
script/source = "extends Button
func _ready() -> void:
pressed.connect(Game.quit)
"
[node name="Menu" type="CanvasLayer" node_paths=PackedStringArray("multiplayer_panel", "settings_panel")]
script = ExtResource("1_6acql")
multiplayer_panel = NodePath("MultiplayerPanelContainer")
settings_panel = NodePath("SettingsPanelContainer")
demo_scene = ExtResource("2_0b20u")
[node name="TextureRect" type="TextureRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = ExtResource("1_ph586")
stretch_mode = 6
[node name="MultiplayerPanelContainer" parent="." instance=ExtResource("3_d2ufv")]
unique_name_in_owner = true
visible = false
theme = ExtResource("5_unqvv")
[node name="SettingsPanelContainer" parent="." instance=ExtResource("4_yk7cf")]
visible = false
theme = ExtResource("5_unqvv")
[node name="MainPanelContainer" type="PanelContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 0
theme = ExtResource("5_unqvv")
theme_override_styles/panel = SubResource("StyleBoxFlat_c4ymk")
[node name="HBoxContainer" type="HBoxContainer" parent="MainPanelContainer"]
layout_mode = 2
[node name="Sidebar" type="PanelContainer" parent="MainPanelContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.3
theme_override_styles/panel = SubResource("StyleBoxFlat_dq4me")
[node name="MarginContainer" type="MarginContainer" parent="MainPanelContainer/HBoxContainer/Sidebar"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_right = 20
[node name="VBoxContainer" type="VBoxContainer" parent="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 10
alignment = 1
[node name="Demo" type="Button" parent="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Demo"
[node name="Multiplayer" type="Button" parent="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Multiplayer"
[node name="Settings" type="Button" parent="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Settings"
[node name="Quit" type="Button" parent="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Quit"
script = SubResource("GDScript_dxvyd")
[node name="Spacer" type="Control" parent="MainPanelContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.8
mouse_filter = 1
[connection signal="pressed" from="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer/Demo" to="." method="_on_demo_pressed"]
[connection signal="pressed" from="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer/Multiplayer" to="." method="_on_multiplayer_pressed"]
[connection signal="pressed" from="MainPanelContainer/HBoxContainer/Sidebar/MarginContainer/VBoxContainer/Settings" to="." method="_on_settings_pressed"]

View file

@ -0,0 +1,58 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name HostPanel extends MarginContainer
@export var host_button:Button
@export var menu_button:Button
@export var quit_button:Button
@export var server_host:LineEdit
@export var server_port:LineEdit
@export var map_selector:OptionButton
@export var mode_selector:OptionButton
var _host:RegEx = RegEx.new()
var _port:RegEx = RegEx.new()
func _ready() -> void:
# see https://datatracker.ietf.org/doc/html/rfc1700
_port.compile(r'^(?<port>102[4-9]|10[3-9]\d|1[1-9]\d{2}|[2-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])')
# "localhost", wildcard or ipv4|6
# @TODO: resolve hostname to ip to accept domain names as valid hosts, because host should be ipv4 or ipv6 (see "set_bind_ip")
_host.compile(r'^(?<host>localhost|\*|((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\-]*[a-fA-F0-9])\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::))))))$')
## This method gets a validated host as specified in the host panel or returns the default one
## from configuration if invalid
func get_host() -> String:
if server_host.text:
var result:RegExMatch = _host.search(server_host.text)
if result:
return result.get_string("host")
return Settings.get_value("server", "host", "localhost")
## This method gets a validated port as specified in the host panel or returns the default one
## from configuration if invalid
func get_port() -> int:
if server_port.text:
var result:RegExMatch = _port.search(server_port.text)
if result:
var port:int = result.get_string("port").to_int()
if port != 0:
return port
return Settings.get_value("server", "port", 9000)
## This method gets an array of validated host and port as specified in the host panel or
## returns an array of default values from configuration if invalid
func get_addr() -> Array:
return [get_host(), get_port()]

View file

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

View file

@ -0,0 +1,109 @@
[gd_scene load_steps=4 format=3 uid="uid://dv0lqek8bqyv"]
[ext_resource type="Script" uid="uid://bcnltcd1jp8l" path="res://scenes/interfaces/menus/boot/multiplayer/host_panel/host_panel.gd" id="1_wnvng"]
[ext_resource type="Script" uid="uid://f1xvkf1355ie" path="res://scenes/interfaces/menus/boot/multiplayer/host_panel/map_selector.gd" id="2_kwlr3"]
[ext_resource type="Script" uid="uid://f0y6q6ml3lk5" path="res://scenes/interfaces/menus/boot/multiplayer/host_panel/mode_selector.gd" id="3_o6ecq"]
[node name="HostPanel" type="MarginContainer" node_paths=PackedStringArray("host_button", "menu_button", "quit_button", "server_host", "server_port", "map_selector", "mode_selector")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
script = ExtResource("1_wnvng")
host_button = NodePath("HBoxContainer/LeftBox/Top/Host")
menu_button = NodePath("HBoxContainer/LeftBox/Bottom/Menu")
quit_button = NodePath("HBoxContainer/LeftBox/Bottom/Quit")
server_host = NodePath("HBoxContainer/RightBox/GridContainer/ServerHost")
server_port = NodePath("HBoxContainer/RightBox/GridContainer/ServerPort")
map_selector = NodePath("HBoxContainer/RightBox/GridContainer/MapSelector")
mode_selector = NodePath("HBoxContainer/RightBox/GridContainer/ModeSelector")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
theme_override_constants/separation = 20
[node name="LeftBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Top" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Host" type="Button" parent="HBoxContainer/LeftBox/Top"]
layout_mode = 2
text = "Host"
[node name="Bottom" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_vertical = 10
[node name="Menu" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Main Menu
"
[node name="Quit" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Quit"
[node name="RightBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="MapPreview" type="ColorRect" parent="HBoxContainer/RightBox"]
layout_mode = 2
[node name="GridContainer" type="GridContainer" parent="HBoxContainer/RightBox"]
layout_mode = 2
size_flags_vertical = 3
columns = 2
[node name="HostLabel" type="Label" parent="HBoxContainer/RightBox/GridContainer"]
custom_minimum_size = Vector2(120, 0)
layout_mode = 2
text = "Host"
[node name="ServerHost" type="LineEdit" parent="HBoxContainer/RightBox/GridContainer"]
custom_minimum_size = Vector2(120, 0)
layout_mode = 2
placeholder_text = "localhost"
max_length = 128
[node name="PortLabel" type="Label" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
text = "Port"
[node name="ServerPort" type="LineEdit" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
placeholder_text = "9000"
alignment = 2
[node name="MapLabel" type="Label" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
text = "Map"
[node name="MapSelector" type="OptionButton" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
clip_text = true
allow_reselect = true
script = ExtResource("2_kwlr3")
[node name="ModeLabel" type="Label" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
text = "Mode"
[node name="ModeSelector" type="OptionButton" parent="HBoxContainer/RightBox/GridContainer"]
layout_mode = 2
script = ExtResource("3_o6ecq")

View file

@ -0,0 +1,20 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
for map:PackedScene in Game.maps:
add_item(map._bundled.names[0])

View file

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

View file

@ -0,0 +1,28 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func format(enum_key: String) -> String:
# split enum value by underscores
var words:PackedStringArray = enum_key.split("_")
# capitalize first letter of each word
for i in range(words.size()):
words[i] = words[i].capitalize()
# join words with spaces
return " ".join(words)
func _ready() -> void:
for mode:Mode in Match.modes:
add_item(format(mode.name.to_upper()))

View file

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

View file

@ -0,0 +1,42 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name JoinPanel extends MarginContainer
@export var join_button : Button
@export var menu_button : Button
@export var quit_button : Button
@export var join_address : LineEdit
var _addr:RegEx = RegEx.new()
func _ready() -> void:
# see https://datatracker.ietf.org/doc/html/rfc1700
_addr.compile(r'^(?<host>(?![0-9]+$)[a-zA-Z0-9.-]+)(?::(?<port>:102[4-9]|10[3-9]\d|1[1-9]\d{2}|[2-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$')
## This method gets an array of validated host and port as specified in the
## join panel or returns an array of default values from configuration if invalid
func get_addr() -> Array:
if join_address.text:
var result:RegExMatch = _addr.search(join_address.text)
if result:
var host:String = result.get_string("host")
var port:int = result.get_string("port").to_int()
prints("join", host, port)
if port == 0:
port = Settings.get_value("server", "port", 9000)
return [host, port]
else:
push_warning("join address is invalid")
return [ Settings.get_value("server", "host", "localhost"), Settings.get_value("server", "port", 9000) ]

View file

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

View file

@ -0,0 +1,62 @@
[gd_scene load_steps=2 format=3 uid="uid://cfegls11p6wav"]
[ext_resource type="Script" uid="uid://ffilb2d365hu" path="res://scenes/interfaces/menus/boot/multiplayer/join_panel/join_panel.gd" id="1_svm4h"]
[node name="JoinPanel" type="MarginContainer" node_paths=PackedStringArray("join_button", "menu_button", "quit_button", "join_address")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
script = ExtResource("1_svm4h")
join_button = NodePath("HBoxContainer/LeftBox/Top/Join")
menu_button = NodePath("HBoxContainer/LeftBox/Bottom/Menu")
quit_button = NodePath("HBoxContainer/LeftBox/Bottom/Quit")
join_address = NodePath("HBoxContainer/RightBox/JoinAddress")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
theme_override_constants/separation = 20
[node name="LeftBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Top" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Join" type="Button" parent="HBoxContainer/LeftBox/Top"]
layout_mode = 2
text = "Join"
[node name="Bottom" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_vertical = 10
[node name="Menu" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Main Menu
"
[node name="Quit" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Quit"
[node name="RightBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="JoinAddress" type="LineEdit" parent="HBoxContainer/RightBox"]
layout_mode = 2
placeholder_text = "localhost"

View file

@ -0,0 +1,75 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name MultiplayerPanelContainer extends PanelContainer
# @TODO: move profiles in a "profiles" folder since there will be many profiles
const CONFIG_FILE_PATH:String = "user://profile.cfg"
var _config_file:ConfigFile = ConfigFile.new()
signal menu_pressed
signal join_pressed
signal host_pressed
@export var tab_container:TabContainer
@export var profile_panel:ProfilePanel
@export var join_panel:JoinPanel
@export var host_panel:HostPanel
@onready var modal:Control = $Modal
func _ready() -> void:
# connect signals
join_panel.join_button.pressed.connect(_on_join_pressed)
host_panel.host_button.pressed.connect(_on_host_pressed)
for panel:Control in [profile_panel, host_panel, join_panel]:
panel.menu_button.pressed.connect(_on_menu_pressed)
panel.quit_button.pressed.connect(Game.quit)
# load configuration file
_load_config()
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("exit"):
modal.hide()
func _load_config() -> void:
var error:Error = _config_file.load(CONFIG_FILE_PATH)
if error != OK:
return
profile_panel.profile_name.text = _config_file.get_value("profile", "name", "Newblood")
func _on_save_pressed() -> void:
_config_file.set_value("profile", "name", profile_panel.profile_name.text)
_config_file.save(CONFIG_FILE_PATH)
func _on_menu_pressed() -> void:
menu_pressed.emit()
func _on_host_pressed() -> void:
host_pressed.emit(
host_panel.get_addr(),
host_panel.map_selector.selected,
host_panel.mode_selector.selected,
profile_panel.profile_name.text)
func _on_join_pressed() -> void:
var addr := join_panel.get_addr()
if addr:
modal.show()
multiplayer.connection_failed.connect(modal.hide, CONNECT_ONE_SHOT)
multiplayer.connected_to_server.connect(func() -> void: modal.hide(); owner.hide(), CONNECT_ONE_SHOT)
join_pressed.emit(join_panel.get_addr(), profile_panel.profile_name.text)

View file

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

View file

@ -0,0 +1,94 @@
[gd_scene load_steps=7 format=3 uid="uid://7chfb47enqwm"]
[ext_resource type="Script" uid="uid://bnyd7frdcpwpk" path="res://scenes/interfaces/menus/boot/multiplayer/multiplayer_panel_container.gd" id="1_yyvwh"]
[ext_resource type="PackedScene" uid="uid://cfegls11p6wav" path="res://scenes/interfaces/menus/boot/multiplayer/join_panel/join_panel.tscn" id="2_4vm27"]
[ext_resource type="PackedScene" uid="uid://moey0w3677td" path="res://scenes/interfaces/menus/boot/multiplayer/profile_panel/profile_panel.tscn" id="2_aidbu"]
[ext_resource type="PackedScene" uid="uid://dv0lqek8bqyv" path="res://scenes/interfaces/menus/boot/multiplayer/host_panel/host_panel.tscn" id="2_ameih"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_krqeq"]
bg_color = Color(0.501961, 0.501961, 0.501961, 0.25098)
[sub_resource type="GDScript" id="GDScript_tcq1f"]
script/source = "extends Panel
@onready var label: Label = $Label
func _hide() -> void:
label.text = \"CONNECTING ...\"
"
[node name="MultiplayerPanelContainer" type="PanelContainer" node_paths=PackedStringArray("tab_container", "profile_panel", "join_panel", "host_panel")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_krqeq")
script = ExtResource("1_yyvwh")
tab_container = NodePath("MarginContainer/VBoxContainer/TabContainer")
profile_panel = NodePath("MarginContainer/VBoxContainer/TabContainer/Profile/ProfilePanel")
join_panel = NodePath("MarginContainer/VBoxContainer/TabContainer/Join/JoinPanel")
host_panel = NodePath("MarginContainer/VBoxContainer/TabContainer/Host/HostPanel")
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="TabContainer" type="TabContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/side_margin = 0
current_tab = 2
[node name="Profile" type="TabBar" parent="MarginContainer/VBoxContainer/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/h_separation = 0
metadata/_tab_index = 0
[node name="ProfilePanel" parent="MarginContainer/VBoxContainer/TabContainer/Profile" instance=ExtResource("2_aidbu")]
layout_mode = 1
[node name="Join" type="TabBar" parent="MarginContainer/VBoxContainer/TabContainer"]
visible = false
layout_mode = 2
select_with_rmb = true
metadata/_tab_index = 1
[node name="JoinPanel" parent="MarginContainer/VBoxContainer/TabContainer/Join" instance=ExtResource("2_4vm27")]
layout_mode = 1
[node name="Host" type="TabBar" parent="MarginContainer/VBoxContainer/TabContainer"]
layout_mode = 2
select_with_rmb = true
metadata/_tab_index = 2
[node name="HostPanel" parent="MarginContainer/VBoxContainer/TabContainer/Host" instance=ExtResource("2_ameih")]
layout_mode = 1
[node name="Modal" type="Panel" parent="."]
visible = false
layout_mode = 2
script = SubResource("GDScript_tcq1f")
[node name="Label" type="Label" parent="Modal"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -59.5
offset_top = -11.5
offset_right = 59.5
offset_bottom = 11.5
grow_horizontal = 2
grow_vertical = 2
text = "CONNECTING ..."
horizontal_alignment = 1

View file

@ -0,0 +1,22 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name ProfilePanel extends MarginContainer
@export var create_button : Button
@export var delete_button : Button
@export var save_button : Button
@export var menu_button : Button
@export var quit_button : Button
@export var profile_name : LineEdit

View file

@ -0,0 +1 @@
uid://7sc85512bgrr

View file

@ -0,0 +1,79 @@
[gd_scene load_steps=2 format=3 uid="uid://moey0w3677td"]
[ext_resource type="Script" uid="uid://7sc85512bgrr" path="res://scenes/interfaces/menus/boot/multiplayer/profile_panel/profile_panel.gd" id="1_e3jmb"]
[node name="ProfilePanel" type="MarginContainer" node_paths=PackedStringArray("create_button", "delete_button", "save_button", "menu_button", "quit_button", "profile_name")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 20
script = ExtResource("1_e3jmb")
create_button = NodePath("HBoxContainer/LeftBox/Top/Create")
delete_button = NodePath("HBoxContainer/LeftBox/Top/Delete")
save_button = NodePath("HBoxContainer/LeftBox/Top/Save")
menu_button = NodePath("HBoxContainer/LeftBox/Bottom/Menu")
quit_button = NodePath("HBoxContainer/LeftBox/Bottom/Quit")
profile_name = NodePath("HBoxContainer/RightBox/ProfileName")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
theme_override_constants/separation = 20
[node name="LeftBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Top" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.25
[node name="Create" type="Button" parent="HBoxContainer/LeftBox/Top"]
layout_mode = 2
disabled = true
text = "Create"
[node name="Delete" type="Button" parent="HBoxContainer/LeftBox/Top"]
layout_mode = 2
disabled = true
text = "Delete"
[node name="Save" type="Button" parent="HBoxContainer/LeftBox/Top"]
layout_mode = 2
text = "Save"
[node name="Bottom" type="VBoxContainer" parent="HBoxContainer/LeftBox"]
layout_mode = 2
size_flags_vertical = 10
[node name="Menu" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Main Menu
"
[node name="Quit" type="Button" parent="HBoxContainer/LeftBox/Bottom"]
layout_mode = 2
size_flags_horizontal = 3
text = "Quit"
[node name="RightBox" type="VBoxContainer" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer/RightBox"]
layout_mode = 2
text = "Current Profile:"
[node name="ProfileName" type="LineEdit" parent="HBoxContainer/RightBox"]
layout_mode = 2
size_flags_horizontal = 3
text = "Newblood"

View file

@ -0,0 +1,32 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("video", "filter"))
func _on_item_selected(index: int) -> void:
Settings.set_value("video", "filter", index)
# Viewport scale mode setting.
if index == 0: # Bilinear (Fastest)
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
%FSRSharpnessLabel.visible = false
%FSRSharpnessSlider.visible = false
elif index == 1: # FSR 1.0 (Fast)
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
%FSRSharpnessLabel.visible = true
%FSRSharpnessSlider.visible = true

View file

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

View file

@ -0,0 +1,39 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends HBoxContainer
@export var min_value : int = 70
@export var max_value : int = 150
@export var step : int = 1
func _ready() -> void:
var value : int = Settings.get_value("video", "fov")
for control : Range in [$SpinBox, $Slider]:
control.min_value = min_value
control.max_value = max_value
control.step = step
control.value = value
_on_value_changed(value)
func _on_value_changed(new_value : int) -> void:
Settings.set_value("video", "fov", new_value)
#
func _on_spin_box_value_changed(new_value : int) -> void:
_on_value_changed(new_value)
$Slider.value = new_value
#
func _on_slider_value_changed(new_value : int) -> void:
_on_value_changed(new_value)
$SpinBox.value = new_value

View file

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

View file

@ -0,0 +1,26 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends HSlider
func _ready() -> void:
self.value = Settings.get_value("video", "fsr_sharpness")
self.value_changed.emit(self.value)
func _on_value_changed(new_value : float) -> void:
Settings.set_value("video", "fsr_sharpness", new_value)
# Lower FSR sharpness values result in a sharper image.
# Invert the slider so that higher values result in a sharper image,
# which is generally expected from users.
get_viewport().fsr_sharpness = 2.0 - new_value

View file

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

View file

@ -0,0 +1,24 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("video", "fxaa"))
func _on_item_selected(index: int) -> void:
Settings.set_value("video", "fxaa", index)
# Fast approximate anti-aliasing. Much faster than MSAA (and works on alpha scissor edges),
# but blurs the whole scene rendering slightly.
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA

View file

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

View file

@ -0,0 +1,30 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("environment", "glow"))
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "glow", index)
## This is a setting that is attached to the environment.
## If your game requires you to change the environment,
## then be sure to run this function again to make the setting effective.
if index == 0: # Disabled (default)
Game.environment.glow_enabled = false
elif index == 1: # Low
Game.environment.glow_enabled = true
elif index == 2: # High
Game.environment.glow_enabled = true

View file

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

View file

@ -0,0 +1,32 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("quality", "mesh_lod"))
func _on_item_selected(index : int) -> void:
Settings.set_value("quality", "mesh_lod", index)
if index == 0: # Very Low
get_viewport().mesh_lod_threshold = 8.0
if index == 0: # Low
get_viewport().mesh_lod_threshold = 4.0
if index == 1: # Medium
get_viewport().mesh_lod_threshold = 2.0
if index == 2: # High (default)
get_viewport().mesh_lod_threshold = 1.0
if index == 3: # Ultra
# Always use highest LODs to avoid any form of pop-in.
get_viewport().mesh_lod_threshold = 0.0

View file

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

View file

@ -0,0 +1,39 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends HBoxContainer
@export var min_value : float = .01
@export var max_value : float = 1.
@export var step : float = .01
func _ready() -> void:
var value : float = Settings.get_value("controls", "mouse_sensitivity")
for control : Range in [$SpinBox, $Slider]:
control.min_value = min_value
control.max_value = max_value
control.step = step
control.value = value
_on_value_changed(value)
func _on_value_changed(new_value : float) -> void:
Settings.set_value("controls", "mouse_sensitivity", new_value)
func _on_spin_box_value_changed(new_value : float) -> void:
_on_value_changed(new_value)
$Slider.value = new_value
func _on_slider_value_changed(new_value : float) -> void:
_on_value_changed(new_value)
$SpinBox.value = new_value

View file

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

View file

@ -0,0 +1,31 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("video", "msaa"))
func _on_item_selected(index: int) -> void:
Settings.set_value("video", "msaa", index)
# Multi-sample anti-aliasing. High quality, but slow. It also does not smooth out the edges of
# transparent (alpha scissor) textures.
if index == 0: # Disabled (default)
get_viewport().msaa_3d = Viewport.MSAA_DISABLED
elif index == 1: # 2×
get_viewport().msaa_3d = Viewport.MSAA_2X
elif index == 2: # 4×
get_viewport().msaa_3d = Viewport.MSAA_4X
elif index == 3: # 8×
get_viewport().msaa_3d = Viewport.MSAA_8X

View file

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

View file

@ -0,0 +1,40 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends HBoxContainer
@export var min_value : float = 0.25
@export var max_value : float = 2
@export var step : float = .05
func _ready() -> void:
var value : float = Settings.get_value("video", "quality")
for control : Range in [$SpinBox, $Slider]:
control.min_value = min_value
control.max_value = max_value
control.step = step
control.value = value
get_viewport().scaling_3d_scale = value
func _on_value_changed(new_value : float) -> void:
Settings.set_value("video", "quality", new_value)
get_viewport().scaling_3d_scale = new_value
func _on_spin_box_value_changed(new_value : float) -> void:
_on_value_changed(new_value)
$Slider.value = new_value
#
func _on_slider_value_changed(new_value : float) -> void:
_on_value_changed(new_value)
$SpinBox.value = new_value

View file

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

View file

@ -0,0 +1,32 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("environment", "sdfgi"))
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "sdfgi", index)
# This is a setting that is attached to the environment.
# If your game requires you to change the environment,
# then be sure to run this function again to make the setting effective.
if index == 0: # Disabled (default)
Game.environment.sdfgi_enabled = false
elif index == 1: # Low
Game.environment.sdfgi_enabled = true
RenderingServer.gi_set_use_half_resolution(true)
elif index == 2: # High
Game.environment.sdfgi_enabled = true
RenderingServer.gi_set_use_half_resolution(false)

View file

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

View file

@ -0,0 +1,39 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("quality", "shadow_filter"))
func _on_item_selected(index : int) -> void:
Settings.set_value("quality", "shadow_filter", index)
if index == 0: # Very Low
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_HARD)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_HARD)
if index == 1: # Low
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_VERY_LOW)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_VERY_LOW)
if index == 2: # Medium (default)
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_LOW)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_LOW)
if index == 3: # High
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_MEDIUM)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_MEDIUM)
if index == 4: # Very High
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_HIGH)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_HIGH)
if index == 5: # Ultra
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_ULTRA)
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_ULTRA)

View file

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

View file

@ -0,0 +1,56 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("quality", "shadow_size"))
func _on_item_selected(index : int) -> void:
Settings.set_value("quality", "shadow_size", index)
if index == 0: # Minimum
RenderingServer.directional_shadow_atlas_set_size(512, true)
# Adjust shadow bias according to shadow resolution.
# Higher resultions can use a lower bias without suffering from shadow acne.
#Settings.set_value("quality", "shadow_bias", 0.06)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
# Disable positional (omni/spot) light shadows entirely to further improve performance.
# These often don't contribute as much to a scene compared to directional light shadows.
get_viewport().positional_shadow_atlas_size = 0
if index == 1: # Very Low
RenderingServer.directional_shadow_atlas_set_size(1024, true)
#Settings.set_value("quality", "shadow_bias", 0.04)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
get_viewport().positional_shadow_atlas_size = 1024
if index == 2: # Low
RenderingServer.directional_shadow_atlas_set_size(2048, true)
#Settings.set_value("quality", "shadow_bias", 0.03)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
get_viewport().positional_shadow_atlas_size = 2048
if index == 3: # Medium (default)
RenderingServer.directional_shadow_atlas_set_size(4096, true)
#Settings.set_value("quality", "shadow_bias", 0.02)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
get_viewport().positional_shadow_atlas_size = 4096
if index == 4: # High
RenderingServer.directional_shadow_atlas_set_size(8192, true)
#Settings.set_value("quality", "shadow_bias", 0.01)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
get_viewport().positional_shadow_atlas_size = 8192
if index == 5: # Ultra
RenderingServer.directional_shadow_atlas_set_size(16384, true)
#Settings.set_value("quality", "shadow_bias", 0.005)
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
get_viewport().positional_shadow_atlas_size = 16384

View file

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

View file

@ -0,0 +1,38 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("environment", "ssao"))
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "ssao", index)
# This is a setting that is attached to the environment.
# If your game requires you to change the environment,
# then be sure to run this function again to make the setting effective.
if index == 0: # Disabled (default)
Game.environment.ssao_enabled = false
elif index == 1: # Very Low
Game.environment.ssao_enabled = true
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
elif index == 2: # Low
Game.environment.ssao_enabled = true
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
elif index == 3: # Medium
Game.environment.ssao_enabled = true
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_MEDIUM, true, 0.5, 2, 50, 300)
elif index == 4: # High
Game.environment.ssao_enabled = true
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_HIGH, true, 0.5, 2, 50, 300)

View file

@ -0,0 +1 @@
uid://2kic42r3nha3

View file

@ -0,0 +1,38 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("environment", "ssil"))
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "ssil", index)
# This is a setting that is attached to the environment.
# If your game requires you to change the environment,
# then be sure to run this function again to make the setting effective.
if index == 0: # Disabled (default)
Game.environment.ssil_enabled = false
if index == 1: # Very Low
Game.environment.ssil_enabled = true
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_VERY_LOW, true, 0.5, 4, 50, 300)
if index == 2: # Low
Game.environment.ssil_enabled = true
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_LOW, true, 0.5, 4, 50, 300)
if index == 3: # Medium
Game.environment.ssil_enabled = true
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_MEDIUM, true, 0.5, 4, 50, 300)
if index == 4: # High
Game.environment.ssil_enabled = true
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_HIGH, true, 0.5, 4, 50, 300)

View file

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

View file

@ -0,0 +1,35 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("environment", "ssr"))
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "ssr", index)
# This is a setting that is attached to the environment.
# If your game requires you to change the environment,
# then be sure to run this function again to make the setting effective.
if index == 0: # Disabled (default)
Game.environment.ssr_enabled = false
elif index == 1: # Low
Game.environment.ssr_enabled = true
Game.environment.ssr_max_steps = 8
elif index == 2: # Medium
Game.environment.ssr_enabled = true
Game.environment.ssr_max_steps = 32
elif index == 3: # High
Game.environment.ssr_enabled = true
Game.environment.ssr_max_steps = 56

View file

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

View file

@ -0,0 +1,26 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("video", "taa"))
func _on_item_selected(index: int) -> void:
Settings.set_value("video", "taa", index)
# Temporal antialiasing. Smooths out everything including specular aliasing,
# but can introduce ghosting artifacts and blurring in motion.
# Moderate performance cost.
# @WARNING: https://github.com/TokisanGames/Terrain3D/issues/302
# get_viewport().use_taa = index == 1

View file

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

View file

@ -0,0 +1,42 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
self.selected = Settings.get_value("ui", "scale")
self.item_selected.emit(self.selected)
func _on_item_selected(index: int) -> void:
Settings.set_value("ui", "scale", clamp(index, 0, 2))
# When the screen changes size, we need to update the 3D
# viewport quality setting. If we don't do this, the viewport will take
# the size from the main viewport.
var new_size := Vector2(
ProjectSettings.get_setting(&"display/window/size/viewport_width"),
ProjectSettings.get_setting(&"display/window/size/viewport_height")
)
# compute new size
if index == 0: # Smaller (66%)
new_size *= 1.5
elif index == 1: # Small (80%)
new_size *= 1.25
elif index == 2: # Medium (100%) (default)
new_size *= 1.
elif index == 3: # Large (133%)
new_size *= .75
elif index == 4: # Larger (200%)
new_size *= .5
# update scale
get_tree().root.set_content_scale_size(new_size)

View file

@ -0,0 +1 @@
uid://4iu7twgcd7gc

View file

@ -0,0 +1,30 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
self.selected = Settings.get_value("environment", "volumetric_fog")
self.item_selected.emit(self.selected)
func _on_item_selected(index: int) -> void:
Settings.set_value("environment", "volumetric_fog", index)
if index == 0: # Disabled (default)
Game.environment.volumetric_fog_enabled = false
if index == 1: # Low
Game.environment.volumetric_fog_enabled = true
RenderingServer.environment_set_volumetric_fog_filter_active(false)
if index == 2: # High
Game.environment.volumetric_fog_enabled = true
RenderingServer.environment_set_volumetric_fog_filter_active(true)

View file

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

View file

@ -0,0 +1,33 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
select(Settings.get_value("video", "vsync"))
func _on_item_selected(index : int) -> void:
Settings.set_value("video", "vsync", index)
# Vsync is enabled by default.
# Vertical synchronization locks framerate and makes screen tearing not visible at the cost of
# higher input latency and stuttering when the framerate target is not met.
# Adaptive V-Sync automatically disables V-Sync when the framerate target is not met, and enables
# V-Sync otherwise. This prevents suttering and reduces input latency when the framerate target
# is not met, at the cost of visible tearing.
if index == 0: # Disabled (default)
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED)
elif index == 1: # Adaptive
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ADAPTIVE)
elif index == 2: # Enabled
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED)

View file

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

View file

@ -0,0 +1,28 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends OptionButton
func _ready() -> void:
var window_mode : DisplayServer.WindowMode = Settings.get_value("video", "window_mode")
select(DisplayServer.WINDOW_MODE_WINDOWED if OS.is_debug_build() else window_mode)
func _on_item_selected(index : int) -> void:
Settings.set_value("video", "window_mode", clampi(index, 0, 2))
if index == 0: # Windowed (default)
get_tree().root.set_mode(Window.MODE_WINDOWED)
elif index == 1: # Fullscreen
get_tree().root.set_mode(Window.MODE_FULLSCREEN)
elif index == 2: # Exclusive Fullscreen
get_tree().root.set_mode(Window.MODE_EXCLUSIVE_FULLSCREEN)

View file

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

View file

@ -0,0 +1,114 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name SettingsPanelContainer extends PanelContainer
signal closed
# Quality presets.
func _on_very_low_preset_pressed() -> void:
%TAAOptionButton.select(0)
%MSAAOptionButton.select(0)
%FXAAOptionButton.select(0)
%ShadowSizeOptionButton.select(0)
%ShadowFilterOptionButton.select(0)
%MeshLODOptionButton.select(0)
%SDFGIOptionButton.select(0)
%GlowOptionButton.select(0)
%SSAOOptionButton.select(0)
%SSReflectionsOptionButton.select(0)
%SSILOptionButton.select(0)
%VolumetricFogOptionButton.select(0)
func _on_low_preset_pressed() -> void:
%TAAOptionButton.select(0)
%MSAAOptionButton.select(0)
%FXAAOptionButton.select(1)
%ShadowSizeOptionButton.select(1)
%ShadowFilterOptionButton.select(1)
%MeshLODOptionButton.select(1)
%SDFGIOptionButton.select(0)
%GlowOptionButton.select(0)
%SSAOOptionButton.select(0)
%SSReflectionsOptionButton.select(0)
%SSILOptionButton.select(0)
%VolumetricFogOptionButton.select(0)
func _on_medium_preset_pressed() -> void:
%TAAOptionButton.select(1)
%MSAAOptionButton.select(0)
%FXAAOptionButton.select(0)
%ShadowSizeOptionButton.select(2)
%ShadowFilterOptionButton.select(2)
%MeshLODOptionButton.select(1)
%SDFGIOptionButton.select(1)
%GlowOptionButton.select(1)
%SSAOOptionButton.select(1)
%SSReflectionsOptionButton.select(1)
%SSILOptionButton.select(0)
%VolumetricFogOptionButton.select(1)
func _on_high_preset_pressed() -> void:
%TAAOptionButton.select(1)
%MSAAOptionButton.select(0)
%FXAAOptionButton.select(0)
%ShadowSizeOptionButton.select(3)
%ShadowFilterOptionButton.select(3)
%MeshLODOptionButton.select(2)
%SDFGIOptionButton.select(1)
%GlowOptionButton.select(2)
%SSAOOptionButton.select(2)
%SSReflectionsOptionButton.select(2)
%SSILOptionButton.select(2)
%VolumetricFogOptionButton.select(2)
func _on_ultra_preset_pressed() -> void:
%TAAOptionButton.select(1)
%MSAAOptionButton.select(1)
%FXAAOptionButton.select(0)
%ShadowSizeOptionButton.select(4)
%ShadowFilterOptionButton.select(4)
%MeshLODOptionButton.select(3)
%SDFGIOptionButton.select(2)
%GlowOptionButton.select(2)
%SSAOOptionButton.select(3)
%SSReflectionsOptionButton.select(3)
%SSILOptionButton.select(3)
%VolumetricFogOptionButton.select(2)
func _on_apply_pressed() -> void:
Settings.save()
func _on_reset_pressed() -> void:
Settings.reset()
# @TODO: reset also settings user interface to render actual state
func _on_close_pressed() -> void:
hide()
closed.emit()
# Adjustment settings.
#func _on_brightness_slider_value_changed(value: float) -> void:
# The slider value is clamped between 0.5 and 4.
#world_environment.environment.set_adjustment_brightness(value)
#func _on_contrast_slider_value_changed(value: float) -> void:
# The slider value is clamped between 0.5 and 4.
#world_environment.environment.set_adjustment_contrast(value)
#func _on_saturation_slider_value_changed(value: float) -> void:
# The slider value is clamped between 0.5 and 10.
#world_environment.environment.set_adjustment_saturation(value)

View file

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

View file

@ -0,0 +1,704 @@
[gd_scene load_steps=22 format=3 uid="uid://cvu66n4bm10w3"]
[ext_resource type="Script" uid="uid://4iu7twgcd7gc" path="res://scenes/interfaces/menus/boot/settings/scripts/ui_scale.gd" id="1_b2atp"]
[ext_resource type="Script" uid="uid://r7ayvxi511h7" path="res://scenes/interfaces/menus/boot/settings/settings_panel_container.gd" id="1_c6l0i"]
[ext_resource type="Script" uid="uid://j8fgxk8i1eef" path="res://scenes/interfaces/menus/boot/settings/scripts/mouse_sensitivity.gd" id="2_xrhb7"]
[ext_resource type="Script" uid="uid://dctc2dwe3t5ft" path="res://scenes/interfaces/menus/boot/settings/scripts/fov.gd" id="3_eemxr"]
[ext_resource type="Script" uid="uid://bia6xgvun0ikb" path="res://scenes/interfaces/menus/boot/settings/scripts/quality.gd" id="4_n2pno"]
[ext_resource type="Script" uid="uid://tt2mwoiyull6" path="res://scenes/interfaces/menus/boot/settings/scripts/filters.gd" id="5_v6h66"]
[ext_resource type="Script" uid="uid://chpjd0lsfytm2" path="res://scenes/interfaces/menus/boot/settings/scripts/fsr_sharpness.gd" id="6_ahtl5"]
[ext_resource type="Script" uid="uid://def7y2m3ydu81" path="res://scenes/interfaces/menus/boot/settings/scripts/window_mode.gd" id="7_rfyne"]
[ext_resource type="Script" uid="uid://cvqyligfd6u72" path="res://scenes/interfaces/menus/boot/settings/scripts/vsync.gd" id="8_tdbn8"]
[ext_resource type="Script" uid="uid://dy4ajxjq5oc1t" path="res://scenes/interfaces/menus/boot/settings/scripts/taa.gd" id="9_ogr52"]
[ext_resource type="Script" uid="uid://cuxxrc263di7v" path="res://scenes/interfaces/menus/boot/settings/scripts/msaa.gd" id="10_hsx6v"]
[ext_resource type="Script" uid="uid://bdqgn2fv83chc" path="res://scenes/interfaces/menus/boot/settings/scripts/fxaa.gd" id="11_qd7o2"]
[ext_resource type="Script" uid="uid://dum5dxy5mv2vn" path="res://scenes/interfaces/menus/boot/settings/scripts/shadow_size.gd" id="12_53fxd"]
[ext_resource type="Script" uid="uid://btor2u1h51x1p" path="res://scenes/interfaces/menus/boot/settings/scripts/shadow_filter.gd" id="13_tast2"]
[ext_resource type="Script" uid="uid://fofgvkvej3xa" path="res://scenes/interfaces/menus/boot/settings/scripts/mesh_lod.gd" id="14_gekxq"]
[ext_resource type="Script" uid="uid://dn58d5ox5j1ve" path="res://scenes/interfaces/menus/boot/settings/scripts/sdfgi.gd" id="15_yf3v0"]
[ext_resource type="Script" uid="uid://dswsrshk1lk56" path="res://scenes/interfaces/menus/boot/settings/scripts/glow.gd" id="16_pq7lj"]
[ext_resource type="Script" uid="uid://2kic42r3nha3" path="res://scenes/interfaces/menus/boot/settings/scripts/ssao.gd" id="17_xi4oy"]
[ext_resource type="Script" uid="uid://bxx1rqkht7qvu" path="res://scenes/interfaces/menus/boot/settings/scripts/ssr.gd" id="18_dprjc"]
[ext_resource type="Script" uid="uid://sxlytv3b0wv8" path="res://scenes/interfaces/menus/boot/settings/scripts/ssil.gd" id="19_myuy8"]
[ext_resource type="Script" uid="uid://b588m3rqd7rxo" path="res://scenes/interfaces/menus/boot/settings/scripts/volumetric_fog.gd" id="20_wf7u8"]
[node name="SettingsPanelContainer" type="PanelContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
script = ExtResource("1_c6l0i")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
custom_minimum_size = Vector2(480, 0)
layout_mode = 2
size_flags_vertical = 3
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 20
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 20
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/ScrollContainer/MarginContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 10
[node name="PresetSection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.682353, 0.917647, 1, 1)
text = "Presets"
horizontal_alignment = 1
[node name="Presets" type="HBoxContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="VeryLowPreset" type="Button" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets"]
layout_mode = 2
size_flags_horizontal = 3
text = "Very Low"
[node name="LowPreset" type="Button" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets"]
layout_mode = 2
size_flags_horizontal = 3
text = "Low"
[node name="MediumPreset" type="Button" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets"]
layout_mode = 2
size_flags_horizontal = 3
text = "Medium"
[node name="HighPreset" type="Button" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets"]
layout_mode = 2
size_flags_horizontal = 3
text = "High"
[node name="UltraPreset" type="Button" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets"]
layout_mode = 2
size_flags_horizontal = 3
text = "Ultra"
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="UISection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "User Interface Settings"
horizontal_alignment = 1
[node name="UIGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
columns = 2
[node name="UIScaleLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/UIGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "UI Scale:"
[node name="UIScaleOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/UIGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 5
selected = 2
popup/item_0/text = "Smaller (66%)"
popup/item_0/id = 0
popup/item_1/text = "Small (80%)"
popup/item_1/id = 1
popup/item_2/text = "Medium (100%)"
popup/item_2/id = 2
popup/item_3/text = "Large (133%)"
popup/item_3/id = 3
popup/item_4/text = "Larger (200%)"
popup/item_4/id = 4
script = ExtResource("1_b2atp")
[node name="ControlsSection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "Controls Settings"
horizontal_alignment = 1
[node name="ControlsGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
columns = 2
[node name="SensitivityLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Mouse sensitivity"
[node name="SensitivityControls" type="HBoxContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
script = ExtResource("2_xrhb7")
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls"]
layout_mode = 2
[node name="Slider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
[node name="InvertedYLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Inverted Y"
[node name="InvertedYCheckbox" type="CheckBox" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
[node name="ViewportSection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "Video Settings"
horizontal_alignment = 1
[node name="ViewportGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
columns = 2
[node name="FOVLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Field of View:"
[node name="FOVControls" type="HBoxContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
script = ExtResource("3_eemxr")
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls"]
layout_mode = 2
min_value = 70.0
max_value = 150.0
value = 90.0
[node name="Slider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
min_value = 70.0
max_value = 150.0
value = 90.0
[node name="QualityLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Resolution Scale:"
[node name="QualityControls" type="HBoxContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
script = ExtResource("4_n2pno")
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls"]
layout_mode = 2
[node name="Slider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
[node name="FilterLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Display Filter:"
[node name="FilterOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 2
selected = 0
popup/item_0/text = "Bilinear (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "FSR 1.0 (Fast)"
popup/item_1/id = 1
script = ExtResource("5_v6h66")
[node name="FSRSharpnessLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "FSR Sharpness:"
[node name="FSRSharpnessSlider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
max_value = 2.0
step = 0.2
script = ExtResource("6_ahtl5")
[node name="WindowModeLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Window Mode:"
[node name="WindowModeOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 3
selected = 2
popup/item_0/text = "Windowed"
popup/item_0/id = 0
popup/item_1/text = "Fullscreen"
popup/item_1/id = 1
popup/item_2/text = "Exclusive Fullscreen"
popup/item_2/id = 2
script = ExtResource("7_rfyne")
[node name="VsyncLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "V-Sync:"
[node name="VsyncOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 3
selected = 0
popup/item_0/text = "Disabled"
popup/item_0/id = 0
popup/item_1/text = "Adaptive"
popup/item_1/id = 1
popup/item_2/text = "Enabled"
popup/item_2/id = 2
script = ExtResource("8_tdbn8")
[node name="TAALabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Anti-Aliasing (TAA):"
[node name="TAAOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 2
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Enabled (Average)"
popup/item_1/id = 1
script = ExtResource("9_ogr52")
[node name="MSAALabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Anti-Aliasing (MSAA):"
[node name="MSAAOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 4
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "2× (Average)"
popup/item_1/id = 1
popup/item_2/text = "4× (Slow)"
popup/item_2/id = 2
popup/item_3/text = "8× (Slower)"
popup/item_3/id = 3
script = ExtResource("10_hsx6v")
[node name="FXAALabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Anti-Aliasing (FXAA):"
[node name="FXAAOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 2
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Enabled (Fast)"
popup/item_1/id = 1
script = ExtResource("11_qd7o2")
[node name="QualitySection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "Quality Settings"
horizontal_alignment = 1
[node name="QualityGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
columns = 2
[node name="ShadowSizeLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Shadow Resolution:"
[node name="ShadowSizeOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 6
selected = 3
popup/item_0/text = "Minimum (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Very Low (Faster)"
popup/item_1/id = 1
popup/item_2/text = "Low (Fast)"
popup/item_2/id = 2
popup/item_3/text = "Medium (Average)"
popup/item_3/id = 3
popup/item_4/text = "High (Slow)"
popup/item_4/id = 4
popup/item_5/text = "Ultra (Slowest)"
popup/item_5/id = 5
script = ExtResource("12_53fxd")
[node name="ShadowFilterLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Shadow Filtering:"
[node name="ShadowFilterOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 6
selected = 2
popup/item_0/text = "Very Low (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Low (Faster)"
popup/item_1/id = 1
popup/item_2/text = "Medium (Fast)"
popup/item_2/id = 2
popup/item_3/text = "High (Average)"
popup/item_3/id = 3
popup/item_4/text = "Very High (Slow)"
popup/item_4/id = 4
popup/item_5/text = "Ultra (Slower)"
popup/item_5/id = 5
script = ExtResource("13_tast2")
[node name="MeshLODLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Model Quality:"
[node name="MeshLODOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 4
selected = 2
popup/item_0/text = "Low (Faster)"
popup/item_0/id = 0
popup/item_1/text = "Medium (Fast)"
popup/item_1/id = 1
popup/item_2/text = "High (Average)"
popup/item_2/id = 2
popup/item_3/text = "Ultra (Slow)"
popup/item_3/id = 3
script = ExtResource("14_gekxq")
[node name="EnvironmentSection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "Effect Settings"
horizontal_alignment = 1
[node name="EnvironmentGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
columns = 2
[node name="SDFGILabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Global Illumination:"
[node name="SDFGIOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 3
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Low (Average)"
popup/item_1/id = 1
popup/item_2/text = "High (Slow)"
popup/item_2/id = 2
script = ExtResource("15_yf3v0")
[node name="GlowLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Bloom:"
[node name="GlowOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 3
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Low (Fast)"
popup/item_1/id = 1
popup/item_2/text = "High (Average)"
popup/item_2/id = 2
script = ExtResource("16_pq7lj")
[node name="SSAOLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Ambient Occlusion:"
[node name="SSAOOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 5
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Very Low (Fast)"
popup/item_1/id = 1
popup/item_2/text = "Low (Fast)"
popup/item_2/id = 2
popup/item_3/text = "Medium (Average)"
popup/item_3/id = 3
popup/item_4/text = "High (Slow)"
popup/item_4/id = 4
script = ExtResource("17_xi4oy")
[node name="SSReflectionsLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 14
text = "Screen-Space Reflections:"
[node name="SSReflectionsOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 4
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Low (Average)"
popup/item_1/id = 1
popup/item_2/text = "Medium (Slow)"
popup/item_2/id = 2
popup/item_3/text = "High (Slower)"
popup/item_3/id = 3
script = ExtResource("18_dprjc")
[node name="SSILLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Screen-Space Lighting:"
[node name="SSILOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 5
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Very Low (Fast)"
popup/item_1/id = 1
popup/item_2/text = "Low (Average)"
popup/item_2/id = 2
popup/item_3/text = "Medium (Slow)"
popup/item_3/id = 3
popup/item_4/text = "High (Slower)"
popup/item_4/id = 4
script = ExtResource("19_myuy8")
[node name="VolumetricFogLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Volumetric Fog:"
[node name="VolumetricFogOptionButton" type="OptionButton" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
item_count = 3
selected = 0
popup/item_0/text = "Disabled (Fastest)"
popup/item_0/id = 0
popup/item_1/text = "Low (Fast)"
popup/item_1/id = 1
popup/item_2/text = "High (Average)"
popup/item_2/id = 2
script = ExtResource("20_wf7u8")
[node name="AdjustmentSection" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
visible = false
layout_mode = 2
theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1)
text = "Adjustments"
horizontal_alignment = 1
[node name="AdjustmentsGridContainer" type="GridContainer" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer"]
visible = false
layout_mode = 2
columns = 2
[node name="BrightnessLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Brightness:"
[node name="BrightnessSlider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
min_value = 0.5
max_value = 2.0
step = 0.01
value = 1.0
[node name="ContrastLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Contrast:"
[node name="ContrastSlider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
min_value = 0.5
max_value = 2.0
step = 0.01
value = 1.0
[node name="SaturationLabel" type="Label" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 16
text = "Saturation:"
[node name="SaturationSlider" type="HSlider" parent="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/AdjustmentsGridContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
min_value = 0.01
max_value = 2.0
step = 0.01
value = 1.0
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 23
theme_override_constants/margin_bottom = 15
[node name="Buttons" type="HBoxContainer" parent="VBoxContainer/MarginContainer"]
layout_mode = 2
[node name="Save" type="Button" parent="VBoxContainer/MarginContainer/Buttons"]
layout_mode = 2
size_flags_horizontal = 3
text = "Save"
[node name="Reset" type="Button" parent="VBoxContainer/MarginContainer/Buttons"]
layout_mode = 2
size_flags_horizontal = 3
text = "Reset"
[node name="Close" type="Button" parent="VBoxContainer/MarginContainer/Buttons"]
layout_mode = 2
size_flags_horizontal = 3
text = "Close"
[connection signal="pressed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets/VeryLowPreset" to="." method="_on_very_low_preset_pressed"]
[connection signal="pressed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets/LowPreset" to="." method="_on_low_preset_pressed"]
[connection signal="pressed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets/MediumPreset" to="." method="_on_medium_preset_pressed"]
[connection signal="pressed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets/HighPreset" to="." method="_on_high_preset_pressed"]
[connection signal="pressed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/Presets/UltraPreset" to="." method="_on_ultra_preset_pressed"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/UIGridContainer/UIScaleOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/UIGridContainer/UIScaleOptionButton" method="_on_item_selected"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls/SpinBox" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls" method="_on_spin_box_value_changed"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls/Slider" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ControlsGridContainer/SensitivityControls" method="_on_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls/SpinBox" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls" method="_on_spin_box_value_changed"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls/Slider" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FOVControls" method="_on_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls/SpinBox" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls" method="_on_spin_box_value_changed"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls/Slider" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/QualityControls" method="_on_slider_value_changed"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FilterOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FilterOptionButton" method="_on_item_selected"]
[connection signal="value_changed" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FSRSharpnessSlider" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FSRSharpnessSlider" method="_on_value_changed"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/WindowModeOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/WindowModeOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/VsyncOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/VsyncOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/TAAOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/TAAOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/MSAAOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/MSAAOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FXAAOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/ViewportGridContainer/FXAAOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/ShadowSizeOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/ShadowSizeOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/ShadowFilterOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/ShadowFilterOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/MeshLODOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/QualityGridContainer/MeshLODOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SDFGIOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SDFGIOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/GlowOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/GlowOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSAOOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSAOOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSReflectionsOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSReflectionsOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSILOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/SSILOptionButton" method="_on_item_selected"]
[connection signal="item_selected" from="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/VolumetricFogOptionButton" to="VBoxContainer/ScrollContainer/MarginContainer/VBoxContainer/EnvironmentGridContainer/VolumetricFogOptionButton" method="_on_item_selected"]
[connection signal="pressed" from="VBoxContainer/MarginContainer/Buttons/Save" to="." method="_on_apply_pressed"]
[connection signal="pressed" from="VBoxContainer/MarginContainer/Buttons/Reset" to="." method="_on_reset_pressed"]
[connection signal="pressed" from="VBoxContainer/MarginContainer/Buttons/Close" to="." method="_on_close_pressed"]

View file

@ -0,0 +1,25 @@
[gd_scene load_steps=5 format=3 uid="uid://chy8tm6hvummq"]
[ext_resource type="Shader" uid="uid://n2dcb4l0qun2" path="res://scenes/interfaces/progress_bar/resources/visual_shader.res" id="1_07e5d"]
[ext_resource type="Script" uid="uid://byosh6q0ei28k" path="res://scenes/interfaces/progress_bar/progress_bar_3d.gd" id="1_kpyfi"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4quui"]
render_priority = 0
shader = ExtResource("1_07e5d")
[sub_resource type="QuadMesh" id="QuadMesh_fwm7g"]
resource_local_to_scene = true
material = SubResource("ShaderMaterial_4quui")
size = Vector2(1, 0.1)
[node name="ProgressBar3D" type="MeshInstance3D"]
cast_shadow = 0
instance_shader_parameters/background = Color(0, 0, 0, 0.5)
instance_shader_parameters/billboard = 2
instance_shader_parameters/border = 0.2
instance_shader_parameters/fill = Color(0, 1, 0, 1)
instance_shader_parameters/progress = 1.0
instance_shader_parameters/size = Vector2(1, 0.1)
mesh = SubResource("QuadMesh_fwm7g")
script = ExtResource("1_kpyfi")
progress_bar_shader = ExtResource("1_07e5d")

View file

@ -0,0 +1,99 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
@tool
## An efficient progress bar in 3D using a quad mesh and a shader.
class_name ProgressBar3D extends MeshInstance3D
## Emitted when value has been changed.
signal value_changed(new_value : float)
## The minimum [member value].
@export var min_value : float = 0.:
set(new_value):
min_value = new_value
value = value
## The maximum [member value].
@export var max_value : float = 255.:
set(new_value):
max_value = new_value
value = value
## The current value.
@export var value : float = 255.:
set = set_value
func set_value(new_value : float) -> void:
value = clampf(new_value, min_value, max_value)
_update_shader_params()
value_changed.emit(value)
## The size of the border.
@export_range(0., 1.) var border : float = .2:
set(new_border):
border = new_border
_update_shader_params()
## The billboard mode, see [member BaseMaterial3D.BillboardMode] for more details.
@export_enum("Disabled", "Enabled", "Y-Billboard") var billboard : int = 2:
set(new_billboard):
billboard = new_billboard
_update_shader_params()
## The fill color.
@export var fill : Color = Color.GREEN:
set(value):
fill = value
_update_shader_params()
## The background color.
@export var background : Color = Color(0, 0, 0, 0.5):
set(value):
background = value
_update_shader_params()
@export var progress_bar_shader : VisualShader
## Setup the [QuadMesh], [ShaderMaterial] and [VisualShader]
## when entering the node tree
func _enter_tree() -> void:
# set default mesh
if not mesh:
mesh = QuadMesh.new()
mesh.size = Vector2(1, .1)
# set default material
if not mesh.material or not mesh.material is ShaderMaterial:
# @NOTE: Per-instance uniforms allow for better shader reuse and are
# therefore faster, so they should be preferred over duplicating the
# ShaderMaterial when possible.
mesh.material = ShaderMaterial.new()
# set default shader
mesh.material.shader = progress_bar_shader
if not mesh.changed.is_connected(_update_shader_params):
mesh.changed.connect(_update_shader_params)
# update shader params once
mesh.emit_changed()
## This method updates instance shader params
func _update_shader_params() -> void:
set_instance_shader_parameter("background", background)
set_instance_shader_parameter("billboard", billboard)
set_instance_shader_parameter("border", border)
set_instance_shader_parameter("fill", fill)
set_instance_shader_parameter("progress", value / max_value)
set_instance_shader_parameter("size", mesh.size)

View file

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

View file

@ -0,0 +1,35 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name DeathmatchScoringComponent extends Node
@export var ON_KILL_SCORE := Vector3i(1,0,0)
signal add_score(peer_id:int, score:Vector3i)
## This method returns a new bound deathmatch scoring component to be added in tree.
func _init(scoreboard:Scoreboard, players: Node) -> void:
add_score.connect(scoreboard.add_score)
players.child_entered_tree.connect(register)
players.child_exiting_tree.connect(unregister)
func register(player: Player) -> void:
player.killed.connect(_on_player_killed)
func unregister(player: Player) -> void:
player.killed.disconnect(_on_player_killed)
func _on_player_killed(victim: Player, killer:int) -> void:
if victim.peer_id != killer:
add_score.emit(killer, ON_KILL_SCORE)

View file

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

View file

@ -0,0 +1,57 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## This defines a rabbit scoring component.
class_name RabbitScoringComponent extends Node
const ON_GRAB_SCORE := Vector3i(1,0,0)
const ON_HOLD_SCORE := Vector3i(1,0,0)
const HOLD_SCORING_TIMER:float = 10.0 # seconds
var timer:= Timer.new()
signal add_score(peer_id:int, score:Vector3i)
# @TODO: remove this variable by passing flag to signals `grabbed` and `dropped`
# this if fine for rabbit but will be required for CTF
var flag: Flag
# This method initializes a new rabbit scoring component.
func _init(scoreboard:Scoreboard, _flag:Flag) -> void:
timer.timeout.connect(_on_timer_timeout.bind(_flag))
add_score.connect(scoreboard.add_score)
flag = _flag
flag.grabbed.connect(_on_flag_grabbed)
flag.dropped.connect(_on_flag_dropped)
func _ready() -> void:
add_child(timer)
func _on_flag_grabbed(carry:FlagHolder) -> void:
assert(flag)
# prevent chained grab scoring abuse
if flag and (not flag.last_carrier or flag.last_carrier != carry.owner.peer_id):
# set new carrier for `_on_timer_timeout`
flag.last_carrier = carry.owner.peer_id
add_score.emit(carry.owner.peer_id, ON_GRAB_SCORE)
timer.start(HOLD_SCORING_TIMER)
func _on_flag_dropped(_carry: FlagHolder) -> void:
assert(flag)
timer.stop()
func _on_timer_timeout(_flag:Flag) -> void:
assert(flag)
if _flag.last_carrier:
add_score.emit(_flag.last_carrier, ON_HOLD_SCORE)

View file

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

View file

@ -0,0 +1,21 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name PingLabel extends Label
@export var entry : ScorePanelEntry
func _on_sync(state: Dictionary) -> void:
if entry.peer_id in state:
text = str(state[entry.peer_id])

View file

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

View file

@ -0,0 +1,80 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## This defines a score panel to hold [ScorePanelEntry] instances.
class_name ScorePanel extends Panel
# The ScorePanelEntry packed scene to instantiate
@export var _SCORE_PANEL_ENTRY:PackedScene
## This is the panel title.
@export var title:Label
## This is the container for [ScorePanelEntry] child nodes.
@export var entries:VBoxContainer
# This is the iterator index cursor.
var _iter_cursor:int = 0
# This method is an iterator initializer.
func _iter_init(_arg:Variant) -> bool:
_iter_cursor = 0 # reset
return _iter_cursor < entries.get_child_count()
# This method checks if the iterator has a next value.
func _iter_next(_arg:Variant) -> bool:
_iter_cursor += 1
return _iter_cursor < entries.get_child_count()
# This method gets the next iterator value.
func _iter_get(_arg:Variant) -> ScorePanelEntry:
return entries.get_child(_iter_cursor)
func _to_string() -> String:
return "<ScorePanel#%s>" % get_instance_id()
## This method adds an entry to the panel.
func add_entry(peer_id:int, username:String, score:Vector3i = Vector3i.ZERO) -> ScorePanelEntry:
var entry:ScorePanelEntry = _SCORE_PANEL_ENTRY.instantiate()
entry.name = str(peer_id)
entry.peer_id = peer_id
entries.add_child(entry)
entry.ping.text = ""
entry._username = username
entry._score = score
return entry
## This method removes a [ScorePanelEntry] from the [ScorePanel].
func remove_entry(entry:ScorePanelEntry) -> void:
entries.remove_child(entry)
entry.free()
## This method returns a [ScorePanelEntry] from the [ScorePanel].
func get_entry(index:int) -> ScorePanelEntry:
return entries.get_child(index)
## This method removes a [ScorePanelEntry] from the [ScorePanel] by [param name]
## and returns a boolean to indicate removal state.
func remove_entry_by_name(entry_name:String) -> bool:
var path := NodePath(entry_name)
if entries.has_node(path):
var entry:ScorePanelEntry = entries.get_node(path)
remove_entry(entry)
return true
else:
return false
func remove_entry_by_peer_id(peer_id:int) -> bool:
return remove_entry_by_name(str(peer_id))
func size() -> int:
return entries.get_child_count()

View file

@ -0,0 +1 @@
uid://2437cer6oiis

View file

@ -0,0 +1,66 @@
[gd_scene load_steps=4 format=3 uid="uid://p1q2lu7mtte1"]
[ext_resource type="Script" uid="uid://2437cer6oiis" path="res://scenes/interfaces/scoreboard/score_panel.gd" id="1_diy54"]
[ext_resource type="PackedScene" uid="uid://bu186wanwk1kh" path="res://scenes/interfaces/scoreboard/score_panel_entry.tscn" id="2_54ms2"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_bhp7i"]
properties/0/path = NodePath("MarginContainer/VBoxContainer/Title:text")
properties/0/spawn = true
properties/0/replication_mode = 2
properties/1/path = NodePath("MarginContainer/VBoxContainer/Title:visible")
properties/1/spawn = true
properties/1/replication_mode = 2
[node name="ScorePanel" type="Panel" node_paths=PackedStringArray("title", "entries")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 2
script = ExtResource("1_diy54")
_SCORE_PANEL_ENTRY = ExtResource("2_54ms2")
title = NodePath("MarginContainer/VBoxContainer/Title")
entries = NodePath("MarginContainer/VBoxContainer/Entries")
[node name="ScorePanelSync" type="MultiplayerSynchronizer" parent="."]
replication_interval = 1.0
delta_interval = 1.0
replication_config = SubResource("SceneReplicationConfig_bhp7i")
[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_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer"]
visible = false
layout_mode = 2
theme_type_variation = &"HeaderSmall"
text = "PANEL TITLE"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="Headers" parent="MarginContainer/VBoxContainer" instance=ExtResource("2_54ms2")]
layout_mode = 2
[node name="Entries" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="EntrySpawner" type="MultiplayerSpawner" parent="MarginContainer/VBoxContainer"]
_spawnable_scenes = PackedStringArray("uid://bu186wanwk1kh")
spawn_path = NodePath("../Entries")

View file

@ -0,0 +1,61 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name ScorePanelEntry extends HBoxContainer
@export var scoring: bool = true
@export var _ping : int:
set = set_ping
@export var _username : String:
set = set_username
@export var _score : Vector3i = Vector3i.ZERO:
set = set_score
@export var ping : PingLabel
@export var username : Label
@export var offense : Label
@export var defense : Label
@export var style : Label
@export var score : Label
var peer_id : int
func get_total() -> int:
return _score.x + _score.y + _score.z
func _to_string() -> String:
return "<ScorePanelEntry(%s)#%s>" % [name, get_instance_id()]
# setters
func set_username(new_username : String) -> void:
_username = new_username
username.text = new_username
func set_ping(new_ping : int) -> void:
_ping = new_ping
ping.text = str(_ping)
func set_score(new_score : Vector3i) -> void:
if scoring:
_score = new_score
offense.text = str(_score.x)
defense.text = str(_score.y)
style.text = str(_score.z)
score.text = str(get_total())
# This is called when the Scoreboard.scoring_state_changed signal is emmitted
func _on_scoring_state_changed(new_scoring: bool) -> void:
scoring = new_scoring

View file

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

View file

@ -0,0 +1,92 @@
[gd_scene load_steps=4 format=3 uid="uid://bu186wanwk1kh"]
[ext_resource type="Script" uid="uid://qmamlbbhdg41" path="res://scenes/interfaces/scoreboard/score_panel_entry.gd" id="1_ohfvg"]
[ext_resource type="Script" uid="uid://tym7ru076isy" path="res://scenes/interfaces/scoreboard/ping_label.gd" id="2_rlg8k"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_hpwcf"]
properties/0/path = NodePath("Ping:text")
properties/0/spawn = true
properties/0/replication_mode = 2
properties/1/path = NodePath("Username:text")
properties/1/spawn = true
properties/1/replication_mode = 2
properties/2/path = NodePath("Offense:text")
properties/2/spawn = true
properties/2/replication_mode = 2
properties/3/path = NodePath("Defense:text")
properties/3/spawn = true
properties/3/replication_mode = 2
properties/4/path = NodePath("Style:text")
properties/4/spawn = true
properties/4/replication_mode = 2
properties/5/path = NodePath("Score:text")
properties/5/spawn = true
properties/5/replication_mode = 2
[node name="Entry" type="HBoxContainer" node_paths=PackedStringArray("ping", "username", "offense", "defense", "style", "score")]
anchors_preset = 10
anchor_right = 1.0
offset_bottom = 17.0
grow_horizontal = 2
script = ExtResource("1_ohfvg")
ping = NodePath("Ping")
username = NodePath("Username")
offense = NodePath("Offense")
defense = NodePath("Defense")
style = NodePath("Style")
score = NodePath("Score")
[node name="EntrySync" type="MultiplayerSynchronizer" parent="."]
replication_interval = 0.5
delta_interval = 0.5
replication_config = SubResource("SceneReplicationConfig_hpwcf")
[node name="Ping" type="Label" parent="." node_paths=PackedStringArray("entry")]
custom_minimum_size = Vector2(64, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "PING"
horizontal_alignment = 1
vertical_alignment = 1
script = ExtResource("2_rlg8k")
entry = NodePath("..")
[node name="Username" type="Label" parent="."]
custom_minimum_size = Vector2(128, 0)
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 12
text = "USERNAME"
vertical_alignment = 1
[node name="Offense" type="Label" parent="."]
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "O"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Defense" type="Label" parent="."]
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "D"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Style" type="Label" parent="."]
custom_minimum_size = Vector2(32, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "S"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Score" type="Label" parent="."]
custom_minimum_size = Vector2(96, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 12
text = "SCORE"
horizontal_alignment = 1
vertical_alignment = 1

View file

@ -0,0 +1,138 @@
# This file is part of sunder.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## This defines a scoreboard to track players, scores and teams.
## It is a container for [ScorePanel] instances.
@icon("res://assets/icons/scoreboard.svg")
class_name Scoreboard extends Control
signal scoring_state_changed(new_scoring: bool)
# @TODO: disable scoreboard branch processing for local system when hidden
# hide pawn hud when scoreboard is visible
## This controls whether [Entry] scores can be updated or not.
@export var scoring: bool:
set = set_scoring
func set_scoring(new_scoring: bool) -> void:
scoring = new_scoring
scoring_state_changed.emit(scoring)
# The score panel scene to spawn.
@export var _SCORE_PANEL: PackedScene
## This is the container for [ScorePanel] child nodes.
@export var panels: GridContainer
#@export var scoring_resources:Array[ScoringResource]
func _ready() -> void:
visible = false
set_anchors_preset(PRESET_FULL_RECT)
panels.child_entered_tree.connect(_on_score_panel_added)
panels.child_exiting_tree.connect(_on_score_panel_removed)
func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("scoreboard"):
show()
elif event.is_action_released("scoreboard"):
hide()
func _on_score_panel_added(panel: ScorePanel) -> void:
if not panel.entries.child_entered_tree.is_connected(_on_entry_added):
panel.entries.child_entered_tree.connect(_on_entry_added)
func _on_score_panel_removed(panel: ScorePanel) -> void:
if panel.entries.child_entered_tree.is_connected(_on_entry_added):
panel.entries.child_entered_tree.disconnect(_on_entry_added)
func _on_entry_added(entry: ScorePanelEntry) -> void:
if not scoring_state_changed.is_connected(entry._on_scoring_state_changed):
scoring_state_changed.connect(entry._on_scoring_state_changed)
func _on_entry_removed(entry: ScorePanelEntry) -> void:
if scoring_state_changed.is_connected(entry._on_scoring_state_changed):
scoring_state_changed.disconnect(entry._on_scoring_state_changed)
func _on_ping_sync(state: Dictionary) -> void:
for panel: ScorePanel in panels.get_children():
for entry in panel:
entry.ping._on_sync(state)
func _to_string() -> String:
return "<Scoreboard#%s>" % get_instance_id()
## This method adds a [ScorePanel] to the [Scoreboard] and returns a reference to the added [ScorePanel].
func add_panel(panel_name : String = "") -> ScorePanel:
var score_panel: ScorePanel = _SCORE_PANEL.instantiate()
var score_panel_name := str(panel_name)
if score_panel_name.is_valid_identifier():
score_panel.name = score_panel_name
panels.add_child(score_panel)
panels.columns = 2 if panels.get_child_count() > 2 else panels.get_child_count()
return score_panel
## This method removes a [ScorePanel] from the [Scoreboard].
func remove_panel(panel: ScorePanel) -> void:
panels.remove_child(panel)
panel.free()
## This method returns a [ScorePanel] from the [Scoreboard].
func get_panel(index: int) -> ScorePanel:
return panels.get_child(index)
## This method removes an entry by its node name in the tree.
func remove_entry_by_name(entry_name: String) -> bool:
for panel : ScorePanel in panels.get_children():
if panel.remove_entry_by_name(entry_name):
return true
return false
func get_entry(peer_id: int) -> ScorePanelEntry:
for panel : ScorePanel in panels.get_children():
for entry in panel:
if entry.peer_id == peer_id:
return entry
return null
## This method returns the score of the given [param peer_id].
func get_score(peer_id: int) -> Vector3i:
var entry : ScorePanelEntry = get_entry(peer_id)
return entry._score if entry else Vector3i.ZERO
## This method sets the score of the given [param peer_id].
func set_score(peer_id:int, score:Vector3i) -> bool:
var entry : ScorePanelEntry = get_entry(peer_id)
if entry:
entry._score = score
return true
return false
## This method adds to the score of the given [param peer_id].
func add_score(peer_id:int, score:Vector3i) -> bool:
var entry : ScorePanelEntry = get_entry(peer_id)
if entry:
entry._score += score
return true
return false
## This method resets the scores of all [Entry] nodes.
func reset_scores() -> void:
for panel : ScorePanel in panels.get_children():
for entry in panel:
entry._score = Vector3.ZERO
## This method returns the number of [ScorePanel] children.
func size() -> int:
return panels.get_child_count()

View file

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

View file

@ -0,0 +1,81 @@
[gd_scene load_steps=5 format=3 uid="uid://b8bosdd0o1lu7"]
[ext_resource type="Script" uid="uid://cp5vl7av0yr5p" path="res://scenes/interfaces/scoreboard/scoreboard.gd" id="1_k2wav"]
[ext_resource type="Theme" uid="uid://bec7g0fax3c8o" path="res://scenes/interfaces/global_theme.tres" id="1_p81gx"]
[ext_resource type="PackedScene" uid="uid://p1q2lu7mtte1" path="res://scenes/interfaces/scoreboard/score_panel.tscn" id="2_oa7t6"]
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_jx1ww"]
properties/0/path = NodePath(".:columns")
properties/0/spawn = true
properties/0/replication_mode = 2
[node name="Scoreboard" type="Control" node_paths=PackedStringArray("panels")]
visible = false
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("1_p81gx")
script = ExtResource("1_k2wav")
_SCORE_PANEL = ExtResource("2_oa7t6")
panels = NodePath("MarginContainer/VBoxContainer/ScorePanels")
[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
mouse_filter = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
mouse_filter = 2
[node name="Header" type="Panel" parent="MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/Header"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -76.5
offset_top = -19.5
offset_right = 76.5
offset_bottom = 19.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
theme_type_variation = &"HeaderLarge"
text = "Scoreboard"
horizontal_alignment = 1
vertical_alignment = 1
uppercase = true
[node name="ScorePanels" type="GridContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
mouse_filter = 2
[node name="PanelSpawner" type="MultiplayerSpawner" parent="MarginContainer/VBoxContainer"]
_spawnable_scenes = PackedStringArray("uid://p1q2lu7mtte1")
spawn_path = NodePath("../ScorePanels")
spawn_limit = 4
[node name="ScoreboardSynchronizer" type="MultiplayerSynchronizer" parent="MarginContainer/VBoxContainer"]
root_path = NodePath("../ScorePanels")
replication_interval = 1.0
delta_interval = 1.0
replication_config = SubResource("SceneReplicationConfig_jx1ww")

View file

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="98.130043"
height="128"
version="1.1"
viewBox="0 0 25.963247 33.867"
id="svg8"
sodipodi:docname="chevron.svg"
inkscape:version="1.4 (1:1.4+202410161351+e7c3feb100)"
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="defs12">
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect2"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
radius="0"
unit="px"
method="auto"
mode="F"
chamfer_steps="1"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
<inkscape:path-effect
effect="fillet_chamfer"
id="path-effect1"
is_visible="true"
lpeversion="1"
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
radius="0"
unit="px"
method="auto"
mode="F"
chamfer_steps="1"
flexible="false"
use_knot_distance="true"
apply_no_radius="true"
apply_with_radius="true"
only_selected="false"
hide_knots="false" />
</defs>
<sodipodi:namedview
id="namedview10"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="5.5309912"
inkscape:cx="44.747856"
inkscape:cy="70.692573"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6"
showguides="false" />
<g
transform="matrix(1.0627,0,0,1.0881,-1.0755019,-1.4834)"
id="g6">
<path
d="M 1.0117672,3.5081121 V 15.313192 c 8.5e-6,1.391547 0.4554423,2.744854 1.2967571,3.853273 l 9.6225127,12.678021 c 0.651439,0.858273 1.941968,0.858273 2.593407,0 l 9.622512,-12.678021 c 0.841315,-1.108419 1.296749,-2.461726 1.296758,-3.853273 V 3.5081121 c 0,-1.1845507 -0.960268,-2.1448187 -2.144819,-2.1448183 H 3.1569072 c -1.1845504,0 -2.1448183,0.9602679 -2.1448183,2.1448183 z"
color="#000000"
fill="#fff"
stroke-width="2.26997"
style="fill:#000000;-inkscape-stroke:none"
id="path3867"
sodipodi:nodetypes="cccccccscscc"
inkscape:path-effect="#path-effect2"
inkscape:original-d="M 1.0117672,3.5081121 V 15.313192 c 8.5e-6,1.391547 0.4554423,2.744854 1.2967571,3.853273 l 9.6225127,12.678021 c 0.651439,0.858273 1.941968,0.858273 2.593407,0 l 9.622512,-12.678021 c 0.841315,-1.108419 1.296749,-2.461726 1.296758,-3.853273 V 3.5081121 c 0,-1.1845507 -0.960268,-2.1448187 -2.144819,-2.1448183 H 3.1569072 c -1.1845504,0 -2.1448183,0.9602679 -2.1448183,2.1448183 z" />
<path
d="m 6.146691,5.0107427 c -0.8138172,0 -1.5080753,0.6751882 -1.5080753,1.5080752 h -2.263e-4 v 8.3004451 c 5.9e-6,0.978432 0.3202328,1.929976 0.9117824,2.709333 l 6.7658292,8.914234 c 0.458043,0.603473 1.365446,0.603473 1.823489,0 l 6.765829,-8.914234 c 0.59155,-0.779357 0.911777,-1.730901 0.911783,-2.709333 V 6.5188179 c 0,-0.832887 -0.675188,-1.508075 -1.508075,-1.5080752"
color="#000000"
fill="#ffffff"
stroke-width="1.59608"
style="-inkscape-stroke:none"
id="path2"
sodipodi:nodetypes="cccccccccsc"
inkscape:path-effect="#path-effect1"
inkscape:original-d="m 6.146691,5.0107427 c -0.8138172,0 -1.5080753,0.6751882 -1.5080753,1.5080752 h -2.263e-4 v 8.3004451 c 5.9e-6,0.978432 0.3202328,1.929976 0.9117824,2.709333 l 6.7658292,8.914234 c 0.458043,0.603473 1.365446,0.603473 1.823489,0 l 6.765829,-8.914234 c 0.59155,-0.779357 0.911777,-1.730901 0.911783,-2.709333 V 6.5188179 c 0,-0.832887 -0.675188,-1.508075 -1.508075,-1.5080752" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci75minnfojkg"
path.s3tc="res://.godot/imported/chevron.svg-36dc527b858274e5462330b755617865.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://scenes/interfaces/waypoint/assets/chevron.svg"
dest_files=["res://.godot/imported/chevron.svg-36dc527b858274e5462330b755617865.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="209.33925"
height="137.80237"
version="1.1"
viewBox="0 0 55.385467 36.459604"
id="svg5"
sodipodi:docname="minimal.svg"
inkscape:version="1.4 (1:1.4+202410161351+e7c3feb100)"
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="defs5" />
<sodipodi:namedview
id="namedview5"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="1.3765909"
inkscape:cx="166.71619"
inkscape:cy="23.245831"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g6" />
<g
transform="matrix(1.0627,0,0,1.0881,102.01074,1.345381)"
id="g5">
<g
transform="translate(-38.352,24.796)"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
id="g4"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1">
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#000"
stroke-width="9.8421"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path3" />
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#fff"
stroke-width="7.8737"
style="stroke:#000000;stroke-width:15.7469;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path4" />
</g>
<g
transform="translate(-38.352,24.796)"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
id="g6"
style="fill:#ffffff;stroke:#000000;stroke-width:7.87346;stroke-dasharray:none;stroke-opacity:1">
<path
d="M -13.396,-18.159 -31.582,-0.398 -49.768,-18.159"
stop-color="#000000"
stroke="#fff"
stroke-width="7.8737"
style="fill:none;stroke:#fffdff;stroke-width:7.87346;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="path6"
sodipodi:nodetypes="ccc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4i7h27euhnvk"
path.s3tc="res://.godot/imported/minimal.svg-5e977e0f91a54a368b4eeb99ca5927ca.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://scenes/interfaces/waypoint/assets/minimal.svg"
dest_files=["res://.godot/imported/minimal.svg-5e977e0f91a54a368b4eeb99ca5927ca.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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=0
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

Some files were not shown because too many files have changed in this diff Show more