Skip to content

Commit f50eebb

Browse files
Merge pull request #37 from SpectrumPro/dev
Feture updates and improvements
2 parents f55e1b9 + f2f0548 commit f50eebb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+620
-635
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ jobs:
3333
cache: true
3434
presets_to_export: windows.x86_64, macOS.universal, linux.x86.64
3535

36+
- name: Rename Archives
37+
run: |
38+
mv linux.x86_64.zip SpectrumClient.x86_64.linux.${{inputs.version}}.zip
39+
mv windows.x86_64.zip SpectrumClient.x86_64.windows.${{inputs.version}}.zip
40+
mv macos.universal.zip SpectrumClient.universal.macos.${{inputs.version}}.zip
41+
3642
- name: Create git tag
3743
run: |
3844
git tag ${{ inputs.version }}

InterfaceConfig.gd

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1-
class_name InterfaceConfig
1+
# Copyright (c) 2025 Liam Sherwin. All rights reserved.
2+
# This file is part of the Spectrum Lighting Controller, licensed under the GPL v3.0 or later.
3+
# See the LICENSE file for details.
4+
5+
class_name InterfaceConfig extends Object
6+
## Store interface configs
7+
28

39
## File location to store the UI Save
410
var ui_save_location: String = "user://"
511

612
## File name to store the UI Save
713
var ui_save_file: String = "ui.json"
814

15+
## File location to store the UI Save
16+
var config_save_location: String = "user://"
17+
18+
## File name to store the UI Save
19+
var config_save_file: String = "interface.conf"
20+
21+
## Array of notice ID not to show again
22+
var notices_dont_show_again: Array[String]
23+
24+
## True if the UI should be saved to disk before the program closes
25+
var save_ui_on_quit: bool = true
26+
27+
## UI Scale factor
28+
var scale_factor: float = 1
29+
30+
931
## Default items in the UICommandPalette
1032
var command_palette_default_items: Array[CommandPaletteEntry] = [
1133
CommandPaletteEntry.new(
@@ -45,3 +67,78 @@ var object_picker_default_items: Dictionary[Script, ClassTreeConfig] = {
4567
Callable()
4668
)
4769
}
70+
71+
72+
## Built in start up notics
73+
var startup_notices: Array[StartUpNotice] = [
74+
StartUpNotice.new()
75+
.set_title("Beta Software Notice!")
76+
.set_title_icon("res://assets/logos/spectrum/dark_scaled/spectrum_dark-64x64.png")
77+
.set_version(Details.version)
78+
.set_bbcode_body(
79+
"""[ul]
80+
Spectrum is currently in [b]active development[/b] and is considered [b]beta software[/b].
81+
Features may change, bugs may exist, and stability is [b]not yet guaranteed[/b].
82+
It is [b]not recommended for mission-critical or production use[/b] at this stage.
83+
[/ul]"""
84+
.replace("\t", ""))
85+
.set_confirm_button_text("Acknowledge")
86+
.set_link_text("Github Issues")
87+
.set_link_url("https://github.com/SpectrumPro/Spectrum/issues")
88+
.set_notice_id("BETANOTICEV1.0.0-beta.3")
89+
]
90+
91+
## ConfigFile to save and load user config
92+
var _config_access: ConfigFile
93+
94+
95+
## init
96+
func _init() -> void:
97+
DirAccess.make_dir_recursive_absolute(config_save_location)
98+
_config_access = ConfigFile.new()
99+
100+
101+
## Loads (or creates if not already) the user config override
102+
func load_user_config() -> Error:
103+
_config_access.load(get_user_config_path())
104+
105+
var block_list: Array[String] = []
106+
block_list.assign(type_convert(_config_access.get_value("Interface", "notices_dont_show_again"), TYPE_ARRAY))
107+
notices_dont_show_again = block_list
108+
109+
scale_factor = type_convert(_config_access.get_value("Interface", "scale_factor", scale_factor), TYPE_FLOAT)
110+
save_ui_on_quit = type_convert(_config_access.get_value("Interface", "save_ui_on_quit", save_ui_on_quit), TYPE_BOOL)
111+
112+
save_user_config()
113+
return OK
114+
115+
116+
## Saves the user config to a file
117+
func save_user_config() -> Error:
118+
_config_access.set_value("Interface", "notices_dont_show_again", notices_dont_show_again)
119+
120+
_config_access.set_value("Interface", "scale_factor", scale_factor)
121+
_config_access.set_value("Interface", "save_ui_on_quit", save_ui_on_quit)
122+
123+
return _config_access.save(get_user_config_path())
124+
125+
126+
## Adds the given notice to the list of don't show again
127+
func notice_dont_show_again(p_id: String) -> void:
128+
if notices_dont_show_again.has(p_id):
129+
return
130+
131+
notices_dont_show_again.append(p_id)
132+
133+
134+
## Checks if a notice can be shown
135+
func can_show_notice(p_id: String) -> bool:
136+
return notices_dont_show_again.has(p_id)
137+
138+
139+
## Returns the full filepath to the user config
140+
func get_user_config_path() -> String:
141+
if config_save_location.ends_with("/"):
142+
return config_save_location + config_save_file
143+
else:
144+
return config_save_location + "/" + config_save_file

assets/icons/OpenInNew.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/icons/OpenInNew.svg.import

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://oojb1425vofd"
6+
path="res://.godot/imported/OpenInNew.svg-fc70be83fe0e972f2760ee77d7c76267.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/icons/OpenInNew.svg"
14+
dest_files=["res://.godot/imported/OpenInNew.svg-fc70be83fe0e972f2760ee77d7c76267.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/uastc_level=0
22+
compress/rdo_quality_loss=0.0
23+
compress/hdr_compression=1
24+
compress/normal_map=0
25+
compress/channel_pack=0
26+
mipmaps/generate=false
27+
mipmaps/limit=-1
28+
roughness/mode=0
29+
roughness/src_normal=""
30+
process/channel_remap/red=0
31+
process/channel_remap/green=1
32+
process/channel_remap/blue=2
33+
process/channel_remap/alpha=3
34+
process/fix_alpha_border=true
35+
process/premult_alpha=false
36+
process/normal_map_invert_y=false
37+
process/hdr_as_srgb=false
38+
process/hdr_clamp_exposure=false
39+
process/size_limit=0
40+
detect_3d/compress_to=1
41+
svg/scale=1.0
42+
editor/scale_with_editor_scale=false
43+
editor/convert_colors_with_editor_theme=false

components/ClientComponentSettings/ClassSettingsModule/ClassSettingsModule.gd

Lines changed: 0 additions & 197 deletions
This file was deleted.

components/ClientComponentSettings/ClassSettingsModule/ClassSettingsModule.gd.uid

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)