30 Commits

Author SHA1 Message Date
Sansan 6989b53dda Merge pull request 'Fixed workflow' (#35) from 1.8.0 into main
Build / build (push) Successful in 1m5s
Publish / build (push) Successful in 1m13s
Reviewed-on: #35
2026-05-16 17:50:05 +02:00
Sansan 899e99864f #9 #32 #33 : New winner screen, new setting for hide beginning and fixed bug
Build / build (push) Successful in 1m25s
2026-05-16 17:46:09 +02:00
Sansan 84608c95c2 Fixed workflow
Publish / build (push) Successful in 1m13s
2026-05-15 11:03:20 +02:00
Sansan acd8d65b95 #29 Small fixes
Build / build (push) Successful in 1m6s
Publish / build (push) Failing after 1m16s
2026-05-15 10:52:26 +02:00
Sansan d957c02373 #14 #15 #29 #31 : Added qr, added more settings, added keymap, changed about page.
Build / build (push) Successful in 1m5s
2026-05-14 12:24:50 +02:00
Sansan 0316df2f95 #14,#15,#29,#31: Added qr, added more settings, added keymap, changed about page.
Build / build (push) Successful in 1m10s
2026-05-14 12:18:42 +02:00
Sansan b4ba96cf63 #20 #24 Winnersong can be stopped. Inspirationlist speed can be changed. Some other small fixes
Build / build (push) Successful in 1m36s
2025-12-27 14:05:56 +01:00
Sansan 2a32cc34ef Sync result can be seen multiple times
Build / build (push) Successful in 1m19s
Publish / build (push) Successful in 1m33s
2025-11-15 15:02:21 +01:00
Sansan bae5831a3e #22: Now block add player if player name is empty
Build / build (push) Successful in 1m21s
#23: Add a log for when points are given to players
#25: Fixed some graphical stuff
#26: Changed so the same character can be on a song multiple times
#27: Turning off statistics after win
2025-11-15 14:53:51 +01:00
Sansan c6ed3c8e53 #17 #18: Removed Debug text in release and fixed bug with new character select screen
Build / build (push) Successful in 1m31s
Publish / build (push) Successful in 1m32s
2025-11-13 18:17:25 +01:00
Sansan 166705f2ab #4 #5 Added a new character select window that now fetches images from the server
Build / build (push) Successful in 1m31s
Publish / build (push) Successful in 2m39s
2025-11-07 20:46:45 +01:00
Sansan 734a463db9 #8: Added functionality to cache more than one song
Build / build (push) Successful in 1m25s
2025-10-26 20:48:35 +01:00
Sansan 4e6e37775d #2 #6 #7 Added a new sync screen that shows progress during sync
Build / build (push) Successful in 1m22s
2025-09-19 22:15:37 +02:00
Sansan 3e4d417b4f #1: Fixed bug with inspiration list and search list not updating on sync and server changed
Build / build (push) Successful in 1m30s
2025-08-24 12:00:29 +02:00
Sansan f46e742cdc Fix for macOS build
Build / build (push) Successful in 1m22s
Publish / build (push) Successful in 1m37s
2025-06-07 23:40:55 +02:00
Sansan f2b362067a Uppgraded to 4.4 and added:d gitea-ci
Build / build (push) Failing after 1m22s
2025-06-07 23:23:04 +02:00
Sansan 6d008b7715 Removed id from player name 2024-12-29 09:51:48 +01:00
Sansan 23f2ed11eb Updated how players and song list works
Made many changes with caching, how players works, added sound effects
and animations any many more things
2024-12-27 20:35:28 +01:00
Sansan c4a7d743d3 Added auto repeat and made some small fixes 2024-10-20 20:28:06 +02:00
Sansan e8171d81a9 Fixed light icons. Made the search "better". Added more shortcuts and tried to fix som bugs. 2024-08-15 20:10:22 +02:00
Sansan 1a7b371161 Mini fixes 2024-06-12 22:23:26 +02:00
Sansan 2f12c1e25c Added icons, a lot of refactoring and optimising 2024-06-12 22:20:33 +02:00
Sansan f0b57981bc Changed path for sound test 2024-05-30 17:47:49 +02:00
Sansan d43a1c7df6 Fixed settings and updated player view. Fixed many other smaler things 2024-05-19 13:39:18 +02:00
Sansan 0d0b5280f8 Merge branch 'main' of https://gitea.sanplex.tech/Sansan/MusicPlayer 2024-05-18 13:58:53 +02:00
Sansan b36e2271a8 Fixes 2024-05-18 13:57:08 +02:00
Sansan c5e6366760 Added shortcuts. Added dialog for winner. Started cleaning code. 2023-09-11 21:20:48 +02:00
Sansan 724455b232 Added hopping between songs. Added settings menu, not finished. 2023-09-10 22:37:57 +02:00
Sansan c9ea40215d Fixed sounds effects with points. Fixed buttons statistics and about 2023-09-08 22:14:54 +02:00
Sansan 050d19039c Fixed add player process where name can be set. Added signals for points. Added settings file. Changed some shortcuts. 2023-09-07 21:55:31 +02:00
129 changed files with 30122 additions and 989 deletions
+59
View File
@@ -0,0 +1,59 @@
#
# .gitea/workflows/gitea-build.yaml
#
#
name: "Build"
on:
push:
branches: [main, develop]
env:
GODOT_VERSION: 4.6
PROJECT_PATH: .
EXPORT_NAME: MusicPlayer
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Godot
run: |
#echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip"
curl -L -o godot.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip
unzip godot.zip
mv Godot_v$GODOT_VERSION-stable_linux.x86_64 godot
chmod +x godot
- name: Download Godot Export Templates
run: |
#echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz"
curl -L -o export_templates.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz
unzip export_templates.zip
- name: Install Export Templates
run: |
mkdir -p ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
mv ./templates/* ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
- name: Create build folder
run: |
mkdir -v -p build
- name: Windows Build
run: |
cd $PROJECT_PATH
./godot --headless --verbose --export-release "Windows Desktop" "build/$EXPORT_NAME.exe"
- name: Linux Build
run: |
cd $PROJECT_PATH
./godot --headless --verbose --export-release "Linux" "build/$EXPORT_NAME.x86_64"
# - name: MacOS Build
# run: |
# cd $PROJECT_PATH
# ./godot --headless --verbose --export-release "macOS" "build/$EXPORT_NAME.zip"
+90
View File
@@ -0,0 +1,90 @@
#
# .gitea/workflows/gitea-release.yaml
#
#
name: "Publish"
on:
push:
branches:
- '*.*'
env:
GODOT_VERSION: 4.6
PROJECT_PATH: .
PROJECT_NAME: MusicPlayer
GAME_VERSION: ${{gitea.ref_name}}
EXPORT_NAME: MusicPlayer_${{gitea.ref_name}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Godot
run: |
#echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip"
curl -L -o godot.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip
unzip godot.zip
mv Godot_v$GODOT_VERSION-stable_linux.x86_64 godot
chmod +x godot
- name: Download Godot Export Templates
run: |
#echo "https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz"
curl -L -o export_templates.zip https://github.com/godotengine/godot-builds/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz
unzip export_templates.zip
- name: Install Export Templates
run: |
mkdir -p ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
mv ./templates/* ~/.local/share/godot/export_templates/$GODOT_VERSION.stable
- name: Create build folder
run: |
mkdir -v -p build
- name: Windows Build
run: |
cd $PROJECT_PATH
./godot --headless --verbose --export-release "Windows Desktop" "build/$EXPORT_NAME.exe"
- name: Linux Build
run: |
cd $PROJECT_PATH
./godot --headless --verbose --export-release "Linux" "build/$EXPORT_NAME.x86_64"
# - name: MacOS Build
# run: |
# cd $PROJECT_PATH
# ./godot --headless --verbose --export-release "macOS" "build/$EXPORT_NAME.zip"
- name: Upload Artifact Windows
run: |
#ls -la build
curl --user ${{ github.repository_owner }}:${{ secrets.TOKEN }} \
--upload-file "build/$EXPORT_NAME.exe" \
https://gitea.sanplex.xyz/api/packages/sansan/generic/$PROJECT_NAME/$GAME_VERSION/$EXPORT_NAME.exe
- name: Upload Artifact Linux
run: |
ls -la build
curl --user ${{ github.repository_owner }}:${{ secrets.TOKEN }} \
--upload-file "build/$EXPORT_NAME.x86_64" \
https://gitea.sanplex.xyz/api/packages/sansan/generic/$PROJECT_NAME/$GAME_VERSION/$EXPORT_NAME.x86_64
# - name: Upload Artifact MacOS
# run: |
# ls -la build
# curl --user ${{ github.repository_owner }}:${{ secrets.TOKEN }} \
# --upload-file "build/$EXPORT_NAME.zip" \
# https://gitea.sanplex.xyz/api/packages/sansan/generic/$PROJECT_NAME/$GAME_VERSION/$EXPORT_NAME.zip
- name: Create release
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: |-
build/**
+6
View File
@@ -1,2 +1,8 @@
# Godot 4+ specific ignores # Godot 4+ specific ignores
.godot/ .godot/
/web/
*.exe
*.dmg
.idea
.vscode
.DS_Store
-19
View File
@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://n2g8jddr85h2"
path="res://.godot/imported/01. Opening.mp3-3b470cf2b258d9ffad574f672712bdc3.mp3str"
[deps]
source_file="res://01. Opening.mp3"
dest_files=["res://.godot/imported/01. Opening.mp3-3b470cf2b258d9ffad574f672712bdc3.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
+70
View File
@@ -0,0 +1,70 @@
extends Control
@onready
var about_panel: Panel = %AboutPanel
@onready
var version_label: Label = %VersionLabel
@onready
var whats_new_label: Label = %WhatsNewLabel
# Changelog as Dictionary with version as key and description as value
const WHATS_NEW: Dictionary = {
"1.8.5": "#9: New winner screen with positions of all players
#32: New setting for how long to hide the beginning
#33: Fixed bug with hiding beginning when song restarts",
"1.8.0": "#14: Updated About page
#15: Create new keymap page
#20: The winner song can now be stopped
#24: The speed of the inspiration list can now be changed
#29: New settings to hide time left and things like that
#31: Added a QR page",
"1.7.0": "#22: Now block add player if player name is empty
#23: Add a log for when points are given to players
#25: Fixed some graphical stuff
#26: Changed so the same character can be on a song multiple times
#27: Turning off statistics after win",
"1.6.1": "#17: Removed Debug text in release
#18: Fixed bug with new character select screen",
"1.6.0": "#1: Fixed bug with inspiration list not reloading after sync
#2: New dialog for sync
#4: Now downloads characters from the server
#5: New character select screen
#6: Now show progress during sync
#7: Blocking all requests to the server during sync
#8: Added functionality to cache more than one song",
"1.5.0": "Made big changes to players and the song list and how the local song list works",
"0.9.0-Beta": "Fixed settings and updated the player view",
"0.8.0-Beta": "Fixed reset buttons and some other small things",
"0.7.8-Beta": "Added shortcuts. Added dialog for winner. Started cleaning code.",
"0.7.5-Beta": "Added settings menu, most things don't do anything yet",
"0.7-Beta": "Can now hop between songs"
}
func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), about_panel.size).has_point(evLocal.position):
self.visible = false
func show_window() -> void:
visible = true
version_label.text = Settings.version
# Build changelog text with version headers
var changelog_text: String = ""
for version: String in WHATS_NEW.keys():
changelog_text += "\n" + version + "\n"
changelog_text += WHATS_NEW[version] + "\n"
whats_new_label.text = changelog_text
func hide_window() -> void:
visible = false
+1
View File
@@ -0,0 +1 @@
uid://b7bh0of7olbcb
+63
View File
@@ -0,0 +1,63 @@
[gd_scene format=3 uid="uid://cp54idaudb8dp"]
[ext_resource type="Script" uid="uid://b7bh0of7olbcb" path="res://AboutWindow.gd" id="1_about_script"]
[node name="AboutControl" type="Control" unique_id=1626010355]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_about_script")
[node name="AboutPanel" type="Panel" parent="." unique_id=1907299275]
unique_name_in_owner = true
layout_mode = 0
offset_right = 600.0
offset_bottom = 640.0
[node name="TitleLabel" type="Label" parent="AboutPanel" unique_id=200295721]
texture_filter = 1
layout_mode = 0
offset_right = 600.0
offset_bottom = 50.0
text = "About"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ScrollContainer" type="ScrollContainer" parent="AboutPanel" unique_id=417677913]
layout_mode = 0
offset_left = 10.0
offset_top = 50.0
offset_right = 590.0
offset_bottom = 630.0
[node name="ContentVBox" type="VBoxContainer" parent="AboutPanel/ScrollContainer" unique_id=1746337912]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VersionLabel" type="Label" parent="AboutPanel/ScrollContainer/ContentVBox" unique_id=352884126]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
horizontal_alignment = 1
[node name="DescriptionLabel" type="Label" parent="AboutPanel/ScrollContainer/ContentVBox" unique_id=543094263]
texture_filter = 1
custom_minimum_size = Vector2(560, 0)
layout_mode = 2
size_flags_horizontal = 3
text = "Try your video game music knowledge with this VGM randomizer, invite your friends and see who is the best."
horizontal_alignment = 1
autowrap_mode = 2
[node name="WhatsNewLabel" type="Label" parent="AboutPanel/ScrollContainer/ContentVBox" unique_id=1363040291]
unique_name_in_owner = true
texture_filter = 1
custom_minimum_size = Vector2(560, 0)
layout_mode = 2
size_flags_horizontal = 3
autowrap_mode = 2
+2 -6
View File
@@ -15,7 +15,8 @@ func _ready():
characters.list_dir_begin() characters.list_dir_begin()
var file_name = characters.get_next() var file_name = characters.get_next()
while file_name != "": while file_name != "":
if !file_name.ends_with(".import"): file_name = file_name.replace('.import', '') # <--- remove the .import
if file_name.ends_with(".png"):
var texture = load("res://characters/" + file_name) var texture = load("res://characters/" + file_name)
@@ -36,9 +37,4 @@ func show_grid():
func select_character(file_name: String): func select_character(file_name: String):
print("select_character") print("select_character")
#character_grid_container.visible = false
character_selected.emit(file_name) character_selected.emit(file_name)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
+1
View File
@@ -0,0 +1 @@
uid://cmxl2w45vvmx6
+1 -1
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://b16on0oscg1bv"] [gd_scene load_steps=2 format=3 uid="uid://b16on0oscg1bv"]
[ext_resource type="Script" path="res://CharacterSelect.gd" id="1_4bba6"] [ext_resource type="Script" uid="uid://cmxl2w45vvmx6" path="res://CharacterSelect.gd" id="1_4bba6"]
[node name="CharacterSelect" type="Control"] [node name="CharacterSelect" type="Control"]
layout_mode = 3 layout_mode = 3
+9 -11
View File
@@ -1,36 +1,34 @@
extends ScrollContainer extends ScrollContainer
var SCROLL = 0 var SCROLL: float = 0
var delay = 0.02 #seconds var delay: float = 0.02 #seconds
var wait = 0 var wait: float = 0
var SPEED: int = 1
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready() -> void:
wait = delay wait = delay
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta): func _process(delta: float) -> void:
wait -= delta wait -= delta
if wait < 0: if wait < 0:
wait = delay wait = delay
#SCROLL DOWN #SCROLL DOWN
if SCROLL == 1: if SCROLL == 1:
if (scroll_vertical + get_v_scroll_bar().page) < get_v_scroll_bar().max_value: if (scroll_vertical + get_v_scroll_bar().page) < get_v_scroll_bar().max_value:
scroll_vertical += SPEED scroll_vertical += Settings.inspiration_list_speed
else: else:
scroll_back_up() scroll_back_up()
#SCROLL UP #SCROLL UP
elif SCROLL == -1: elif SCROLL == -1:
if scroll_vertical != 0: if scroll_vertical != 0:
scroll_vertical -= SPEED scroll_vertical -= Settings.inspiration_list_speed
else: else:
scroll_to_bottom() scroll_to_bottom()
func scroll_back_up(): func scroll_back_up() -> void:
SCROLL = -1 SCROLL = -1
func scroll_to_bottom(): func scroll_to_bottom() -> void:
scroll_vertical = 0 #Reset to top first. scroll_vertical = 0 #Reset to top first.
SCROLL = 1 SCROLL = 1
+1
View File
@@ -0,0 +1 @@
uid://elgn7gkxgagq
+33
View File
@@ -0,0 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://bijh5h5yrivm3"]
[ext_resource type="Script" uid="uid://cw41y87l64qo7" path="res://log.gd" id="1_q72ua"]
[node name="Control" type="Control"]
custom_minimum_size = Vector2(700, 700)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_q72ua")
[node name="LogPanel" type="Panel" parent="."]
unique_name_in_owner = true
visibility_layer = 513
custom_minimum_size = Vector2(700, 700)
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="LogScrollContainer" type="ScrollContainer" parent="LogPanel"]
custom_minimum_size = Vector2(700, 700)
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="LogVBoxContainer" type="VBoxContainer" parent="LogPanel/LogScrollContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(700, 700)
layout_mode = 2
theme_override_constants/separation = 1
+435 -330
View File
@@ -1,288 +1,525 @@
extends Control extends Control
# 601 LOC 11/9 - 2023
# 628 LOC 15/9 - 2023
# 631 LOC 16/9 - 2023
# 554 LOC 30/5 - 2024
# 551 LOC 3/6 - 2024
# 386 LOC 12/6 - 2024
##TODO ##TODO
# 2. Fix reset buttons
# 3. Fix settings
# 4. Fix top buttons
# 5. Fix player name
# 7. Fix welcome into the game
# 8. Fix match ball sound
# 9. Fix winner
# 10. Fix jump between songs
# 11. Refactor components
# 12. Change add player
# 13. Fix graphics in lists
# 14. Fix layout
# 15. Fix for local play # 15. Fix for local play
# 16. Change all calls to make_request and function in function
# 17. Change some buttons to icons
@onready @onready
var open_button := $Open var open_button: Button = $Open
@onready @onready
var fileDialog := $FileDialog var fileDialog: FileDialog = $FileDialog
@onready @onready
var insperation_scroll := $ScrollContainer var inspiration_scroll: ScrollContainer = $ScrollContainer
@onready @onready
var insperation_list := $ScrollContainer/VBoxContainer var inspiration_list: VBoxContainer = $ScrollContainer/VBoxContainer
@onready @onready
var game_label := $VBoxContainer/GameLabel var game_label: Label = $VBoxContainer/GameLabel
@onready @onready
var song_label := $VBoxContainer/SongLabel var song_label: Label = $VBoxContainer/SongLabel
@onready @onready
var play_button := $PanelContainer/HBoxContainer/PlayButton var add_player_container: HBoxContainer = $Players/VBoxContainer/AddPlayerContainer
@onready @onready
var stop_button := $PanelContainer/HBoxContainer/StopButton var add_players_button: TextureButton = $Players/VBoxContainer/HBoxContainer/AddPlayersButton
@onready @onready
var audio := $AudioStreamPlayer var add_player_button: Button = $Players/VBoxContainer/AddPlayerContainer/AddPlayerButton
@onready @onready
var progress := $PanelContainer/HBoxContainer/HSlider var new_player_name_field: TextEdit = $Players/VBoxContainer/AddPlayerContainer/PlayerNameField
@onready @onready
var label := $PanelContainer/HBoxContainer/Label var reset_playlist_button: Button = $ResetPlaylistButton
@onready @onready
var add_player := $Players/VBoxContainer/HBoxContainer/AddPlayer var reset_points_button: Button = $ResetPointsButton
@onready @onready
var sound_test_button := $SoundTestButton var sound_test_button: Button = $SoundTestButton
@onready @onready
var sync_button := $SyncButton var sync_button: Button = $SyncButton
@onready @onready
var sync_popup := $PopupPanel var sync_window: Control = %SyncWindow
@onready @onready
var show_answer_button := $ShowAnswerButton var settings_button: Button = $SettingsButton
@onready @onready
var next_button := $NextButton var settings_window: Control = $SettingsWindow
@onready @onready
var music_list_scroll := $MusicListPanel/ScrollContainer var shortcuts_window: Control = %ShortcutsWindow
@onready @onready
var music_list := $MusicListPanel/ScrollContainer/MusicList var qr_window: Control = %QRWindow
@onready @onready
var players := $Players/VBoxContainer var winner_window: Control = %WinnerWindow
@onready @onready
var character_select := $CharacterSelect var qr_button: Button = $QRButton
@onready @onready
var search_button := $SearchButton var statistics_button: Button = $StatisticsButton
@onready @onready
var search_view := $Search var statistic_popup: PopupPanel = $StatisticsPopupPanel
var Player := preload("res://Player.tscn")
@onready @onready
var path = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3' var statistic_label: Label = $StatisticsPopupPanel/StatisticsLabel
@onready
var shortcuts_button: Button = $ShortcutsButton
@onready
var about_button: Button = $AboutButton
@onready
var about_window: Control = %AboutWindow
@onready
var show_answer_button: Button = $ShowAnswerButton
@onready
var next_button: Button = $NextButton
@onready
var music_list_scroll: ScrollContainer = $MusicListPanel/ScrollContainer
@onready
var music_list: VBoxContainer = $MusicListPanel/ScrollContainer/MusicList
@onready
var player_container: VBoxContainer = $Players/VBoxContainer
@onready
var character_select: Control = $CharacterSelect
@onready
var new_character_select: Control = %NewCharacterSelect
@onready
var search_button: Button = $SearchButton
@onready
var search_view: Control= $Search
@onready
var auto_repeat_song_button: CheckButton = $RepeatSongCheckButton
@onready
var music_player_container: PanelContainer = $MusicPlayer
@onready
var log_window: Control = %Log
@onready
var debug_label: Label = $DebugLabel
var player: PackedScene = preload("res://Player.tscn")
var song_list_object: PackedScene = preload("res://song_list_object.tscn")
var songs: Array= []
var games: Array = []
var current_player: Node
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready() -> void:
next_button.pressed.connect(fetch_next_song) var debug: bool = OS.has_feature("debug")
play_button.pressed.connect(play_or_pause) var is_mac: bool = OS.has_feature("macos")
stop_button.pressed.connect(stop) if debug:
show_answer_button.pressed.connect(show_answer) print("is_debug")
debug_label.visible = true
Settings.is_debug = true
settings_window.set_winning_score(5)
settings_window.set_selected_server(4)
if is_mac:
print("is_mac")
next_button.pressed.connect(play_next_song)
show_answer_button.pressed.connect(show_answer_pressed)
search_button.pressed.connect(show_search) search_button.pressed.connect(show_search)
sync_button.pressed.connect(sync_games) sync_button.pressed.connect(sync_games)
sound_test_button.pressed.connect(get_sound_test_song) sound_test_button.pressed.connect(music_player_container.get_sound_test_song)
statistics_button.pressed.connect(get_statistics)
shortcuts_button.pressed.connect(show_shortcuts)
about_button.pressed.connect(show_about)
settings_button.pressed.connect(show_settings)
qr_button.pressed.connect(show_qr)
reset_playlist_button.pressed.connect(reset_playlist)
reset_points_button.pressed.connect(reset_points)
progress.drag_started.connect(_on_drag_started)
progress.drag_ended.connect(_on_drag_ended)
character_select.connect("character_selected", _on_character_selected) character_select.connect("character_selected", _on_character_selected)
new_character_select.connect("new_new_character_selected", _on_new_character_selected)
new_player_name_field.connect("enter_key_pressed", add_player)
music_player_container.connect("play_next_song", play_next_song)
music_player_container.connect("update_song_list", update_song_list)
settings_window.connect("server_changed", server_updated)
sync_window.connect("sync_started", _on_sync_started)
sync_window.connect("sync_finished", _on_sync_finished)
add_player.pressed.connect(add_players)
add_players_button.pressed.connect(add_players)
add_player_button.pressed.connect(add_player)
open_button.pressed.connect(open) open_button.pressed.connect(open)
auto_repeat_song_button.pressed.connect(repeat_song)
get_suggestion_list() get_suggestion_list()
fetch_song_list_at_start()
fetch_song()
search_view.get_list_of_games()
new_character_select.load_characters()
func get_sound_test_song(): func _input(event: InputEvent) -> void:
var play_sound_test_song = func(result, response_code, headers, body): if event is InputEventKey and event.pressed:
if result != HTTPRequest.RESULT_SUCCESS: if event.alt_pressed && event.keycode == KEY_UP:
push_error("Song couldn't be downloaded. Try a different song.") print("Alt + UP pressed")
var sound = AudioStreamMP3.new() music_player_container.change_volume(0.05)
if event.alt_pressed && event.keycode == KEY_DOWN:
print("Alt + DOWN pressed")
music_player_container.change_volume(-0.05)
if event.alt_pressed && event.ctrl_pressed && event.keycode == KEY_LEFT:
print("Ctrl + Alt + LEFT pressed")
music_player_container.restart()
elif event.alt_pressed && event.keycode == KEY_LEFT:
print("Alt + LEFT pressed")
music_player_container.seek(-5)
if event.alt_pressed && event.keycode == KEY_RIGHT:
print("Alt + RIGHT pressed")
music_player_container.seek(5)
if event.alt_pressed && event.keycode == KEY_ENTER:
print("Alt + Enter pressed")
Settings.fullscreen = !Settings.fullscreen
settings_window.fullscreen_button.button_pressed = Settings.fullscreen
if Settings.fullscreen == true:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
if Settings.fullscreen == false:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
if event.alt_pressed && event.keycode == KEY_K:
shortcuts_window.visible = !shortcuts_window.visible
if event.alt_pressed && event.keycode == KEY_L:
log_window.visible = !log_window.visible
func server_updated() -> void:
print("server_updated")
update_from_server()
reset_points()
func update_from_server() -> void:
print("update_from_server")
search_view.get_list_of_games()
get_suggestion_list()
reset_playlist()
new_character_select.load_characters()
func repeat_song() -> void:
Settings.auto_repeat_song = !Settings.auto_repeat_song
func show_answer_pressed() -> void:
print("show_answer_pressed")
Playlist.song_is_answered()
update_song_list()
func fetch_song_list_at_start() -> void:
print("fetch_song_list_at_start")
var fetch_song_list_at_start_done: Callable = func fetch_songs_at_start_done(data) -> void:
Playlist.clear_song_list()
if data == null:
Playlist.update_last_played_song()
update_song_list()
return
if typeof(data) == TYPE_ARRAY:
for d: Dictionary in data:
var new_song_object: SongObject = SongObject.new()
new_song_object.song_number = d.SongNo
new_song_object.game_title = d.Game
new_song_object.song_title = d.Song
new_song_object.is_answered = true
new_song_object.has_played = true
Playlist.add_to_playlist(new_song_object)
else:
print("Unexpected data")
Playlist.update_last_played_song()
update_song_list()
Settings.make_request2("/music/list", fetch_song_list_at_start_done, true)
func play_next_song() -> void:
print("play_next_song ", Playlist.latest_played_song)
if Playlist.first_song_played:
Playlist.set_latest_played_song()
Playlist.first_song_played = true
music_player_container.play_song_object(Playlist.latest_played_song)
if !(Playlist.get_preloaded_songs() > 0):
next_button.disabled = true
if !Playlist.is_song_downloading:
fetch_song()
#not first "/music/addPlayed"
#"/music/rand"
#"/music/addQue"
#"/music/info"
func fetch_song() -> void:
print("fetch_song")
Playlist.is_song_downloading = true
var url: String = ""
if Settings.use_low_played_mode:
url = "/music/rand/low"
else:
url = "/music/rand"
var new_song_object: SongObject = SongObject.new()
var fetch_song_done: Callable = func fetch_song_done(body: PackedByteArray) -> void:
print("fetch_song_done")
var sound: AudioStream = AudioStreamMP3.new()
sound.data = body sound.data = body
audio.stream = sound new_song_object.song = sound
audio.play()
stream = audio.stream
progress.max_value = round(stream.get_length())
progress.tick_count = round(stream.get_length() / 60)
make_request("https://music.sanplex.tech/music/first", play_sound_test_song) var added_to_que_done: Callable = func added_to_que_done() -> void:
print("added_to_que_done")
var fetch_song_info_done: Callable = func fetch_song_info_done(data_received: Dictionary) -> void:
print("fetch_song_info_done")
new_song_object.song_number = data_received.SongNo
new_song_object.game_title = data_received.Game
new_song_object.song_title = data_received.Song
func sound_test_local(): print("new_song_object: ", new_song_object.to_string())
path = "res://01. Opening.mp3" Playlist.add_to_playlist(new_song_object)
audio.stream = load_mp3(path) next_button.disabled = false
audio.play() if Playlist.should_preload_more_songs():
stream = audio.stream fetch_song()
progress.max_value = round(stream.get_length()) else:
progress.tick_count = round(stream.get_length() / 60) Playlist.is_song_downloading = false
if Settings.is_debug:
update_song_list()
Settings.make_request2("/music/info", fetch_song_info_done, true)
func sync_games(): Settings.make_request2("/music/addQue", added_to_que_done, false)
var http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(games_synced)
# Perform a GET request. The URL below returns JSON as of writing. Settings.make_request2(url, fetch_song_done, true)
var error = http_request.request("https://music.sanplex.tech/sync")
if error != OK:
push_error("An error occurred in the HTTP request.")
func games_synced(result, response_code, headers, body): func update_song_list() -> void:
if response_code == 200: print("update_song_list")
sync_popup.visible = true if Playlist.currently_playing_song >= 0:
game_label.text = Playlist.get_current_game_title()
song_label.text = Playlist.get_current_song_title()
Settings.delete_children(music_list)
for s: SongObject in Playlist.get_playlist():
var new_song_list_object: SongListObject = song_list_object.instantiate()
new_song_list_object.song_object = s
new_song_list_object.gui_input.connect(song_object_clicked.bind(s.song_number))
music_list.add_child(new_song_list_object)
func song_object_clicked(event: InputEvent, song_no: int) -> void:
if (event is InputEventMouseButton && event.pressed && event.button_index == MOUSE_BUTTON_LEFT):
print("Clicked Song Object: ", Playlist.song_object_array[song_no].to_string())
if Settings.character_select_open == false:
if Playlist.get_song(song_no) == null:
print("has no song, need to download")
var song_downloaded: Callable = func song_downloaded(body: PackedByteArray) -> void:
var sound: AudioStream = AudioStreamMP3.new()
sound.data = body
Playlist.add_song_to_song_object(song_no, sound)
music_player_container.play_song_object(song_no)
Settings.make_request2("/music?song=" + str(song_no), song_downloaded, true)
else:
print("song already downloaded")
music_player_container.play_song_object(song_no)
func reset_playlist() -> void:
print("reset_playlist")
var playlist_reset_done: Callable = func playlist_reset_done() -> void:
Playlist.reset_playlist()
fetch_song_list_at_start()
fetch_song()
Settings.make_request2("/music/reset", playlist_reset_done, false)
func reset_points() -> void:
print("reset_points")
for player_objects: PlayerObject in Settings.player_array:
player_objects.reset_points()
load_players()
func show_about() -> void:
print("show_about")
about_window.show_window()
func show_shortcuts() -> void:
print("show_shortcuts")
shortcuts_window.visible = true
func show_settings() -> void:
print("show_settings")
settings_window.visible = true
func show_qr() -> void:
print("show_qr")
qr_window.show_window()
func get_statistics() -> void:
print("get_statistics")
statistic_popup.visible = true
statistic_label.text = "Total amount of games in the playlist: " + str(games.size())
func sync_games() -> void:
print("sync_games")
sync_window.start_sync()
func _on_sync_started() -> void:
print("_on_sync_started")
sync_button.disabled = false
sound_test_button.disabled = true
reset_playlist_button.disabled = true
show_answer_button.disabled = true
next_button.disabled = true
func _on_sync_finished() -> void:
print("_on_sync_finished")
update_from_server()
sound_test_button.disabled = false
reset_playlist_button.disabled = false
show_answer_button.disabled = false
reset_points()
func get_suggestion_list() -> void: func get_suggestion_list() -> void:
var http_request = HTTPRequest.new() print("get_suggestion_list")
add_child(http_request) var populate_list: Callable = func populate_list(array) -> void:
http_request.request_completed.connect(_http_request_completed) if typeof(array) == TYPE_ARRAY:
games = []
Settings.delete_children(inspiration_list)
games.append_array(array)
for game: String in games:
var inspiration_label: Label = Label.new()
inspiration_label.set_texture_filter(TextureFilter.TEXTURE_FILTER_NEAREST)
inspiration_label.add_theme_font_size_override("font_size", 20)
inspiration_label.text = game
inspiration_label.autowrap_mode = TextServer.AUTOWRAP_WORD
inspiration_list.add_child(inspiration_label)
inspiration_scroll.scroll_to_bottom()
else:
print("Unexpected data")
Settings.make_request2("/music/all", populate_list, true)
# Perform a GET request. The URL below returns JSON as of writing. func add_players() -> void:
var error = http_request.request("https://music.sanplex.tech/music/all") print("add_players")
if error != OK: Settings.edit_players = !Settings.edit_players
push_error("An error occurred in the HTTP request.") add_player_container.visible = !add_player_container.visible
new_player_name_field.grab_focus()
func add_players(): func add_player() -> void:
var new_player := Player.instantiate() print("add_player")
players.add_child(new_player) if new_player_name_field.text != "" && Settings.player_array.size() < Settings.MAX_NUMBER_OF_PLAYERS:
new_player.connect("change_character_clicked", _on_player_change_character_clicked.bind(new_player)) var new_player_object: PlayerObject = PlayerObject.new(new_player_name_field.text, Settings.player_array.size())
new_player_name_field.text = ""
Settings.player_array.append(new_player_object)
new_player_object.connect("first_point_triggerd", music_player_container._on_point_triggered.bind("first"))
new_player_object.connect("match_point_triggerd", music_player_container._on_point_triggered.bind("match"))
new_player_object.connect("winner_triggerd", _on_player_won.bind(new_player_object.id))
new_player_object.connect("point_given_sound", _on_make_point_given_sound)
new_player_object.connect("player_point_given", _on_point_given.bind(new_player_object.id))
new_player_object.connect("player_point_taken", _on_point_taken.bind(new_player_object.id))
load_players()
func show_search(): func load_players() -> void:
print("load_players")
Settings.delete_player_children(player_container)
var counter: int = 0
for player_object: PlayerObject in Settings.player_array:
print(player_object.player_name)
var new_player: Player = player.instantiate()
new_player.id = counter
new_player.connect("change_character_clicked", _on_player_change_character_clicked.bind(new_player, player_object.player_name))
new_player.connect("player_removed", _on_player_removed.bind(counter))
player_container.add_child(new_player)
counter += 1
func _on_point_given(player_given_point: int) -> void:
print("_on_point_given")
log_window.add_log_row(Settings.player_array[player_given_point].player_name + " got a point")
if Playlist.currently_playing_song >= 0:
Playlist.add_point(player_given_point)
update_song_list()
func _on_make_point_given_sound() -> void:
music_player_container.play_sound_effect(preload("res://sounds/itemopen.wav"))
func _on_point_taken(player_taken_point: int) -> void:
print("_on_point_taken")
log_window.add_log_row(Settings.player_array[player_taken_point].player_name + " lost a point")
music_player_container.play_sound_effect(preload("res://sounds/itemequip.wav"))
if Playlist.currently_playing_song >= 0:
Playlist.remove_point(player_taken_point)
update_song_list()
func _on_player_won(winning_player_id: int) -> void:
print("_on_player_won")
winner_window.show_winner(winning_player_id)
music_player_container.play_song(preload("res://sounds/winning.mp3"))
Settings.add_to_stats = false
func _on_player_removed(player_to_remove: int) -> void:
print("_on_player_removed ", player_to_remove)
Settings.player_array.remove_at(player_to_remove)
load_players()
Playlist.remove_player_from_list(player_to_remove)
update_song_list()
func _on_player_change_character_clicked(new_player: Player, player_name: String) -> void:
print("_on_player_change_character_clicked")
current_player = new_player
print("Change character for: " + player_name)
new_character_select.show_grid(player_name)
func _on_character_selected(file_name: String) -> void:
print("_on_character_selected")
character_select.visible = false
current_player.character_selected(file_name)
func _on_new_character_selected(character_texture: ImageTexture) -> void:
print("_on_new_character_selected")
current_player.new_character_selected(character_texture)
func show_search() -> void:
print("show_search")
if search_view.visible == false: if search_view.visible == false:
search_view.visible = true search_view.visible = true
else: else:
search_view.visible = false search_view.visible = false
func show_answer():
var http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(show_fetched)
# Perform a GET request. The URL below returns JSON as of writing. ###Local
var error = http_request.request("https://music.sanplex.tech/music/info")
if error != OK:
push_error("An error occurred in the HTTP request.")
func fetched(): var local_path: String = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
var http_request2 = HTTPRequest.new()
add_child(http_request2)
http_request2.request_completed.connect(show_fetched_list)
# Perform a GET request. The URL below returns JSON as of writing. func open() -> void:
var error2 = http_request2.request("https://music.sanplex.tech/music/list")
if error2 != OK:
push_error("An error occurred in the HTTP request.")
var next_label: Label
func show_fetched(result, response_code, headers, body) -> void:
var json = JSON.new()
var error = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
print("data_received: ", data_received)
game_label.text = data_received.Game
song_label.text = data_received.Song
var format_string = "%d. %s - %s"
var actual_string = format_string % [(data_received.SongNo+1), data_received.Game, data_received.Song]
next_label.text = actual_string
var song_list = []
func show_fetched_list(result, response_code, headers, body) -> void:
var json = JSON.new()
var error = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
if typeof(data_received) == TYPE_ARRAY:
song_list = []
song_list.append_array(data_received)
delete_children(music_list)
song_list.remove_at(song_list.size() - 1)
for song in song_list:
var label := Label.new()
var format_string = "%d. %s - %s"
var actual_string = format_string % [(song.SongNo+1), song.Game, song.Song]
label.text = actual_string
label.mouse_filter = Control.MOUSE_FILTER_PASS
label.gui_input.connect(song_clicked.bind(song.SongNo))
music_list.add_child(label)
next_label = Label.new()
next_label.text = "??? - ???"
next_label.mouse_filter = Control.MOUSE_FILTER_PASS
next_label.gui_input.connect(show_fetched)
music_list.add_child(next_label)
else:
print("Unexpected data")
func song_clicked(event, song_no):
if (event is InputEventMouseButton && event.pressed && event.button_index == MOUSE_BUTTON_LEFT):
print("Clicked: " + str(song_no))
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
var json = JSON.new()
var error = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
if typeof(data_received) == TYPE_ARRAY:
games.append_array(data_received)
for game in games:
var label := Label.new()
label.text = game
label.autowrap_mode = TextServer.AUTOWRAP_WORD
insperation_list.add_child(label)
insperation_scroll.scroll_to_bottom()
else:
print("Unexpected data")
# Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
#print(response)
func open():
fileDialog.popup() fileDialog.popup()
func _on_file_dialog_dir_selected(path: String) -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if audio.has_stream_playback() && !is_changing && !audio.stream_paused:
progress.value = audio.get_playback_position()
label.text = format_text(progress.value, stream.get_length())
func _on_file_dialog_dir_selected(path):
print(path) print(path)
dir_contents(path) dir_contents(path)
var songs := []
var games := []
#var player = preload("res://Player.gd")
func dir_contents(path: String) -> void: func dir_contents(path: String) -> void:
var dir = DirAccess.open(path) var dir: DirAccess = DirAccess.open(path)
if dir: if dir:
dir.list_dir_begin() dir.list_dir_begin()
var file_name = dir.get_next() var file_name: String = dir.get_next()
songs.clear() songs.clear()
games = []
while file_name != "": while file_name != "":
if dir.current_is_dir(): if dir.current_is_dir():
#print("Found directory: " + file_name) #print("Found directory: " + file_name)
@@ -292,142 +529,10 @@ func dir_contents(path: String) -> void:
if file_name.ends_with(".mp3"): if file_name.ends_with(".mp3"):
songs.append(path + "/" + file_name) songs.append(path + "/" + file_name)
file_name = dir.get_next() file_name = dir.get_next()
else: else:
print("An error occurred when trying to access the path.") print("An error occurred when trying to access the path.")
for game in games: for game: String in games:
var label := Label.new() var local_inspiration_label: Label = Label.new()
label.text = game local_inspiration_label.text = game
insperation_list.add_child(label) inspiration_list.add_child(local_inspiration_label)
var is_changing: bool = false
var playback_position: float
var stream: AudioStream
func set_songs(new_songs) -> void:
songs = new_songs
func make_request(address, func_name) -> void:
var http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(func_name)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request(address)
if error != OK:
push_error("An error occurred in the HTTP request.")
func format_time(time: float) -> String:
var mins: String = "%02d" % floor(time / 60)
var sec: String = "%02d" % round(fmod(time, 60))
return mins + ":" + sec
func format_text(part: float, total: float) -> String:
return format_time(part) + " / " + format_time(total)
func fetch_next_song() -> void:
var http_request = HTTPRequest.new()
add_child(http_request)
#http.set_download_file("https://music.sanplex.tech/music/first")
http_request.request_completed.connect(first_song_fetched)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request("https://music.sanplex.tech/music/rand")
if error != OK:
push_error("An error occurred in the HTTP request.")
func first_song_fetched(result, response_code, headers, body) -> void:
game_label.text = "????????"
song_label.text = "??????"
if result != HTTPRequest.RESULT_SUCCESS:
push_error("Song couldn't be downloaded. Try a different song.")
var sound = AudioStreamMP3.new()
sound.data = body
make_request("https://music.sanplex.tech/music/addQue", add_que)
print("play given song")
audio.stream = sound
audio.play()
stream = audio.stream
progress.max_value = round(stream.get_length())
progress.tick_count = round(stream.get_length() / 60)
func add_que(result, response_code, headers, body) -> void:
print("response_code", response_code)
fetched()
func play_local_song(song) -> void:
if songs:
path = songs[0]
print(path)
print(FileAccess.file_exists(path))
audio.stream = load_mp3(path)
print("play")
audio.play()
stream = audio.stream
progress.max_value = round(stream.get_length())
progress.tick_count = round(stream.get_length() / 60)
var is_paused: bool = true
func play_or_pause():
if is_paused:
is_paused = false
play_button.text = "Pause"
if audio.stream_paused:
audio.stream_paused = false
audio.seek(playback_position)
print("continue")
progress.max_value = round(stream.get_length())
progress.tick_count = round(stream.get_length() / 60)
else:
fetch_next_song()
else:
audio.stream_paused = true
playback_position = audio.get_playback_position()
is_paused = true
play_button.text = "Play"
func stop() -> void:
audio.stop()
audio.stream_paused = false
progress.value = 0
is_paused = true
play_button.text = "Play"
func _on_drag_started() -> void:
is_changing = true
func _on_drag_ended(_changed) -> void:
audio.seek(progress.value)
playback_position = progress.value
is_changing = false
func load_mp3(_path) -> AudioStream:
var file = FileAccess.open(_path, FileAccess.READ)
var sound = AudioStreamMP3.new()
sound.data = file.get_buffer(file.get_length())
return sound
var current_player
func _on_player_change_character_clicked(new_player):
print("_on_player_change_character_clicked")
current_player = new_player
character_select.visible = true
func _on_character_selected(file_name: String):
print("_on_character_selected")
character_select.visible = false
current_player._on_control_character_selected_clicked(file_name)
static func delete_children(node):
for n in node.get_children():
node.remove_child(n)
n.queue_free()
+1
View File
@@ -0,0 +1 @@
uid://b8f4g15cas2j2
+462 -237
View File
@@ -1,14 +1,22 @@
[gd_scene load_steps=15 format=3 uid="uid://xwq863o6uvsu"] [gd_scene format=3 uid="uid://xwq863o6uvsu"]
[ext_resource type="Script" path="res://MainWindow.gd" id="1_eu0t5"] [ext_resource type="Script" uid="uid://b8f4g15cas2j2" path="res://MainWindow.gd" id="1_eu0t5"]
[ext_resource type="PackedScene" uid="uid://b16on0oscg1bv" path="res://CharacterSelect.tscn" id="2_76kf4"] [ext_resource type="PackedScene" uid="uid://b16on0oscg1bv" path="res://CharacterSelect.tscn" id="2_76kf4"]
[ext_resource type="Script" path="res://InsperationScrollContainer.gd" id="2_gxtxm"] [ext_resource type="Script" uid="uid://elgn7gkxgagq" path="res://InsperationScrollContainer.gd" id="2_gxtxm"]
[ext_resource type="PackedScene" uid="uid://w400rnew7453" path="res://volume_slider.tscn" id="3_rxhba"] [ext_resource type="Texture2D" uid="uid://bcfmpd7h512ef" path="res://icons/person_add_light.svg" id="5_31tjv"]
[ext_resource type="AudioStream" uid="uid://n2g8jddr85h2" path="res://01. Opening.mp3" id="4_5kvsq"] [ext_resource type="PackedScene" uid="uid://ds15cgsf8vpvc" path="res://MusicPlayer.tscn" id="5_emn36"]
[ext_resource type="Texture2D" uid="uid://o5go6smk7hm1" path="res://person_add_alt_1-black-36dp.svg" id="4_op458"] [ext_resource type="PackedScene" uid="uid://cdy4kvemwaiom" path="res://new_character_select.tscn" id="6_dhrvg"]
[ext_resource type="Script" path="res://MusicListScrollContainer.gd" id="7_dj026"] [ext_resource type="Script" uid="uid://gf1bk6xbe3j" path="res://MusicListScrollContainer.gd" id="7_dj026"]
[ext_resource type="Script" uid="uid://cgakje8gb37tf" path="res://PlayerNameField.gd" id="7_qsdfy"]
[ext_resource type="Theme" uid="uid://rxexo3ur85as" path="res://LightGrayTheme.tres" id="7_wxbv6"] [ext_resource type="Theme" uid="uid://rxexo3ur85as" path="res://LightGrayTheme.tres" id="7_wxbv6"]
[ext_resource type="PackedScene" uid="uid://bxydgil1yifps" path="res://SearchWindow.tscn" id="9_5ijvr"] [ext_resource type="PackedScene" uid="uid://bxydgil1yifps" path="res://SearchWindow.tscn" id="9_5ijvr"]
[ext_resource type="PackedScene" uid="uid://dpdem7pdxweb5" path="res://SyncWindow.tscn" id="10_yxw0b"]
[ext_resource type="PackedScene" uid="uid://dldpeo5y3l5hq" path="res://SettingsWindow.tscn" id="11_k62u5"]
[ext_resource type="PackedScene" uid="uid://bd1by80q1v27e" path="res://shortcutsWindow.tscn" id="13_8eebo"]
[ext_resource type="PackedScene" uid="uid://bijh5h5yrivm3" path="res://Log.tscn" id="14_26rwn"]
[ext_resource type="PackedScene" uid="uid://btupbowehiyyu" path="res://QRWindow.tscn" id="15_qr_window"]
[ext_resource type="PackedScene" uid="uid://cp54idaudb8dp" path="res://AboutWindow.tscn" id="16_about_window"]
[ext_resource type="PackedScene" uid="uid://cxlsmxnrp0agh" path="res://WinnerWindow.tscn" id="17_winner_window"]
[sub_resource type="LabelSettings" id="LabelSettings_ychxr"] [sub_resource type="LabelSettings" id="LabelSettings_ychxr"]
font_size = 25 font_size = 25
@@ -19,43 +27,78 @@ font_size = 50
[sub_resource type="LabelSettings" id="LabelSettings_3m52w"] [sub_resource type="LabelSettings" id="LabelSettings_3m52w"]
font_size = 35 font_size = 35
[sub_resource type="InputEventKey" id="InputEventKey_03bm3"]
device = -1
alt_pressed = true
keycode = 65
unicode = 63743
[sub_resource type="Shortcut" id="Shortcut_jafqj"]
events = [SubResource("InputEventKey_03bm3")]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qk7sj"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_k1ygi"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="InputEventKey" id="InputEventKey_06rl4"]
device = -1
alt_pressed = true
keycode = 86
unicode = 8249
[sub_resource type="Shortcut" id="Shortcut_a7fvb"]
events = [SubResource("InputEventKey_06rl4")]
[sub_resource type="InputEventKey" id="InputEventKey_7dnqw"]
device = -1
alt_pressed = true
keycode = 67
unicode = 231
[sub_resource type="Shortcut" id="Shortcut_d6fml"]
events = [SubResource("InputEventKey_7dnqw")]
[sub_resource type="InputEventKey" id="InputEventKey_ujjlu"] [sub_resource type="InputEventKey" id="InputEventKey_ujjlu"]
device = -1 device = -1
command_or_control_autoremap = true alt_pressed = true
keycode = 83 keycode = 83
[sub_resource type="Shortcut" id="Shortcut_fbju4"] [sub_resource type="Shortcut" id="Shortcut_fbju4"]
events = [SubResource("InputEventKey_ujjlu")] events = [SubResource("InputEventKey_ujjlu")]
[node name="Control" type="Control"] [node name="Control" type="Control" unique_id=407149696]
layout_mode = 3 layout_mode = 3
anchors_preset = 0 anchors_preset = 0
script = ExtResource("1_eu0t5") script = ExtResource("1_eu0t5")
[node name="TopPanelContainer" type="PanelContainer" parent="."] [node name="TopPanelContainer" type="PanelContainer" parent="." unique_id=663404711]
layout_mode = 0 layout_mode = 0
offset_right = 1920.0 offset_right = 1920.0
offset_bottom = 56.0 offset_bottom = 56.0
[node name="Title" type="Label" parent="."] [node name="Title" type="Label" parent="." unique_id=1187907861]
layout_mode = 2 texture_filter = 1
offset_left = 32.0 layout_mode = 0
offset_top = 8.0 offset_left = 64.0
offset_right = 337.0 offset_top = 12.0
offset_bottom = 46.0 offset_right = 369.0
offset_bottom = 50.0
size_flags_horizontal = 0 size_flags_horizontal = 0
text = "Music Player Randomizer" text = "Music Player Randomizer"
label_settings = SubResource("LabelSettings_ychxr") label_settings = SubResource("LabelSettings_ychxr")
[node name="Open" type="Button" parent="."] [node name="Open" type="Button" parent="." unique_id=165052329]
layout_mode = 2 visible = false
offset_left = 65.0 layout_mode = 0
offset_top = 877.0 offset_left = 1296.0
offset_right = 115.0 offset_top = 66.0
offset_bottom = 908.0 offset_right = 1346.0
offset_bottom = 97.0
text = "Open" text = "Open"
[node name="FileDialog" type="FileDialog" parent="."] [node name="FileDialog" type="FileDialog" parent="." unique_id=485771559]
title = "Open a Directory" title = "Open a Directory"
initial_position = 2 initial_position = 2
size = Vector2i(616, 400) size = Vector2i(616, 400)
@@ -64,231 +107,413 @@ file_mode = 2
access = 2 access = 2
show_hidden_files = true show_hidden_files = true
[node name="ScrollContainer" type="ScrollContainer" parent="."] [node name="MusicListPanel" type="PanelContainer" parent="." unique_id=2011292375]
layout_mode = 0 layout_mode = 0
offset_left = 1204.0 offset_left = 64.0
offset_top = 95.0 offset_top = 384.0
offset_right = 1845.0 offset_right = 1152.0
offset_bottom = 465.0 offset_bottom = 896.0
horizontal_scroll_mode = 0
script = ExtResource("2_gxtxm")
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "Test
"
[node name="Label2" type="Label" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "Test2"
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 0
offset_left = 52.0
offset_top = 81.0
offset_right = 977.0
offset_bottom = 368.0
[node name="GameLabel" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "????????"
label_settings = SubResource("LabelSettings_qspbu")
horizontal_alignment = 1
autowrap_mode = 2
[node name="SongLabel" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "??????"
label_settings = SubResource("LabelSettings_3m52w")
horizontal_alignment = 1
autowrap_mode = 2
[node name="CharacterSelect" parent="." instance=ExtResource("2_76kf4")]
visible = false
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 0
offset_left = 69.0
offset_top = 924.0
offset_right = 1057.0
offset_bottom = 964.0
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
layout_mode = 2
size_flags_vertical = 4
[node name="PlayButton" type="Button" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
text = "Play"
[node name="StopButton" type="Button" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
text = "Stop"
[node name="HSlider" type="HSlider" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
scrollable = false
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer"]
layout_mode = 2
text = "1:00 / 3:00"
[node name="VolumeSlider" parent="PanelContainer/HBoxContainer" instance=ExtResource("3_rxhba")]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_vertical = 4
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_5kvsq")
bus = &"music"
[node name="Players" type="PanelContainer" parent="."]
layout_mode = 0
offset_left = 1283.0
offset_top = 642.0
offset_right = 1820.0
offset_bottom = 1003.0
[node name="VBoxContainer" type="VBoxContainer" parent="Players"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Players/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="Players/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Players"
horizontal_alignment = 1
[node name="AddPlayer" type="TextureButton" parent="Players/VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 8
texture_normal = ExtResource("4_op458")
[node name="ResetPlaylistButton" type="Button" parent="."]
layout_mode = 0
offset_left = 125.0
offset_top = 1017.0
offset_right = 236.0
offset_bottom = 1048.0
text = "Reset playlist"
[node name="ResetPointsButton" type="Button" parent="."]
layout_mode = 0
offset_left = 247.0
offset_top = 1018.0
offset_right = 358.0
offset_bottom = 1049.0
text = "Reset points"
[node name="SyncButton" type="Button" parent="."]
layout_mode = 0
offset_left = 370.0
offset_top = 1016.0
offset_right = 481.0
offset_bottom = 1047.0
text = "Sync games"
[node name="SoundTestButton" type="Button" parent="."]
layout_mode = 0
offset_left = 491.0
offset_top = 1016.0
offset_right = 602.0
offset_bottom = 1047.0
text = "Sound test"
[node name="ShowAnswerButton" type="Button" parent="."]
layout_mode = 0
offset_left = 611.0
offset_top = 1016.0
offset_right = 722.0
offset_bottom = 1047.0
text = "Show answer"
[node name="NextButton" type="Button" parent="."]
layout_mode = 0
offset_left = 729.0
offset_top = 1017.0
offset_right = 904.0
offset_bottom = 1048.0
text = "Randomize new track"
[node name="MusicListPanel" type="PanelContainer" parent="."]
layout_mode = 0
offset_left = 136.0
offset_top = 388.0
offset_right = 1009.0
offset_bottom = 845.0
theme = ExtResource("7_wxbv6") theme = ExtResource("7_wxbv6")
[node name="ScrollContainer" type="ScrollContainer" parent="MusicListPanel"] [node name="ScrollContainer" type="ScrollContainer" parent="MusicListPanel" unique_id=707750459]
layout_mode = 2 layout_mode = 2
follow_focus = true follow_focus = true
script = ExtResource("7_dj026") script = ExtResource("7_dj026")
[node name="MusicList" type="VBoxContainer" parent="MusicListPanel/ScrollContainer"] [node name="MusicList" type="VBoxContainer" parent="MusicListPanel/ScrollContainer" unique_id=373398568]
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 10
[node name="ScrollContainer" type="ScrollContainer" parent="." unique_id=498283761]
texture_filter = 1
layout_mode = 0
offset_left = 1216.0
offset_top = 128.0
offset_right = 1857.0
offset_bottom = 512.0
horizontal_scroll_mode = 0
vertical_scroll_mode = 3
script = ExtResource("2_gxtxm")
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer" unique_id=1215162949]
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=42468498]
layout_mode = 0
offset_left = 64.0
offset_top = 64.0
offset_right = 1152.0
offset_bottom = 384.0
[node name="GameLabel" type="Label" parent="VBoxContainer" unique_id=173147793]
texture_filter = 1
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
label_settings = SubResource("LabelSettings_qspbu")
horizontal_alignment = 1
autowrap_mode = 2
[node name="SongLabel" type="Label" parent="VBoxContainer" unique_id=1687490027]
texture_filter = 1
custom_minimum_size = Vector2(1, 1)
layout_mode = 2
label_settings = SubResource("LabelSettings_3m52w")
horizontal_alignment = 1
autowrap_mode = 2
[node name="CharacterSelect" parent="." unique_id=2079506802 instance=ExtResource("2_76kf4")]
visible = false
top_level = true
layout_mode = 0
offset_left = 616.0
offset_top = 264.0
offset_right = 776.0
offset_bottom = 424.0
[node name="MusicPlayer" parent="." unique_id=1990459832 instance=ExtResource("5_emn36")]
layout_mode = 0
anchors_preset = 0
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = 65.0
offset_top = 992.0
offset_right = 1856.0
offset_bottom = 1024.0
grow_horizontal = 1
grow_vertical = 1
[node name="Players" type="PanelContainer" parent="." unique_id=1708375945]
layout_mode = 0
offset_left = 1216.0
offset_top = 576.0
offset_right = 1857.0
offset_bottom = 977.0
[node name="VBoxContainer" type="VBoxContainer" parent="Players" unique_id=270084211]
layout_mode = 2 layout_mode = 2
[node name="SearchButton" type="Button" parent="."] [node name="HBoxContainer" type="HBoxContainer" parent="Players/VBoxContainer" unique_id=513047023]
layout_mode = 0 custom_minimum_size = Vector2(2.08165e-12, 40)
offset_left = 1528.0 layout_mode = 2
offset_top = 8.0
offset_right = 1598.0
offset_bottom = 48.0
shortcut = SubResource("Shortcut_fbju4")
text = "Search"
[node name="SettingsButton" type="Button" parent="."] [node name="Label" type="Label" parent="Players/VBoxContainer/HBoxContainer" unique_id=1331357386]
layout_mode = 0 texture_filter = 1
offset_left = 1624.0 custom_minimum_size = Vector2(2.08165e-12, 40)
offset_top = 8.0 layout_mode = 2
offset_right = 1694.0 size_flags_horizontal = 3
offset_bottom = 48.0 size_flags_vertical = 1
text = "Settings" text = "Players"
[node name="StatisticsButton" type="Button" parent="."]
layout_mode = 0
offset_left = 1720.0
offset_top = 8.0
offset_right = 1798.0
offset_bottom = 48.0
text = "Statistics"
[node name="AboutButton" type="Button" parent="."]
layout_mode = 0
offset_left = 1824.0
offset_top = 8.0
offset_right = 1894.0
offset_bottom = 48.0
text = "About"
[node name="Search" parent="." instance=ExtResource("9_5ijvr")]
visible = false
layout_mode = 1
offset_left = 349.196
offset_top = 81.2367
offset_right = 349.196
offset_bottom = 81.2367
[node name="PopupPanel" type="PopupPanel" parent="."]
initial_position = 2
size = Vector2i(140, 70)
[node name="Label" type="Label" parent="PopupPanel"]
offset_left = 4.0
offset_top = 4.0
offset_right = 136.0
offset_bottom = 66.0
text = "Games synced!"
horizontal_alignment = 1 horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="AddPlayersButton" type="TextureButton" parent="Players/VBoxContainer/HBoxContainer" unique_id=634410148]
texture_filter = 1
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
size_flags_horizontal = 8
focus_mode = 0
action_mode = 0
shortcut = SubResource("Shortcut_jafqj")
texture_normal = ExtResource("5_31tjv")
[node name="AddPlayerContainer" type="HBoxContainer" parent="Players/VBoxContainer" unique_id=1371948739]
visible = false
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
[node name="Panel" type="Panel" parent="Players/VBoxContainer/AddPlayerContainer" unique_id=1569854056]
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_qk7sj")
[node name="PlayerNameField" type="TextEdit" parent="Players/VBoxContainer/AddPlayerContainer" unique_id=332535327]
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Player name"
script = ExtResource("7_qsdfy")
[node name="AddPlayerButton" type="Button" parent="Players/VBoxContainer/AddPlayerContainer" unique_id=245001313]
texture_filter = 1
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
text = "Add"
[node name="Panel2" type="Panel" parent="Players/VBoxContainer/AddPlayerContainer" unique_id=60215448]
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_k1ygi")
[node name="ResetPlaylistButton" type="Button" parent="." unique_id=1754155620]
texture_filter = 1
layout_mode = 0
offset_left = 1359.0
offset_top = 66.0
offset_right = 1470.0
offset_bottom = 97.0
focus_mode = 0
action_mode = 0
text = "Reset playlist"
[node name="ResetPointsButton" type="Button" parent="." unique_id=942880776]
texture_filter = 1
layout_mode = 0
offset_left = 1487.0
offset_top = 66.0
offset_right = 1598.0
offset_bottom = 97.0
focus_mode = 0
action_mode = 0
text = "Reset points"
[node name="SyncButton" type="Button" parent="." unique_id=1228313556]
texture_filter = 1
layout_mode = 0
offset_left = 1615.0
offset_top = 66.0
offset_right = 1726.0
offset_bottom = 97.0
focus_mode = 0
action_mode = 0
text = "Sync games"
[node name="SoundTestButton" type="Button" parent="." unique_id=1332971879]
texture_filter = 1
layout_mode = 0
offset_left = 1743.0
offset_top = 66.0
offset_right = 1854.0
offset_bottom = 97.0
focus_mode = 0
action_mode = 0
text = "Sound test"
[node name="ShowAnswerButton" type="Button" parent="." unique_id=415388039]
texture_filter = 1
layout_mode = 0
offset_left = 65.0
offset_top = 944.0
offset_right = 176.0
offset_bottom = 975.0
focus_mode = 0
action_mode = 0
shortcut = SubResource("Shortcut_a7fvb")
text = "Show answer"
[node name="NextButton" type="Button" parent="." unique_id=1744703488]
texture_filter = 1
layout_mode = 0
offset_left = 193.0
offset_top = 944.0
offset_right = 368.0
offset_bottom = 975.0
focus_mode = 0
disabled = true
action_mode = 0
shortcut = SubResource("Shortcut_d6fml")
text = "Randomize new track"
[node name="SearchButton" type="Button" parent="." unique_id=1782453581]
texture_filter = 1
layout_mode = 0
offset_left = 1354.0
offset_top = 8.0
offset_right = 1424.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
shortcut = SubResource("Shortcut_fbju4")
text = "Search"
[node name="SettingsButton" type="Button" parent="." unique_id=1193400323]
texture_filter = 1
layout_mode = 0
offset_left = 1442.0
offset_top = 8.0
offset_right = 1512.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
text = "Settings"
[node name="StatisticsButton" type="Button" parent="." unique_id=2045021269]
texture_filter = 1
layout_mode = 0
offset_left = 1530.0
offset_top = 8.0
offset_right = 1600.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
text = "Statistics"
[node name="ShortcutsButton" type="Button" parent="." unique_id=2066498226]
texture_filter = 1
layout_mode = 0
offset_left = 1626.0
offset_top = 8.0
offset_right = 1696.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
text = "Shortcuts"
[node name="AboutButton" type="Button" parent="." unique_id=1057035253]
texture_filter = 1
layout_mode = 0
offset_left = 1722.0
offset_top = 8.0
offset_right = 1792.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
text = "About"
[node name="QRButton" type="Button" parent="." unique_id=2021908559]
texture_filter = 1
layout_mode = 0
offset_left = 1802.0
offset_top = 8.0
offset_right = 1872.0
offset_bottom = 48.0
focus_mode = 0
action_mode = 0
text = "QR"
[node name="Search" parent="." unique_id=1661250375 instance=ExtResource("9_5ijvr")]
visible = false
layout_mode = 1
offset_left = 56.0
offset_top = 96.0
offset_right = 56.0
offset_bottom = 96.0
[node name="SyncWindow" parent="." unique_id=182499699 instance=ExtResource("10_yxw0b")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 401.0
offset_top = 153.0
offset_right = 401.0
offset_bottom = 153.0
[node name="SettingsWindow" parent="." unique_id=1323246978 instance=ExtResource("11_k62u5")]
visible = false
layout_mode = 1
offset_left = 720.0
offset_top = 153.0
offset_right = 720.0
offset_bottom = 153.0
[node name="QRWindow" parent="." unique_id=589733821 instance=ExtResource("15_qr_window")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 720.0
offset_top = 153.0
offset_right = 720.0
offset_bottom = 153.0
[node name="NewCharacterSelect" parent="." unique_id=1679856322 instance=ExtResource("6_dhrvg")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 420.0
offset_top = 165.0
offset_right = 1572.0
offset_bottom = 805.0
[node name="ShortcutsWindow" parent="." unique_id=1513416242 instance=ExtResource("13_8eebo")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 562.0
offset_top = 160.0
offset_right = 1262.0
offset_bottom = 860.0
[node name="StatisticsPopupPanel" type="PopupPanel" parent="." unique_id=298311407]
oversampling_override = 1.0
initial_position = 2
size = Vector2i(450, 100)
[node name="Label" type="Label" parent="StatisticsPopupPanel" unique_id=548316493]
texture_filter = 1
offset_left = 4.0
offset_top = 4.0
offset_right = 446.0
offset_bottom = 96.0
text = "Statistics"
horizontal_alignment = 1
[node name="StatisticsLabel" type="Label" parent="StatisticsPopupPanel" unique_id=58226477]
texture_filter = 1
offset_left = 4.0
offset_top = 4.0
offset_right = 446.0
offset_bottom = 96.0
text = "Total amount of games in the playlist: 9000"
horizontal_alignment = 1
vertical_alignment = 1
[node name="AboutWindow" parent="." unique_id=141261008 instance=ExtResource("16_about_window")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 720.0
offset_top = 153.0
offset_right = 720.0
offset_bottom = 153.0
[node name="WinnerWindow" parent="." unique_id=999999999 instance=ExtResource("17_winner_window")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 720.0
offset_top = 153.0
offset_right = 720.0
offset_bottom = 153.0
[node name="RepeatSongCheckButton" type="CheckButton" parent="." unique_id=776835053]
layout_mode = 0
offset_left = 64.0
offset_top = 1032.0
offset_right = 208.0
offset_bottom = 1063.0
focus_mode = 0
button_pressed = true
action_mode = 0
text = "Auto repeat"
[node name="DebugLabel" type="Label" parent="." unique_id=1959221257]
visible = false
layout_mode = 0
offset_left = 974.0
offset_top = 904.0
offset_right = 1014.0
offset_bottom = 927.0
scale = Vector2(3, 3)
text = "DEBUG"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Log" parent="." unique_id=1289881388 instance=ExtResource("14_26rwn")]
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 562.0
offset_top = 132.0
offset_right = 1262.0
offset_bottom = 832.0
[connection signal="dir_selected" from="FileDialog" to="." method="_on_file_dialog_dir_selected"] [connection signal="dir_selected" from="FileDialog" to="." method="_on_file_dialog_dir_selected"]
-134
View File
@@ -1,134 +0,0 @@
extends PanelContainer
@onready
var play_button := $HBoxContainer/PlayButton
@onready
var pause_button := $HBoxContainer/PauseButton
@onready
var stop_button := $HBoxContainer/StopButton
@onready
var audio := $AudioStreamPlayer
@onready
var progress := $HBoxContainer/HSlider
@onready
var label := $HBoxContainer/Label
@onready
var path = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
var songs := []
var is_changing: bool = false
var playback_position: float
var stream: AudioStream
func set_songs(new_songs) -> void:
songs = new_songs
func make_request(address, func_name) -> void:
var http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(func_name)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request(address)
if error != OK:
push_error("An error occurred in the HTTP request.")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
play_button.pressed.connect(fetch_first_song)
pause_button.pressed.connect(pause)
stop_button.pressed.connect(stop)
progress.drag_started.connect(_on_drag_started)
progress.drag_ended.connect(_on_drag_ended)
func format_time(time: float) -> String:
var mins: String = "%02d" % floor(time / 60)
var sec: String = "%02d" % round(fmod(time, 60))
return mins + ":" + sec
func format_text(part: float, total: float) -> String:
return format_time(part) + " / " + format_time(total)
func _process(_delta):
if audio.has_stream_playback() && !is_changing && !audio.stream_paused:
progress.value = audio.get_playback_position()
label.text = format_text(progress.value, stream.get_length())
signal fetched
func fetch_first_song() -> void:
var http_request = HTTPRequest.new()
add_child(http_request)
#http.set_download_file("https://music.sanplex.tech/music/first")
http_request.request_completed.connect(first_song_fetched)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request("https://music.sanplex.tech/music/rand")
if error != OK:
push_error("An error occurred in the HTTP request.")
func first_song_fetched(result, response_code, headers, body) -> void:
if result != HTTPRequest.RESULT_SUCCESS:
push_error("Song couldn't be downloaded. Try a different song.")
var sound = AudioStreamMP3.new()
sound.data = body
make_request("https://music.sanplex.tech/music/addQue", add_que)
#fetched.emit()
play(sound)
func add_que(result, response_code, headers, body) -> void:
print("response_code", response_code)
fetched.emit()
func play(song) -> void:
if audio.stream_paused:
audio.stream_paused = false
audio.seek(playback_position)
print("continue")
elif song:
print("play given song")
audio.stream = song
audio.play()
stream = audio.stream
else:
if songs:
#print(songs)
path = songs[0]
print(path)
print(FileAccess.file_exists(path))
audio.stream = load_mp3(path)
print("play")
audio.play()
stream = audio.stream
progress.max_value = round(stream.get_length())
progress.tick_count = round(stream.get_length() / 60)
func pause() -> void:
audio.stream_paused = true
playback_position = audio.get_playback_position()
func stop() -> void:
audio.stop()
audio.stream_paused = false
progress.value = 0
func _on_drag_started() -> void:
is_changing = true
func _on_drag_ended(_changed) -> void:
audio.seek(progress.value)
playback_position = progress.value
is_changing = false
func load_mp3(_path) -> AudioStream:
var file = FileAccess.open(_path, FileAccess.READ)
var sound = AudioStreamMP3.new()
sound.data = file.get_buffer(file.get_length())
return sound
-48
View File
@@ -1,48 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://ds15cgsf8vpvc"]
[ext_resource type="Script" path="res://MediaPlayer.gd" id="1_7xb8h"]
[ext_resource type="AudioStream" uid="uid://n2g8jddr85h2" path="res://01. Opening.mp3" id="2_sv4nm"]
[node name="MediaPlayer" type="PanelContainer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -121.0
offset_top = -15.5
offset_right = 121.0
offset_bottom = 15.5
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 4
script = ExtResource("1_7xb8h")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_sv4nm")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
size_flags_vertical = 4
[node name="PlayButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "Play"
[node name="PauseButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "Pause"
[node name="StopButton" type="Button" parent="HBoxContainer"]
layout_mode = 2
text = "Stop"
[node name="HSlider" type="HSlider" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
scrollable = false
[node name="Label" type="Label" parent="HBoxContainer"]
layout_mode = 2
text = "1:00 / 3:00"
+4 -12
View File
@@ -1,16 +1,8 @@
extends ScrollContainer extends ScrollContainer
var max = 0; var max_value = 0;
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _draw(): func _draw():
if max != self.get_v_scroll_bar().max_value: if max_value != self.get_v_scroll_bar().max_value:
max = self.get_v_scroll_bar().max_value max_value = self.get_v_scroll_bar().max_value
self.scroll_vertical = max self.scroll_vertical = max_value
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
+1
View File
@@ -0,0 +1 @@
uid://gf1bk6xbe3j
+231
View File
@@ -0,0 +1,231 @@
class_name MusicPlayer
extends PanelContainer
# LOC 20/1-24: 136
# LOC 12/6-24: 170
@onready
var play_button: TextureButton = $MusicPlayerContainer/PlayTextureButton
@onready
var restart_button: TextureButton = $MusicPlayerContainer/RestartTextureButton
@onready
var audio_player: AudioStreamPlayer = $AudioStreamPlayer
@onready
var sound_player: AudioStreamPlayer = $AudioSoundPlayer
@onready
var sound_effect_player: AudioStreamPlayer = $AudioSoundEffectPlayer
@onready
var progress_slider: HSlider = $MusicPlayerContainer/MusicPlayerSlider
@onready
var volume_slider: HSlider = $MusicPlayerContainer/VolumeSlider
@onready
var music_time_label: Label = $MusicPlayerContainer/MusicTimeLabel
@onready
var path: String = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
var play_icon: Texture = preload("res://icons/play_icon_light.svg")
var pause_icon: Texture = preload("res://icons/pause_icon_light.svg")
var songs: Array = []
var is_changing: bool = false
var playback_position: float
var stream: AudioStream
var song_finished: bool = false
signal update_song_list
signal play_next_song
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
play_button.pressed.connect(play_or_pause)
restart_button.pressed.connect(restart)
progress_slider.drag_started.connect(_on_drag_started)
progress_slider.drag_ended.connect(_on_drag_ended)
audio_player.finished.connect(_on_finished)
func _process(_delta: float) -> void:
if audio_player.has_stream_playback() && !is_changing && !audio_player.stream_paused:
if (!Settings.hide_beginning || audio_player.get_playback_position() > Settings.hide_for_seconds):
progress_slider.value = audio_player.get_playback_position()
if stream != null:
music_time_label.text = format_text(progress_slider.value, stream.get_length())
else:
music_time_label.text = format_text(progress_slider.value, 0.0)
func format_time(time: float) -> String:
var mins: String = "%02d" % floor(time / 60)
var sec: String = "%02d" % round(fmod(time, 60))
return mins + ":" + sec
func format_text(part: float, total: float) -> String:
if (Settings.hide_beginning && part <= Settings.hide_for_seconds) && Settings.hide_length:
return "??:?? / ??:??"
elif Settings.hide_length:
return format_time(part) + " / ??:??"
elif Settings.hide_beginning && part < Settings.hide_for_seconds:
return "??:?? / " + format_time(total)
else:
return format_time(part) + " / " + format_time(total)
func play_or_pause() -> void:
if song_finished:
restart()
elif audio_player.stream_paused:
play_button.texture_normal = pause_icon
audio_player.stream_paused = false
song_finished = false
audio_player.seek(playback_position)
print("continue")
progress_slider.max_value = round(stream.get_length())
if Settings.hide_ticks:
progress_slider.tick_count = 0
else:
progress_slider.tick_count = round(stream.get_length() / 60)
else:
pause()
func pause() -> void:
audio_player.stream_paused = true
playback_position = audio_player.get_playback_position()
play_button.texture_normal = play_icon
func restart() -> void:
audio_player.stop()
audio_player.stream_paused = false
song_finished = false
progress_slider.value = 0
playback_position = audio_player.get_playback_position()
audio_player.seek(playback_position)
play_button.texture_normal = pause_icon
audio_player.play()
func _on_finished() -> void:
play_button.texture_normal = play_icon
song_finished = true
if !Settings.stop_after_current:
play_next_song.emit()
if Settings.auto_repeat_song:
restart()
func _on_drag_started() -> void:
is_changing = true
func _on_drag_ended(_changed: bool) -> void:
audio_player.seek(progress_slider.value)
playback_position = progress_slider.value
is_changing = false
func seek(new_position: float) -> void:
progress_slider.value += new_position
is_changing = true
audio_player.seek(progress_slider.value)
playback_position = progress_slider.value
is_changing = false
func change_volume(value: float) -> void:
volume_slider.value += value
volume_slider.change_volume(volume_slider.value)
func _on_point_triggered(point: String) -> void:
if point == "first":
var value: int = randi_range(0, 10)
if value == 0:
play_sound(preload("res://sounds/sound1.mp3"))
elif value < 5:
play_sound(preload("res://sounds/intro_long.mp3"))
else:
play_sound(preload("res://sounds/intro_short.mp3"))
elif point == "match":
play_sound(preload("res://sounds/sound0.mp3"))
func play_sound_effect(sound_effect_name: AudioStream) -> void:
sound_effect_player.stream = sound_effect_name
sound_effect_player.play()
func play_sound(sound_name: AudioStream) -> void:
sound_player.stream = sound_name
audio_player.stop()
sound_player.play()
song_finished = true
play_button.texture_normal = play_icon
progress_slider.value = 0
#if stream != null:
# music_time_label.text = format_text(progress_slider.value, stream.get_length())
func play_song(song: AudioStream) -> void:
audio_player.stream = song
audio_player.play()
sound_player.stop()
song_finished = false
play_button.texture_normal = pause_icon
stream = audio_player.stream
progress_slider.value = 0
progress_slider.max_value = round(stream.get_length())
if Settings.hide_ticks:
progress_slider.tick_count = 0
else:
progress_slider.tick_count = round(stream.get_length() / 60)
music_time_label.text = format_text(progress_slider.value, stream.get_length())
func play_song_object(song_object_no: int) -> void:
print("play_song_object")
if audio_player.is_playing():
audio_player.stop()
await get_tree().create_timer(0.5).timeout
audio_player.stream = Playlist.get_song(song_object_no)
sound_player.stop()
audio_player.play()
song_finished = false
play_button.texture_normal = pause_icon
stream = audio_player.stream
progress_slider.value = 0
progress_slider.max_value = round(stream.get_length())
if Settings.hide_ticks:
progress_slider.tick_count = 0
else:
progress_slider.tick_count = round(stream.get_length() / 60)
music_time_label.text = format_text(progress_slider.value, stream.get_length())
Playlist.set_currently_playing_song(song_object_no)
Playlist.unset_is_playing()
if !Settings.hide_next_track:
print("Show answer now!!")
Playlist.song_is_answered(song_object_no)
Playlist.song_has_played(song_object_no)
Playlist.song_is_playing(song_object_no)
update_song_list.emit()
func get_sound_test_song() -> void:
var test_sound: Callable = func test_sound(body: PackedByteArray) -> void:
var sound: AudioStream = AudioStreamMP3.new()
sound.data = body
play_song(sound)
Settings.make_request2("/music/soundTest", test_sound, true)
##### LOCAL
var local_path: String = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
func load_mp3(_path: String) -> AudioStream:
var file: FileAccess = FileAccess.open(_path, FileAccess.READ)
var sound: AudioStream = AudioStreamMP3.new()
sound.data = file.get_buffer(file.get_length())
return sound
func play_local_song() -> void:
if songs:
local_path = songs[0]
print(local_path)
print(FileAccess.file_exists(local_path))
play_sound(load_mp3(local_path))
func sound_test_local() -> void:
play_sound(preload("res://sounds/01. Opening.mp3"))
+1
View File
@@ -0,0 +1 @@
uid://d1v0rquma6nt8
+94
View File
@@ -0,0 +1,94 @@
[gd_scene load_steps=10 format=3 uid="uid://ds15cgsf8vpvc"]
[ext_resource type="Script" uid="uid://d1v0rquma6nt8" path="res://MusicPlayer.gd" id="1_t24ra"]
[ext_resource type="AudioStream" uid="uid://n2g8jddr85h2" path="res://sounds/01. Opening.mp3" id="2_xti80"]
[ext_resource type="Texture2D" uid="uid://comxqfiykp54f" path="res://icons/play_icon_light.svg" id="3_6g308"]
[ext_resource type="Texture2D" uid="uid://ccb6rvbldlgdg" path="res://icons/reload_light_icon.svg" id="4_jleuo"]
[ext_resource type="PackedScene" uid="uid://w400rnew7453" path="res://volume_slider.tscn" id="5_iifuj"]
[sub_resource type="InputEventKey" id="InputEventKey_r4qo3"]
device = -1
alt_pressed = true
keycode = 88
physical_keycode = 88
key_label = 88
unicode = 120
[sub_resource type="Shortcut" id="Shortcut_ipcfh"]
events = [SubResource("InputEventKey_r4qo3")]
[sub_resource type="InputEventKey" id="InputEventKey_2nvce"]
device = -1
alt_pressed = true
keycode = 90
unicode = 90
[sub_resource type="Shortcut" id="Shortcut_i7swq"]
events = [SubResource("InputEventKey_2nvce")]
[node name="MusicPlayer" type="PanelContainer"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -121.0
offset_top = -15.5
offset_right = 121.0
offset_bottom = 16.5
grow_horizontal = 2
grow_vertical = 2
size_flags_vertical = 4
script = ExtResource("1_t24ra")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_xti80")
bus = &"music"
[node name="AudioSoundPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_xti80")
bus = &"music"
[node name="AudioSoundEffectPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_xti80")
bus = &"music"
[node name="MusicPlayerContainer" type="HBoxContainer" parent="."]
layout_mode = 2
size_flags_vertical = 4
[node name="PlayTextureButton" type="TextureButton" parent="MusicPlayerContainer"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
focus_mode = 0
action_mode = 0
shortcut = SubResource("Shortcut_ipcfh")
texture_normal = ExtResource("3_6g308")
ignore_texture_size = true
stretch_mode = 0
[node name="RestartTextureButton" type="TextureButton" parent="MusicPlayerContainer"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
focus_mode = 0
action_mode = 0
shortcut = SubResource("Shortcut_i7swq")
texture_normal = ExtResource("4_jleuo")
ignore_texture_size = true
stretch_mode = 0
flip_h = true
[node name="MusicPlayerSlider" type="HSlider" parent="MusicPlayerContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
scrollable = false
[node name="MusicTimeLabel" type="Label" parent="MusicPlayerContainer"]
layout_mode = 2
text = "0:00 / 0:00"
[node name="VolumeSlider" parent="MusicPlayerContainer" instance=ExtResource("5_iifuj")]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_vertical = 4
BIN
View File
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
echo -ne '\033c\033]0;MusicPlayer\a'
base_path="$(dirname "$(realpath "$0")")"
"$base_path/MusicPlayer_1.5.1.x86_64" "$@"
BIN
View File
Binary file not shown.
+54 -28
View File
@@ -1,53 +1,79 @@
class_name Player
extends Control extends Control
@onready @onready
var player_name := $HBoxContainer/Name var player_name_field := $HBoxContainer/Name
@onready @onready
var points := $HBoxContainer/Points var add_button := $HBoxContainer/AddPoint
@onready @onready
var add := $HBoxContainer/AddPoint var minus_button := $HBoxContainer/RemovePoint
@onready
var minus := $HBoxContainer/RemovePoint
@onready @onready
var character := $HBoxContainer/Character var character := $HBoxContainer/Character
signal change_character_clicked @onready
var remove_player := $HBoxContainer/RemovePlayer
signal change_character_clicked
signal player_removed
@export
var id: int
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready() -> void:
print("_ready") add_button.pressed.connect(add_point)
add.pressed.connect(add_point) add_button.set_shortcut(create_button_shortcut(id, false))
minus.pressed.connect(minus_point) minus_button.pressed.connect(minus_point)
minus_button.set_shortcut(create_button_shortcut(id, true))
character.pressed.connect(change_character) character.pressed.connect(change_character)
player_name.mouse_filter = Control.MOUSE_FILTER_PASS remove_player.pressed.connect(func() -> void: player_removed.emit())
player_name.gui_input.connect(name_clicked) update_score()
set_player_character()
func name_clicked(event): func _process(delta: float) -> void:
if (event is InputEventMouseButton && event.pressed && event.button_index == MOUSE_BUTTON_LEFT): remove_player.visible = Settings.edit_players
print("Clicked: " + player_name.text)
func add_point(): func create_button_shortcut(scancode : int, ctrl_pressed: bool) -> Shortcut:
var value := int(points.text) var button_shortcut: Shortcut = Shortcut.new()
points.text = str(value + 1) var button_event : InputEventKey = InputEventKey.new()
button_event.keycode = scancode + 49
button_event.alt_pressed = true
button_event.ctrl_pressed = ctrl_pressed
button_shortcut.events.append(button_event)
return button_shortcut
func minus_point(): func add_point() -> void:
var value := int(points.text) Settings.player_array[id].add_point()
points.text = str(value - 1) update_score()
func change_character(): func minus_point() -> void:
print("change_character") Settings.player_array[id].minus_point()
update_score()
func change_character() -> void:
change_character_clicked.emit() change_character_clicked.emit()
func _on_control_character_selected_clicked(file_name: String): func character_selected(file_name: String) -> void:
print("Back in player list with: " + file_name) print("Back in player list with: " + file_name)
Settings.player_array[id].character = load("res://characters/" + file_name)
set_player_character()
var texture = load("res://characters/" + file_name) func new_character_selected(character_texture: ImageTexture) -> void:
print("Back in player list with new")
Settings.player_array[id].character = character_texture
set_player_character()
func set_player_character() -> void:
character.custom_minimum_size = Vector2(80, 40) character.custom_minimum_size = Vector2(80, 40)
character.ignore_texture_size = true character.ignore_texture_size = true
character.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT character.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT_CENTERED
character.texture_normal = texture character.texture_normal = Settings.player_array[id].character
func update_score() -> void:
if OS.has_feature("debug"):
player_name_field.text = str(Settings.player_array[id].id) + " " + Settings.player_array[id].player_name + ": " + str(Settings.player_array[id].player_score)
else:
player_name_field.text = Settings.player_array[id].player_name + ": " + str(Settings.player_array[id].player_score)
+1
View File
@@ -0,0 +1 @@
uid://dl6no2wr2c86y
+69 -18
View File
@@ -1,47 +1,98 @@
[gd_scene load_steps=4 format=3 uid="uid://cslogy2csnd7a"] [gd_scene load_steps=9 format=3 uid="uid://cslogy2csnd7a"]
[ext_resource type="Script" path="res://Player.gd" id="1_if4kc"] [ext_resource type="Script" uid="uid://dl6no2wr2c86y" path="res://Player.gd" id="1_if4kc"]
[ext_resource type="Texture2D" uid="uid://bah8j3gu07305" path="res://characters/Kiryu.png" id="1_y7dih"] [ext_resource type="Texture2D" uid="uid://r4as0nmtoa7p" path="res://noCharacter.png" id="2_hpj3s"]
[ext_resource type="Texture2D" uid="uid://t1tnj6nqpi4a" path="res://person_remove-black-36dp.svg" id="2_xw2ck"] [ext_resource type="Texture2D" uid="uid://b2kj6m8qpsgb1" path="res://icons/person_remove_light.svg" id="3_j3uxe"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821k2"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w10e8"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_78a8g"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_i56hb"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_b2crt"]
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
[node name="Player" type="Control"] [node name="Player" type="Control"]
custom_minimum_size = Vector2(2.08165e-12, 40) custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 0
anchor_right = 1.0 offset_bottom = 40.0
anchor_bottom = 1.0 size_flags_horizontal = 3
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_if4kc") script = ExtResource("1_if4kc")
[node name="HBoxContainer" type="HBoxContainer" parent="."] [node name="HBoxContainer" type="HBoxContainer" parent="."]
custom_minimum_size = Vector2(2.08165e-12, 40)
layout_mode = 0 layout_mode = 0
offset_right = 40.0 offset_right = 40.0
offset_bottom = 40.0 offset_bottom = 40.0
[node name="Name" type="Label" parent="HBoxContainer"] [node name="Panel4" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(5, 40)
layout_mode = 2 layout_mode = 2
text = "Sansan: " theme_override_styles/panel = SubResource("StyleBoxFlat_821k2")
[node name="Points" type="Label" parent="HBoxContainer"] [node name="Name" type="Label" parent="HBoxContainer"]
custom_minimum_size = Vector2(130, 40)
layout_mode = 2 layout_mode = 2
text = "0" size_flags_vertical = 1
text = ": 0"
vertical_alignment = 1
[node name="Panel3" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(80, 2.08165e-12)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_w10e8")
[node name="Character" type="TextureButton" parent="HBoxContainer"] [node name="Character" type="TextureButton" parent="HBoxContainer"]
custom_minimum_size = Vector2(80, 40) custom_minimum_size = Vector2(80, 40)
layout_mode = 2 layout_mode = 2
texture_normal = ExtResource("1_y7dih") focus_mode = 0
action_mode = 0
texture_normal = ExtResource("2_hpj3s")
ignore_texture_size = true ignore_texture_size = true
stretch_mode = 5 stretch_mode = 5
[node name="AddPoint" type="Button" parent="HBoxContainer"] [node name="Panel2" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(30, 40)
layout_mode = 2 layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_78a8g")
[node name="AddPoint" type="Button" parent="HBoxContainer"]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "+1" text = "+1"
[node name="RemovePoint" type="Button" parent="HBoxContainer"] [node name="Panel5" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(3, 40)
layout_mode = 2 layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_i56hb")
[node name="RemovePoint" type="Button" parent="HBoxContainer"]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "-1" text = "-1"
[node name="RemovePlayer" type="TextureButton" parent="HBoxContainer"] [node name="Panel" type="Panel" parent="HBoxContainer"]
custom_minimum_size = Vector2(30, 40)
layout_mode = 2 layout_mode = 2
texture_normal = ExtResource("2_xw2ck") theme_override_styles/panel = SubResource("StyleBoxFlat_b2crt")
[node name="RemovePlayer" type="TextureButton" parent="HBoxContainer"]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
action_mode = 0
texture_normal = ExtResource("3_j3uxe")
stretch_mode = 0
+38
View File
@@ -0,0 +1,38 @@
extends TextEdit
signal enter_key_pressed
signal close_pressed
@export
var LIMIT: int = 10
var current_text = ''
var cursor_line = 0
var cursor_column = 0
func _ready():
text_changed.connect(_on_text_changed)
func _input(event):
if event is InputEventKey and event.pressed:
if event.alt_pressed && event.keycode == KEY_A:
close_pressed.emit()
if has_focus():
if event.keycode == KEY_ENTER || event.keycode == KEY_KP_ENTER:
enter_key_pressed.emit()
func _on_text_changed():
if text.contains("\n"):
text = text.replace("\n", "")
var new_text : String = text
if new_text.length() > LIMIT:
text = current_text
# when replacing the text, the cursor will get moved to the beginning of the
# text, so move it back to where it was
set_caret_line(cursor_line)
set_caret_column(cursor_column)
current_text = text
# save current position of cursor for when we have reached the limit
cursor_line = get_caret_line()
cursor_column = get_caret_column()
+1
View File
@@ -0,0 +1 @@
uid://cgakje8gb37tf
+52
View File
@@ -0,0 +1,52 @@
extends Node
class_name PlayerObject
signal first_point_triggerd
signal match_point_triggerd
signal winner_triggerd
signal point_given_sound
signal player_point_given
signal player_point_taken
@export
var id: int
@export
var player_name: String
@export
var player_score: int
var is_first_point: bool = true
var character: Texture = load("res://noCharacter.png")
func _init(new_name: String, new_id: int) -> void:
player_name = new_name
id = new_id
player_score = 0
func add_point() -> void:
if player_score < Settings.winning_score:
player_score += 1
player_point_given.emit()
if player_score == 1 && is_first_point:
is_first_point = false
first_point_triggerd.emit()
elif player_score == Settings.winning_score - 1:
match_point_triggerd.emit()
elif player_score == Settings.winning_score:
winner_triggerd.emit()
else:
point_given_sound.emit()
func minus_point() -> void:
if player_score > 0:
player_score -= 1
player_point_taken.emit()
if player_score == 0:
is_first_point = true
func reset_points() -> void:
player_score = 0
is_first_point = true
+41
View File
@@ -0,0 +1,41 @@
extends Control
@onready
var qr_panel: Panel = $QRPanel
@onready
var qr_code_rect: QRCodeRect = $QRPanel/QRCodeRect
@onready
var url_label: Label = $QRPanel/URLLabel
func _ready() -> void:
qr_code_rect.light_module_color = Color.WHITE
qr_code_rect.dark_module_color = Color.BLACK
qr_code_rect.quiet_zone_size = 4
# Generate QR code for the search URL
var url: String = Settings.default_path + "/search"
qr_code_rect.data = url
url_label.text = qr_code_rect.data
print("QR code generated for: ", url)
func show_window() -> void:
visible = true
# Regenerate QR code in case settings changed
var url: String = Settings.default_path + "/search"
qr_code_rect.data = url
url_label.text = qr_code_rect.data
func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), qr_panel.size).has_point(evLocal.position):
self.visible = false
func hide_window() -> void:
visible = false
+1
View File
@@ -0,0 +1 @@
uid://bsa6xg5xos6h7
+52
View File
@@ -0,0 +1,52 @@
[gd_scene format=3 uid="uid://btupbowehiyyu"]
[ext_resource type="Script" uid="uid://bsa6xg5xos6h7" path="res://QRWindow.gd" id="1_qr_script"]
[ext_resource type="Script" uid="uid://dynulhnyq5hpq" path="res://addons/kenyoni/qr_code/qr_code_rect.gd" id="2_jpsxt"]
[node name="QRControl" type="Control" unique_id=1996957585]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_qr_script")
[node name="QRPanel" type="Panel" parent="." unique_id=1021365843]
unique_name_in_owner = true
layout_mode = 0
offset_right = 450.0
offset_bottom = 520.0
[node name="QRCodeRect" type="TextureRect" parent="QRPanel" unique_id=1054378438]
layout_mode = 0
offset_left = 20.0
offset_top = 20.0
offset_right = 430.0
offset_bottom = 430.0
script = ExtResource("2_jpsxt")
auto_update = true
mode = 4
error_correction = 3
use_eci = true
eci_value = 26
data = ""
auto_version = true
auto_mask_pattern = true
light_module_color = Color(1, 1, 1, 1)
dark_module_color = Color(0, 0, 0, 1)
auto_module_size = false
module_size = 8
quiet_zone_size = 4
metadata/_custom_type_script = "uid://dynulhnyq5hpq"
[node name="URLLabel" type="Label" parent="QRPanel" unique_id=230761497]
unique_name_in_owner = true
layout_mode = 0
offset_left = 20.0
offset_top = 450.0
offset_right = 430.0
offset_bottom = 490.0
text = "URL"
horizontal_alignment = 1
vertical_alignment = 1
+143 -38
View File
@@ -1,73 +1,178 @@
extends Control extends Control
@onready @onready
var search_list := $ScrollContainer/VBoxContainer var search_list: VBoxContainer = $ScrollContainer/VBoxContainer
@onready @onready
var clear_button := $ClearButton var search_panel: Panel = %SearchPanel
@onready @onready
var close_button := $CloseButton var clear_button: Button = $ClearButton
@onready @onready
var search_bar := $Searchbar var close_button: Button = $CloseButton
var games := [] @onready
var search_bar: TextEdit = $Searchbar
var games: Array = []
var regex: RegEx
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready() -> void:
get_list_of_games()
clear_button.pressed.connect(clear) clear_button.pressed.connect(clear)
close_button.pressed.connect(close) close_button.pressed.connect(close)
search_bar.grab_focus() search_bar.grab_focus()
search_bar.text_changed.connect(search) search_bar.text_changed.connect(search)
visibility_changed.connect(focus)
regex = RegEx.new()
func close(): func focus() -> void:
if self.visible == true:
search_bar.grab_focus()
clear()
func close() -> void:
clear() clear()
self.visible = false self.visible = false
func search(): func search() -> void:
print(search_bar.text) print(search_bar.text)
delete_children(search_list) Settings.delete_children(search_list)
for game in games: var search_text: String = search_bar.text.to_lower()
if search_bar.text == "" || game.replace(" ", "").to_lower().contains(search_bar.text.replace(" ", "").to_lower()): for game: String in games:
var label := Label.new() if is_match_exact(search_text, game):
add_game(game)
var clean_search_text: String = clean_search_term(search_text)
for game: String in games:
if is_match_contains(clean_search_text, clean_game(game)):
add_game(game)
for game: String in games:
if is_match_regex(clean_search_text, clean_game(game)):
add_game(game)
func clean_search_term(term: String) -> String:
return term.replace(" ", "").replace("é", "e").replace("+", "plus").replace("&", "and").replace("'n", "and")
func clean_game(term: String) -> String:
return term.replace(" ", "").replace("é", "e").replace("+", "plus").replace("&", "and").replace("'n", "and").to_lower()
func is_match_exact(search_term: String, game_name: String) -> bool:
game_name = game_name.to_lower()
if search_term == "":
return true
elif game_name.contains(search_term):
return true
else:
return false
func is_match_contains(search_term: String, game_name: String) -> bool:
if search_term == "":
return true
elif game_name.contains(search_term):
return true
else:
return false
func is_match_regex(search_term: String, game_name: String) -> bool:
if search_term == "":
return true
elif compile_regex(search_term).search(game_name):
return true
else:
return false
func add_game(game: String) -> void:
var label: Label = Label.new()
label.text = game label.text = game
print("game: " + game)
label.autowrap_mode = TextServer.AUTOWRAP_WORD label.autowrap_mode = TextServer.AUTOWRAP_WORD
if !check_if_game_exists(game):
search_list.add_child(label) search_list.add_child(label)
static func delete_children(node): func check_if_game_exists(game: String) -> bool:
for n in node.get_children(): var game_exists: bool = false
node.remove_child(n) for child: Label in search_list.get_children():
n.queue_free() if child.text == game:
game_exists = true
return game_exists
func compile_regex(search_term: String) -> RegEx:
var regText: String = ".*"
for letter: String in search_term:
regText += letter + ".*"
regex.compile(regText)
return regex
func get_list_of_games() -> void: func get_list_of_games() -> void:
var http_request = HTTPRequest.new() print("get_list_of_games")
add_child(http_request) var handle_games: Callable = func handle_games(array: Array) -> void:
http_request.request_completed.connect(self._http_request_completed) if typeof(array) == TYPE_ARRAY:
games = []
# Perform a GET request. The URL below returns JSON as of writing. Settings.delete_children(search_list)
var error = http_request.request("https://music.sanplex.tech/music/all/order") games.append_array(array)
if error != OK: for game: String in games:
push_error("An error occurred in the HTTP request.") var label: Label = Label.new()
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
var json = JSON.new()
var error = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
if typeof(data_received) == TYPE_ARRAY:
games.append_array(data_received)
for game in games:
var label := Label.new()
label.text = game label.text = game
label.autowrap_mode = TextServer.AUTOWRAP_WORD label.autowrap_mode = TextServer.AUTOWRAP_WORD
search_list.add_child(label) search_list.add_child(label)
else: else:
print("Unexpected data") print("Unexpected data")
Settings.make_request2("/music/all/order", handle_games, true)
func clear(): func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), search_panel.size).has_point(evLocal.position):
self.visible = false
func clear() -> void:
search_bar.text = "" search_bar.text = ""
search()
search_bar.grab_focus() search_bar.grab_focus()
func old_search() -> void:
print(search_bar.text)
Settings.delete_children(search_list)
for game: String in games:
if old_is_match_exact(search_bar.text, game):
add_game(game)
for game: String in games:
if is_match_contains(clean_term(search_bar.text), clean_term(game)):
add_game(game)
for game: String in games:
if old_is_match_regex(clean_term(search_bar.text), clean_term(game)):
add_game(game)
func clean_term(term: String) -> String:
return term.replace(" ", "").replace("é", "e").replace("+", "plus").replace("&", "and").replace("'n", "and").to_lower()
func old_is_match_exact(search_term: String, game_name: String) -> bool:
search_term = search_term.to_lower()
game_name = game_name.to_lower()
if search_term == "":
return true
elif game_name.contains(search_term):
return true
else:
return false
func old_is_match_regex(search_term: String, game_name: String) -> bool:
if search_term == "":
return true
elif compile_regex(search_term).search(game_name):
return true
else:
return false
func old_compile_regex(search_term: String) -> RegEx:
var regex = RegEx.new()
var regText: String = ".*"
for letter in search_term:
regText += letter + ".*"
regex.compile(regText)
return regex
+1
View File
@@ -0,0 +1 @@
uid://bg5yo08638600
+12 -4
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bxydgil1yifps"] [gd_scene load_steps=2 format=3 uid="uid://bxydgil1yifps"]
[ext_resource type="Script" path="res://SearchWindow.gd" id="1_m7bij"] [ext_resource type="Script" uid="uid://bg5yo08638600" path="res://SearchWindow.gd" id="1_m7bij"]
[node name="Control" type="Control"] [node name="Control" type="Control"]
layout_mode = 3 layout_mode = 3
@@ -11,30 +11,38 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_m7bij") script = ExtResource("1_m7bij")
[node name="Panel" type="Panel" parent="."] [node name="SearchPanel" type="Panel" parent="."]
unique_name_in_owner = true
layout_mode = 0 layout_mode = 0
offset_right = 1152.0 offset_right = 1152.0
offset_bottom = 640.0 offset_bottom = 640.0
[node name="ClearButton" type="Button" parent="."] [node name="ClearButton" type="Button" parent="."]
texture_filter = 1
layout_mode = 0 layout_mode = 0
offset_left = 880.0 offset_left = 880.0
offset_top = 24.0 offset_top = 24.0
offset_right = 944.0 offset_right = 944.0
offset_bottom = 64.0 offset_bottom = 64.0
scale = Vector2(2, 2) scale = Vector2(2, 2)
focus_mode = 0
action_mode = 0
text = "Clear" text = "Clear"
[node name="CloseButton" type="Button" parent="."] [node name="CloseButton" type="Button" parent="."]
layout_mode = 2 texture_filter = 1
layout_mode = 0
offset_left = 1032.0 offset_left = 1032.0
offset_top = 24.0 offset_top = 24.0
offset_right = 1082.0 offset_right = 1082.0
offset_bottom = 64.0 offset_bottom = 64.0
scale = Vector2(2, 2) scale = Vector2(2, 2)
focus_mode = 0
action_mode = 0
text = "Close" text = "Close"
[node name="Searchbar" type="TextEdit" parent="."] [node name="Searchbar" type="TextEdit" parent="."]
texture_filter = 1
layout_mode = 0 layout_mode = 0
offset_left = 64.0 offset_left = 64.0
offset_top = 24.0 offset_top = 24.0
@@ -44,7 +52,7 @@ scale = Vector2(2, 2)
placeholder_text = "Search" placeholder_text = "Search"
[node name="ScrollContainer" type="ScrollContainer" parent="."] [node name="ScrollContainer" type="ScrollContainer" parent="."]
layout_mode = 2 layout_mode = 0
offset_top = 128.0 offset_top = 128.0
offset_right = 576.0 offset_right = 576.0
offset_bottom = 384.0 offset_bottom = 384.0
+108
View File
@@ -0,0 +1,108 @@
extends Node
const MAX_NUMBER_OF_PLAYERS: int = 7
var default_path: String = "https://music.sanplex.xyz"
var selected_server: int = 0
var is_local: bool = false
var is_debug: bool = false
var stop_after_current: bool = true
var auto_repeat_song: bool = true
var hide_next_track: bool = true
var add_to_stats: bool = true
var use_low_played_mode: bool = false
var winning_score: int = 20
var fullscreen: bool = false
var play_local: bool = false
var inspiration_list_speed: int = 1
var hide_for_seconds: float = 5.0
var hide_beginning: bool = false
var hide_length: bool = false
var hide_ticks: bool = false
var player_array: Array[PlayerObject]
var edit_players: bool = false
var currently_syncing: bool = false
var character_select_open: bool = false
var version: String = "1.8.5"
func make_request2(address: String, func_name: Callable, expect_data: bool) -> void:
var error_handling: Callable = func(_result: int, response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
print("request done to address: ", default_path + address)
if response_code == 200:
print("func_name: ", func_name.get_method())
if !expect_data:
func_name.call()
else:
var json: JSON = JSON.new()
var error: int = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
print("data_received type: ", type_string(typeof(data_received)))
if typeof(data_received) == TYPE_ARRAY:
func_name.call(data_received)
elif func_name != null:
func_name.call(data_received)
else:
print("data_received type: ", type_string(typeof(body)))
func_name.call(body)
var http_request: HTTPRequest = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(error_handling)
# Perform a GET request. The URL below returns JSON as of writing.
print("address: ", default_path + address)
var request_error: int = http_request.request(default_path + address)
if request_error != OK:
push_error("An error occurred in the HTTP request.")
func make_request3(address: String) -> void:
var error_handling: Callable = func(_result: int, response_code: int, _headers: PackedStringArray, _body: PackedByteArray) -> void:
print("request done to address: ", default_path + address)
if response_code != 200:
print("Error: " + str(response_code))
var http_request: HTTPRequest = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(error_handling)
# Perform a GET request. The URL below returns JSON as of writing.
var request_error: int = http_request.request(default_path + address)
if request_error != OK:
push_error("An error occurred in the HTTP request.")
func make_put_request(address: String) -> void:
var error_handling: Callable = func(_result: int, response_code: int, _headers: PackedStringArray, _body: PackedByteArray) -> void:
print("request done to address: ", default_path + address)
if response_code != 200:
print("Error: " + str(response_code))
var http_request: HTTPRequest = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(error_handling)
# Perform a GET request. The URL below returns JSON as of writing.
var headers: PackedStringArray = ["Content-Type: application/json"]
var request_error: int = http_request.request(default_path + address, headers, HTTPClient.METHOD_PUT)
if request_error != OK:
push_error("An error occurred in the HTTP request.")
func delete_children(node: Node) -> void:
for n: Node in node.get_children():
node.remove_child(n)
n.queue_free()
func delete_player_children(node: Node) -> void:
for n: Node in node.get_children():
print(n)
print(n.name)
if n.name == "HBoxContainer":
pass
elif n.name == "AddPlayerContainer":
pass
else:
node.remove_child(n)
n.queue_free()
+1
View File
@@ -0,0 +1 @@
uid://dex06sca65j4t
+219
View File
@@ -0,0 +1,219 @@
extends Control
@onready
var settings_panel: Panel = %SettingsPanel
@onready
var stop_after_current_button: CheckButton = %StopAfterCurrentCheckButton
@onready
var hide_next_track_button: CheckButton = %HideNextTrackCheckButton
@onready
var add_to_database_button: CheckButton = %AddToDatabaseCheckButton
@onready
var low_played_button: CheckButton = %LowPlayedCheckButton
@onready
var hide_beginning_button: CheckButton = %HideBeginningCheckButton
@onready
var hide_length_button: CheckButton = %HideLengthCheckButton
@onready
var hide_ticks_button: CheckButton = %HideTicksCheckButton
@onready
var score_label: Label = %ScoreLabel
@onready
var lower_winning_score_button: Button = %LowerButton
@onready
var increase_winning_score_button: Button = %IncreaseButton
@onready
var cache_label: Label = %CacheLabel
@onready
var lower_cache_button: Button = %LowerCacheButton
@onready
var increase_cache_button: Button = %IncreaseCacheButton
@onready
var inspiration_speed_label: Label = %InspirationListSpeedLabel
@onready
var lower_inspiration_speed_button: Button = %LowerInspirationSpeedButton
@onready
var increase_inspiration_speed_button: Button = %IncreaseInspirationSpeedButton
@onready
var hide_for_seconds_label: Label = %HideForSecondsLabel
@onready
var lower_hide_for_seconds_button: Button = %LowerHideForSecondsButton
@onready
var increase_hide_for_seconds_button: Button = %IncreaseHideForSecondsButton
@onready
var select_server_button: OptionButton = %SelectServerButton
@onready
var fullscreen_button: CheckButton = %FullscreenButton
@onready
var local_button: CheckButton = %LocalButton
signal server_changed
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
fullscreen_button.button_pressed = Settings.fullscreen
select_server_button.selected = Settings.selected_server
stop_after_current_button.pressed.connect(stop_after_current)
hide_next_track_button.pressed.connect(hide_next_track)
add_to_database_button.pressed.connect(add_to_database)
low_played_button.pressed.connect(low_played)
hide_beginning_button.pressed.connect(hide_beginning)
hide_length_button.pressed.connect(hide_length)
hide_ticks_button.pressed.connect(hide_ticks)
lower_winning_score_button.pressed.connect(lower_winning_score)
increase_winning_score_button.pressed.connect(increase_winning_score)
lower_cache_button.pressed.connect(lower_cache)
increase_cache_button.pressed.connect(increase_cache)
lower_inspiration_speed_button.pressed.connect(lower_inspiration_speed)
increase_inspiration_speed_button.pressed.connect(increase_inspiration_speed)
lower_hide_for_seconds_button.pressed.connect(lower_hide_for_seconds)
increase_hide_for_seconds_button.pressed.connect(increase_hide_for_seconds)
fullscreen_button.pressed.connect(fullscreen)
local_button.pressed.connect(local_play)
stop_after_current_button.button_pressed = Settings.stop_after_current
hide_next_track_button.button_pressed = Settings.hide_next_track
add_to_database_button.button_pressed = Settings.add_to_stats
low_played_button.button_pressed = Settings.use_low_played_mode
hide_beginning_button.button_pressed = Settings.hide_beginning
hide_length_button.button_pressed = Settings.hide_length
hide_ticks_button.button_pressed = Settings.hide_ticks
score_label.text = str(Settings.winning_score)
cache_label.text = str(Playlist.number_of_tracks_to_preload)
inspiration_speed_label.text = str(Settings.inspiration_list_speed)
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
fullscreen_button.button_pressed = Settings.fullscreen
update_hide_for_seconds_enabled()
select_server_button.select(Settings.selected_server)
select_server_button.item_selected.connect(select_server)
func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), settings_panel.size).has_point(evLocal.position):
self.visible = false
func fullscreen() -> void:
Settings.fullscreen = !Settings.fullscreen
if Settings.fullscreen == true:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
if Settings.fullscreen == false:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
func local_play() -> void:
Settings.play_local = !Settings.play_local
func stop_after_current() -> void:
Settings.stop_after_current = !Settings.stop_after_current
func hide_next_track() -> void:
Settings.hide_next_track = !Settings.hide_next_track
func add_to_database() -> void:
Settings.add_to_stats = !Settings.add_to_stats
func low_played() -> void:
Settings.use_low_played_mode = !Settings.use_low_played_mode
func hide_beginning() -> void:
Settings.hide_beginning = !Settings.hide_beginning
update_hide_for_seconds_enabled()
func update_hide_for_seconds_enabled() -> void:
var enabled: bool = Settings.hide_beginning
%HideForSecondsHBoxContainer.visible = enabled
func hide_length() -> void:
Settings.hide_length = !Settings.hide_length
func hide_ticks() -> void:
Settings.hide_ticks = !Settings.hide_ticks
func lower_winning_score() -> void:
Settings.winning_score -= 1
score_label.text = str(Settings.winning_score)
func increase_winning_score() -> void:
Settings.winning_score += 1
score_label.text = str(Settings.winning_score)
func set_winning_score(new_score: int) -> void:
Settings.winning_score = new_score
score_label.text = str(Settings.winning_score)
func lower_cache() -> void:
Playlist.number_of_tracks_to_preload -= 1
if Playlist.number_of_tracks_to_preload < 1:
Playlist.number_of_tracks_to_preload = 1
cache_label.text = str(Playlist.number_of_tracks_to_preload)
func increase_cache() -> void:
Playlist.number_of_tracks_to_preload += 1
cache_label.text = str(Playlist.number_of_tracks_to_preload)
func lower_inspiration_speed() -> void:
Settings.inspiration_list_speed -= 1
if Settings.inspiration_list_speed < 1:
Settings.inspiration_list_speed = 1
inspiration_speed_label.text = str(Settings.inspiration_list_speed)
func increase_inspiration_speed() -> void:
Settings.inspiration_list_speed += 1
inspiration_speed_label.text = str(Settings.inspiration_list_speed )
func lower_hide_for_seconds() -> void:
Settings.hide_for_seconds -= 1.0
if Settings.hide_for_seconds < 0:
Settings.hide_for_seconds = 0
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
func increase_hide_for_seconds() -> void:
Settings.hide_for_seconds += 1.0
if Settings.hide_for_seconds > 10.0:
Settings.hide_for_seconds = 10.0
hide_for_seconds_label.text = str(Settings.hide_for_seconds)
func select_server(new_server: int) -> void:
print("select_server")
Settings.default_path = select_server_button.get_item_text(new_server)
Settings.selected_server = new_server
print("Settings.default_path: " + Settings.default_path)
print("Settings.selected_server: " + str(Settings.selected_server))
print("new_server: " + str(new_server))
print("select_server_button.get_item_text(new_server): " + select_server_button.get_item_text(new_server))
server_changed.emit()
func set_selected_server(new_server: int) -> void:
print("set_selected_server")
select_server_button.select(new_server)
Settings.default_path = select_server_button.get_item_text(new_server)
Settings.selected_server = new_server
print("Settings.default_path: " + Settings.default_path)
print("Settings.selected_server: " + str(Settings.selected_server))
print("new_server: " + str(new_server))
print("select_server_button.get_item_text(new_server): " + select_server_button.get_item_text(new_server))
server_changed.emit()
+1
View File
@@ -0,0 +1 @@
uid://dukqyjoduf1af
+241
View File
@@ -0,0 +1,241 @@
[gd_scene format=3 uid="uid://dldpeo5y3l5hq"]
[ext_resource type="Script" uid="uid://dukqyjoduf1af" path="res://SettingsWindow.gd" id="1_bt55j"]
[sub_resource type="LabelSettings" id="LabelSettings_3xrlm"]
font_size = 25
[node name="SettingsControl" type="Control" unique_id=1298840328]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_bt55j")
[node name="SettingsPanel" type="Panel" parent="." unique_id=45537159]
unique_name_in_owner = true
layout_mode = 0
offset_right = 500.0
offset_bottom = 640.0
[node name="ScrollContainer" type="ScrollContainer" parent="SettingsPanel" unique_id=1325795358]
layout_mode = 0
offset_right = 500.0
offset_bottom = 640.0
[node name="VBoxContainer" type="VBoxContainer" parent="SettingsPanel/ScrollContainer" unique_id=1796635163]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
[node name="Label" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1111531402]
layout_mode = 2
size_flags_vertical = 0
text = "Settings"
label_settings = SubResource("LabelSettings_3xrlm")
horizontal_alignment = 1
[node name="StopAfterCurrentCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=508305575]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
button_pressed = true
action_mode = 0
text = "Stop after current"
[node name="HideNextTrackCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1568244599]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
button_pressed = true
action_mode = 0
text = "Hide next track"
[node name="AddToDatabaseCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1673750542]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
text = "Turn on played to database"
[node name="LowPlayedCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1672657048]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
text = "Use low played mode"
[node name="HideBeginningCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1370617867]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
text = "Hide beginning of songs"
[node name="HideForSecondsHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1368485120]
unique_name_in_owner = true
layout_mode = 2
[node name="HideForSecondsTitle" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=1822369383]
unique_name_in_owner = true
layout_mode = 2
text = "Hide Start Seconds: "
[node name="HideForSecondsLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=1580108945]
unique_name_in_owner = true
layout_mode = 2
text = "5.0"
[node name="LowerHideForSecondsButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=180643442]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "-1"
[node name="IncreaseHideForSecondsButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HideForSecondsHBoxContainer" unique_id=340681770]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "+1"
[node name="HideLengthCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=67806372]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
text = "Hide length of songs"
[node name="HideTicksCheckButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=706322752]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
text = "Hide ticks in playbar"
[node name="HBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=2140610992]
layout_mode = 2
[node name="Label2" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=1892907487]
layout_mode = 2
text = "Winning Score: "
[node name="ScoreLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=444542662]
unique_name_in_owner = true
layout_mode = 2
text = "20"
[node name="LowerButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=614806355]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "-1"
[node name="IncreaseButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer" unique_id=1837169457]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "+1"
[node name="CacheHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=658210492]
layout_mode = 2
[node name="CacheTitleLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=365012193]
layout_mode = 2
text = "Predownload songs: "
[node name="CacheLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1558370172]
unique_name_in_owner = true
layout_mode = 2
text = "1"
[node name="LowerCacheButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1990385038]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "-1"
[node name="IncreaseCacheButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer" unique_id=1806295533]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "+1"
[node name="InspirationHBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=1686756540]
layout_mode = 2
[node name="InspirationListSpeedTitle" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=1397861506]
layout_mode = 2
text = "Inspiration List Speed: "
[node name="InspirationListSpeedLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=867387668]
unique_name_in_owner = true
layout_mode = 2
text = "1"
[node name="LowerInspirationSpeedButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=845209534]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "-1"
[node name="IncreaseInspirationSpeedButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer" unique_id=1122701153]
unique_name_in_owner = true
custom_minimum_size = Vector2(30, 2.08165e-12)
layout_mode = 2
focus_mode = 0
action_mode = 0
text = "+1"
[node name="SelectServerButton" type="OptionButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=434350694]
unique_name_in_owner = true
layout_mode = 2
selected = 0
item_count = 5
popup/item_0/text = "https://music.sanplex.xyz"
popup/item_0/id = 1
popup/item_1/text = "https://tmusic.sanplex.xyz"
popup/item_1/id = 2
popup/item_2/text = "https://rmusic.sanplex.xyz"
popup/item_2/id = 3
popup/item_3/text = "https://old-music.sanplex.xyz"
popup/item_3/id = 4
popup/item_4/text = "http://localhost:8080"
popup/item_4/id = 5
[node name="FullscreenButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=400304684]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 0
text = "Fullscreen"
[node name="QuickSyncButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=49497448]
visible = false
layout_mode = 2
size_flags_horizontal = 0
button_pressed = true
action_mode = 0
text = "Quick sync"
[node name="LocalButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer" unique_id=905844805]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 0
disabled = true
text = "Local"
+56
View File
@@ -0,0 +1,56 @@
extends Node
class_name SongObject
var song_number: int
var song_title: String
var game_title: String
var players_given_point: Array[int] = []
var is_answered: bool = false
var has_played: bool = false
var is_playing: bool = false
var song: AudioStream
func get_game_title() -> String:
if is_answered:
return game_title
else:
return "????????"
func get_song_title() -> String:
if is_answered:
return song_title
else:
return "??????"
func get_song_info() -> String:
if Settings.is_debug:
var format_string: String = "%d. %s - %s | played: %s | answered: %s"
return format_string % [(song_number + 1), game_title, song_title, has_played, is_answered]
elif is_answered:
var format_string: String = "%d. %s - %s"
return format_string % [(song_number + 1), game_title, song_title]
else:
return "??? - ???"
func add_point(id: int) -> void:
print("add_point")
players_given_point.append(id)
players_given_point.sort()
func remove_point(id: int) -> void:
print("remove_point")
if players_given_point.has(id):
players_given_point.remove_at(players_given_point.find(id))
players_given_point.sort()
func _to_string() -> String:
var format_string: String = "song_number: %d | game_title: %s | song_title: %s | is_answered: %s | has_played: %s | is_playing: %s"
return format_string % [(song_number), game_title, song_title, is_answered, has_played, is_playing]
+150
View File
@@ -0,0 +1,150 @@
[gd_scene load_steps=3 format=3 uid="uid://dpdem7pdxweb5"]
[ext_resource type="Script" uid="uid://c3ejukwth512a" path="res://sync_window.gd" id="1_8ba47"]
[sub_resource type="LabelSettings" id="LabelSettings_anbfi"]
font_size = 25
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_8ba47")
[node name="SyncPanel" type="Panel" parent="."]
unique_name_in_owner = true
layout_mode = 0
offset_right = 1152.0
offset_bottom = 640.0
[node name="ScrollContainer" type="ScrollContainer" parent="SyncPanel"]
layout_mode = 0
offset_right = 1152.0
offset_bottom = 640.0
[node name="SyncVBoxContainer" type="VBoxContainer" parent="SyncPanel/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SyncTitleLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "Sync"
label_settings = SubResource("LabelSettings_anbfi")
horizontal_alignment = 1
[node name="NoChangesLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 0
text = "No changes since last sync"
label_settings = SubResource("LabelSettings_anbfi")
horizontal_alignment = 1
[node name="ProgressHBoxContainer" type="HBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
[node name="SyncProgressBar" type="ProgressBar" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/ProgressHBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(1000, 0)
layout_mode = 2
size_flags_horizontal = 6
step = 1.0
rounded = true
[node name="SyncHBoxContainer" type="HBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_horizontal = 4
theme_override_constants/separation = 30
[node name="VSeparator6" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
layout_mode = 2
[node name="GamesAddedVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesAddedLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer/GamesAddedVBox"]
layout_mode = 2
text = "GamesAdded"
horizontal_alignment = 1
[node name="GamesAddedSeparator" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesReAddedVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesReAddedLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer/GamesReAddedVBox"]
layout_mode = 2
text = "GamesReAdded"
[node name="GamesReAddedSeparator" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesChangedTitleVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesChangedTitleLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer/GamesChangedTitleVBox"]
layout_mode = 2
text = "GamesChangedTitle"
[node name="GamesChangedTitleSeparator" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesChangedContentVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesChangedContentLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer/GamesChangedContentVBox"]
layout_mode = 2
text = "GamesChangedContent"
[node name="GamesChangedContentSeparator" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesRemovedVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="GamesRemovedLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer/GamesRemovedVBox"]
layout_mode = 2
text = "GamesRemoved"
[node name="GamesRemovedSeparator" type="VSeparator" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/SyncHBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
[node name="SyncTime" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Sync time: "
horizontal_alignment = 1
[node name="CatchedErrorsVBox" type="VBoxContainer" parent="SyncPanel/ScrollContainer/SyncVBoxContainer"]
unique_name_in_owner = true
visible = false
layout_mode = 2
[node name="CatchedErrorsLabel" type="Label" parent="SyncPanel/ScrollContainer/SyncVBoxContainer/CatchedErrorsVBox"]
layout_mode = 2
text = "CatchedErrors"
horizontal_alignment = 1
[node name="SyncTimer" type="Timer" parent="."]
unique_name_in_owner = true
+54
View File
@@ -0,0 +1,54 @@
[gd_scene format=3 uid="uid://cxlsmxnrp0agh"]
[ext_resource type="Script" uid="uid://dxpb22xbwf3t1" path="res://winner_window.gd" id="1_winner_script"]
[ext_resource type="Texture2D" uid="uid://r4as0nmtoa7p" path="res://noCharacter.png" id="2_no_character"]
[sub_resource type="LabelSettings" id="LabelSettings_hr75l"]
font_size = 35
[node name="WinnerControl" type="Control" unique_id=1111111111]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_winner_script")
[node name="WinnerPanel" type="Panel" parent="." unique_id=89212869]
unique_name_in_owner = true
layout_mode = 0
offset_right = 500.0
offset_bottom = 600.0
[node name="VBoxContainer" type="VBoxContainer" parent="WinnerPanel" unique_id=471159349]
layout_mode = 0
offset_top = 25.0
offset_right = 500.0
offset_bottom = 282.0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
[node name="WinnerPicture" type="TextureRect" parent="WinnerPanel/VBoxContainer" unique_id=1543774067]
unique_name_in_owner = true
custom_minimum_size = Vector2(480, 200)
layout_mode = 2
texture = ExtResource("2_no_character")
expand_mode = 3
stretch_mode = 5
[node name="WinnerLabel" type="Label" parent="WinnerPanel/VBoxContainer" unique_id=1437597286]
unique_name_in_owner = true
texture_filter = 1
layout_mode = 2
text = "Winner!"
label_settings = SubResource("LabelSettings_hr75l")
horizontal_alignment = 1
vertical_alignment = 2
[node name="PlayersList" type="VBoxContainer" parent="WinnerPanel/VBoxContainer" unique_id=471159350]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
+7
View File
@@ -0,0 +1,7 @@
Copyright 2022-present Iceflower S (iceflower@gmx.de)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+75
View File
@@ -0,0 +1,75 @@
extends RefCounted
var _data: PackedByteArray = []
func duplicate():
var dup = new()
dup._data = self._data.duplicate()
return dup
func resize(size: int) -> void:
self._data.resize(size)
func size() -> int:
return self._data.size()
func clear() -> void:
return self._data.clear()
func get_array() -> PackedByteArray:
return self._data
func to_byte_array() -> PackedByteArray:
var byte_arr: PackedByteArray = []
var cur_byte: int = 0
for idx: int in range(self._data.size()):
var byte_idx: int = 7 - idx & 7
if self._data[idx]:
cur_byte |= (1 << byte_idx)
if (idx != 0 && byte_idx == 0) || idx == self._data.size() - 1:
byte_arr.append(cur_byte)
cur_byte = 0
return byte_arr
func prepend_bit(bit: bool) -> void:
self._data.insert(0, int(bit))
func append_bit(bit: bool) -> void:
self._data.append(int(bit))
func append_stream(stream) -> void:
self._data.append_array(stream.get_array())
func append_byte_array(arr: PackedByteArray) -> void:
for val: int in arr:
self.append(val, 8)
func prepend(value: int, total_bits: int) -> void:
for idx: int in range(total_bits - 1, -1, -1):
self._data.insert(0, int((value & (1 << idx)) != 0))
func append(value: int, total_bits: int) -> void:
for idx: int in range(total_bits - 1, -1, -1):
self._data.append(int((value & (1 << idx)) != 0))
func set_bit(idx: int, bit: bool) -> void:
self._data[idx] = int(bit)
func get_bit(idx: int) -> bool:
return bool(self._data[idx])
func _to_string() -> String:
var val: String = ""
for idx: int in range(self._data.size()):
if (idx + 1) & 7 == 1:
val += "["
val += str(self._data[idx])
if (idx + 1) & 7 == 0:
val += "]"
if (idx + 1) & 3 == 0:
val += " "
val = val.strip_edges()
if val[-1] != "]":
val += "]"
return val
+1
View File
@@ -0,0 +1 @@
uid://dyt1tls86b518
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg4"
xmlns="http://www.w3.org/2000/svg"
>
<defs
id="defs4" />
<path
id="rect4"
style="fill:#8eef97;fill-opacity:1;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="M 0,0 V 6 H 6 V 0 Z M 1,1 H 5 V 5 H 1 Z" />
<path
id="rect4-4-4"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
transform="rotate(90)"
d="m 2,-4 h 2 v 2 H 2 Z" />
<path
id="rect4-9"
style="fill:#8eef97;fill-opacity:1;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 10,0 v 6 h 6 V 0 Z m 1,1 h 4 v 4 h -4 z" />
<path
id="rect4-4-4-7"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
transform="rotate(90)"
d="m 2,-14 h 2 v 2 H 2 Z" />
<path
id="rect4-90"
style="fill:#8eef97;fill-opacity:1;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 0,10 v 6 h 6 v -6 z m 1,1 h 4 v 4 H 1 Z" />
<path
id="rect4-4-4-8"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
transform="rotate(90)"
d="m 12,-4 h 2 v 2 h -2 z" />
<path
id="rect5"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 10,12 h 2 v 2 h -2 z" />
<path
id="rect5-31"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 14,8 h 2 v 2 h -2 z" />
<path
id="rect5-3"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 8,14 h 2 v 2 H 8 Z" />
<path
id="rect5-0"
style="fill:#8eef97;fill-opacity:1;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 14,12 v 2 h -2 v 2 h 4 v -4 z" />
<path
id="rect5-0-2-7"
style="fill:#8eef97;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 12,10 h 2 v 2 h -2 z" />
<path
id="rect5-5"
style="fill:#8eef97;fill-opacity:1;fill-rule:evenodd;stroke-width:32;paint-order:fill markers stroke"
d="m 8,8 v 4 h 2 v -2 h 2 V 8 Z" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+43
View File
@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cn383mw8drmm5"
path="res://.godot/imported/icon.svg-f2b8283af99fea807d6be2c96605b944.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/kenyoni/qr_code/icon.svg"
dest_files=["res://.godot/imported/icon.svg-f2b8283af99fea807d6be2c96605b944.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
+20
View File
@@ -0,0 +1,20 @@
[plugin]
name="QR Code"
description="QR Code generator."
author="Kenyoni Software"
version="2.0.0"
script="plugin.gd"
license="MIT"
repository="https://github.com/kenyoni-software/godot-addons"
keywords=[
"node",
"tool"
]
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License"
]
[plugin.dependencies]
godot=">=4.4"
+10
View File
@@ -0,0 +1,10 @@
@tool
extends EditorPlugin
const QrCodeRect := preload("res://addons/kenyoni/qr_code/qr_code_rect.gd")
func _enter_tree() -> void:
self.add_custom_type("QRCodeRect", "TextureRect", QrCodeRect, preload("res://addons/kenyoni/qr_code/icon.svg"))
func _exit_tree() -> void:
self.remove_custom_type("QRCodeRect")
+1
View File
@@ -0,0 +1 @@
uid://bepdve2jn8q0i
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
uid://c7aw4f3o7g8sc
+415
View File
@@ -0,0 +1,415 @@
@tool
@icon("res://addons/kenyoni/qr_code/icon.svg")
extends TextureRect
class_name QRCodeRect
const QRCode := preload("res://addons/kenyoni/qr_code/qr_code.gd")
const ShiftJIS := preload("res://addons/kenyoni/qr_code/shift_jis.gd")
var mode: QRCode.Mode:
set = set_mode,
get = get_mode
var error_correction: QRCode.ErrorCorrection:
set = set_error_correction,
get = get_error_correction
## Use Extended Channel Interpretation (ECI).
var use_eci: bool:
set = set_use_eci,
get = get_use_eci
## Extended Channel Interpretation (ECI) Value.
var eci_value: int:
set = set_eci_value,
get = get_eci_value
var data: Variant = "":
set = set_data,
get = get_data
## Automatically update the QR Code when a property changes.
var auto_update: bool = true:
set = set_auto_update
## Use automatically the smallest version possible.
var auto_version: bool = true:
set = set_auto_version,
get = get_auto_version
var version: int = 1:
set = set_version,
get = get_version
## Use automatically the best mask pattern.
var auto_mask_pattern: bool = true:
set = set_auto_mask_pattern,
get = get_auto_mask_pattern
## Used mask pattern.
var mask_pattern: int = 0:
set = set_mask_pattern,
get = get_mask_pattern
var light_module_color: Color = Color.WHITE:
set = set_light_module_color
var dark_module_color: Color = Color.BLACK:
set = set_dark_module_color
## Automatically set the module pixel size based on the size.
## Do not use expand mode KEEP_SIZE when using it.
## Turn this off when the QR Code is resized often, as it impacts the performance quite heavily.
var auto_module_size: bool = true:
set = set_auto_module_size
## Use that many pixel for one module.
## If auto_module_size is set, this value might by only occasionally updated. In this case do not rely on it.
var module_size: int = 1:
set = set_module_size
## Use that many modules for the quiet zone. A value of 4 is recommended.
var quiet_zone_size: int = 4:
set = set_quiet_zone_size
var _qr: QRCode = QRCode.new()
var _update_fn: Callable = self.update
var _cached_data: PackedByteArray = PackedByteArray()
func set_mode(new_mode: QRCode.Mode) -> void:
self._qr.mode = new_mode
self.notify_property_list_changed()
if self.auto_update:
self.update()
func get_mode() -> QRCode.Mode:
return self._qr.mode
func set_error_correction(new_error_correction: QRCode.ErrorCorrection) -> void:
self._qr.error_correction = new_error_correction
if self.auto_update:
self.update()
func get_error_correction() -> QRCode.ErrorCorrection:
return self._qr.error_correction
func set_use_eci(new_use_eci: bool) -> void:
self._qr.use_eci = new_use_eci
self.notify_property_list_changed()
if self.auto_update:
self.update()
func get_use_eci() -> bool:
return self._qr.use_eci
func set_eci_value(new_eci_value: int) -> void:
if self._qr.eci_value == new_eci_value:
return
self._qr.eci_value = new_eci_value
self.notify_property_list_changed()
if self.auto_update:
self.update()
func get_eci_value() -> int:
return self._qr.eci_value
func set_data(new_data: Variant) -> void:
match self._qr.mode:
QRCode.Mode.NUMERIC:
self._qr.put_numeric(new_data)
QRCode.Mode.ALPHANUMERIC:
self._qr.put_alphanumeric(new_data)
QRCode.Mode.BYTE:
if typeof(new_data) == TYPE_PACKED_BYTE_ARRAY || ! self.use_eci:
self._qr.put_byte(new_data)
return
match self.eci_value:
QRCode.ECI.ISO_8859_1:
self._qr.put_byte(new_data.to_ascii_buffer())
QRCode.ECI.SHIFT_JIS:
self._qr.put_byte(ShiftJIS.to_shift_jis_2004_buffer(new_data))
QRCode.ECI.UTF_8:
self._qr.put_byte(new_data.to_utf8_buffer())
QRCode.ECI.UTF_16:
self._qr.put_byte(new_data.to_utf16_buffer())
QRCode.ECI.US_ASCII:
self._qr.put_byte(new_data.to_ascii_buffer())
_:
self._qr.put_byte(new_data)
QRCode.Mode.KANJI:
self._qr.put_kanji(new_data)
if self.auto_update:
self.update()
func get_data() -> Variant:
var input_data: Variant = self._qr.get_input_data()
if self.mode == QRCode.Mode.BYTE && self.use_eci:
match self.eci_value:
QRCode.ECI.ISO_8859_1:
return input_data.get_string_from_ascii()
QRCode.ECI.SHIFT_JIS:
return ShiftJIS.get_string_from_shift_jis_2004(input_data)
QRCode.ECI.UTF_8:
return input_data.get_string_from_utf8()
QRCode.ECI.UTF_16:
return input_data.get_string_from_utf16()
QRCode.ECI.US_ASCII:
return input_data.get_string_from_ascii()
return self._qr.get_input_data()
func set_auto_update(new_auto_update: bool) -> void:
if auto_update == new_auto_update:
return
auto_update = new_auto_update
self.notify_property_list_changed()
if auto_update:
self.update()
func set_auto_version(new_auto_version: bool) -> void:
if self._qr.auto_version == new_auto_version:
return
self._qr.auto_version = new_auto_version
self.notify_property_list_changed()
if self.auto_update:
self.update()
func get_auto_version() -> bool:
return self._qr.auto_version
func set_version(new_version: int) -> void:
if self.auto_version || self._qr.version == new_version:
return
self._qr.version = new_version
if self.auto_update:
self.update()
func get_version() -> int:
return self._qr.version
func set_auto_mask_pattern(new_auto_mask_pattern: bool) -> void:
if self._qr.auto_mask_pattern == new_auto_mask_pattern:
return
self._qr.auto_mask_pattern = new_auto_mask_pattern
self.notify_property_list_changed()
if self.auto_update:
self.update()
func get_auto_mask_pattern() -> bool:
return self._qr.auto_mask_pattern
func set_mask_pattern(new_mask_pattern: int) -> void:
if self.auto_mask_pattern || self._qr.mask_pattern == new_mask_pattern:
return
self._qr.mask_pattern = new_mask_pattern
if self.auto_update:
self.update()
func get_mask_pattern() -> int:
return self._qr.mask_pattern
func set_light_module_color(new_light_module_color: Color) -> void:
if light_module_color == new_light_module_color:
return
light_module_color = new_light_module_color
if self.auto_update:
self._update_texture()
func set_dark_module_color(new_dark_module_color: Color) -> void:
if dark_module_color == new_dark_module_color:
return
dark_module_color = new_dark_module_color
if self.auto_update:
self._update_texture()
func set_auto_module_size(new_auto_module_size: bool) -> void:
if auto_module_size == new_auto_module_size:
return
auto_module_size = new_auto_module_size
self.notify_property_list_changed()
self.update_configuration_warnings()
if self.auto_update:
self._update_texture()
func set_module_size(new_module_size: int) -> void:
if module_size == new_module_size:
return
module_size = new_module_size
# if not auto it was set directly
if ! self.auto_module_size && self.auto_update:
self._update_texture()
func set_quiet_zone_size(new_quiet_zone_size: int) -> void:
if quiet_zone_size == new_quiet_zone_size:
return
quiet_zone_size = maxi(0, new_quiet_zone_size)
if self.auto_module_size && self.auto_update:
self._update_texture()
elif self.auto_module_size:
self._update_module_size()
func _ready() -> void:
if self.texture != null && self.auto_update:
self.update()
func update() -> void:
self._cached_data = self._qr.encode()
self._update_texture()
func _set(property: StringName, value: Variant) -> bool:
if property == "expand_mode":
self.update_configuration_warnings()
return false
func _get_property_list() -> Array[Dictionary]:
var data_prop: Dictionary = {
"name": "data",
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
}
match self.mode:
QRCode.Mode.NUMERIC:
data_prop["type"] = TYPE_STRING
QRCode.Mode.ALPHANUMERIC, QRCode.Mode.KANJI:
data_prop["type"] = TYPE_STRING
data_prop["hint"] = PROPERTY_HINT_MULTILINE_TEXT
QRCode.Mode.BYTE:
# these encoding is natively supported
if self.use_eci && self.eci_value in [QRCode.ECI.ISO_8859_1, QRCode.ECI.SHIFT_JIS, QRCode.ECI.UTF_8, QRCode.ECI.UTF_16, QRCode.ECI.US_ASCII]:
data_prop["type"] = TYPE_STRING
data_prop["hint"] = PROPERTY_HINT_MULTILINE_TEXT
else:
data_prop["type"] = TYPE_PACKED_BYTE_ARRAY
return [
{
"name": "_update_fn",
"type": TYPE_CALLABLE,
"usage": PROPERTY_USAGE_NONE if self.auto_update else PROPERTY_USAGE_EDITOR,
"hint": PROPERTY_HINT_TOOL_BUTTON,
"hint_string": "Update"
},
{
"name": "auto_update",
"type": TYPE_BOOL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "mode",
"type": TYPE_INT,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "Numeric:1,Alphanumeric:2,Byte:4,Kanji:8"
},
{
"name": "error_correction",
"type": TYPE_INT,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "Low:1,Medium:0,Quartile:3,High:2"
},
{
"name": "use_eci",
"type": TYPE_BOOL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "eci_value",
"type": TYPE_INT,
"usage": (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE) if self.use_eci else (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY),
"hint": PROPERTY_HINT_ENUM,
"hint_string": "Code Page 437:2,ISO 8859-1:3,ISO 8859-2:4,ISO 8859-3:5,ISO 8859-4:6,ISO 8859-5:7,ISO 8859-6:8,ISO 8859-7:9,ISO 8859-8:10,ISO 8859-9:11,ISO 8859-10:12,ISO 8859-11:13,ISO 8859-12:14,ISO 8859-13:15,ISO 8859-14:16,ISO 8859-15:17,ISO 8859-16:18,Shift JIS:20,Windows 1250:21,Windows 1251:22,Windows 1252:23,Windows 1256:24,UTF-16:25,UTF-8:26,US ASCII:27,BIG 5:28,GB 18030:29,EUC KR:30"
},
data_prop,
{
"name": "auto_version",
"type": TYPE_BOOL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "version",
"type": TYPE_INT,
"usage": (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY) if self.auto_version else (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE),
"hint": PROPERTY_HINT_RANGE,
"hint_string": "1,40"
},
{
"name": "auto_mask_pattern",
"type": TYPE_BOOL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "mask_pattern",
"type": TYPE_INT,
"usage": (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY) if self.auto_mask_pattern else (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE),
"hint": PROPERTY_HINT_RANGE,
"hint_string": "0,7"
},
{
"name": "Appearance",
"type": TYPE_NIL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_GROUP,
},
{
"name": "light_module_color",
"type": TYPE_COLOR,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "dark_module_color",
"type": TYPE_COLOR,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "auto_module_size",
"type": TYPE_BOOL,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
},
{
"name": "module_size",
"type": TYPE_INT,
"usage": (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_READ_ONLY) if self.auto_module_size else (PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE),
"hint": PROPERTY_HINT_RANGE,
"hint_string": "1,1,or_greater"
},
{
"name": "quiet_zone_size",
"type": TYPE_INT,
"usage": PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE,
"hint_string": "0,1,or_greater",
},
]
func _validate_property(property: Dictionary) -> void:
if property.name == "texture":
property.usage &= ~(PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE)
func _property_can_revert(property: StringName) -> bool:
return property in ["eci_value", "auto_version", "auto_mask_pattern", "light_module_color", "dark_module_color", "auto_module_size", "quiet_zone_size"]
func _property_get_revert(property: StringName) -> Variant:
match property:
"eci_value":
return QRCode.ECI.ISO_8859_1
"auto_version":
return true
"auto_mask_pattern":
return true
"light_module_color":
return Color.WHITE
"dark_module_color":
return Color.BLACK
"auto_module_size":
return true
"quiet_zone_size":
return 4
_:
return null
func _get_configuration_warnings() -> PackedStringArray:
if self.auto_module_size && self.expand_mode == EXPAND_KEEP_SIZE:
return ["Do not use auto module px size AND keep size expand mode."]
return []
func _notification(what: int) -> void:
match what:
NOTIFICATION_RESIZED:
if self.auto_module_size && self.auto_update:
self._update_texture()
elif self.auto_module_size:
self._update_module_size()
func _update_module_size() -> void:
self.module_size = mini(self.size.x, self.size.y) / (self._qr.get_dimension() + 2 * self.quiet_zone_size)
func _update_texture() -> void:
if self.auto_module_size:
self._update_module_size()
self.texture = ImageTexture.create_from_image(QRCode.generate_image(self._cached_data, self.module_size, self.light_module_color, self.dark_module_color, self.quiet_zone_size))
@@ -0,0 +1 @@
uid://dynulhnyq5hpq
+76
View File
@@ -0,0 +1,76 @@
# log -> exponent/antilog
static var _anti_log_table: PackedByteArray = []
# exponent/antilog -> log
static var _log_table: PackedByteArray = []
static func _static_init() -> void:
_create_log_anti_log_tables()
static func _anti_log(degree: int) -> int:
var res: int = 1
var alpha: int = 2
while degree != 0:
if degree & 1 == 1:
res = mul(res, alpha)
degree = degree >> 1
alpha = mul(alpha, alpha)
return res
static func _create_log_anti_log_tables() -> void:
_anti_log_table.resize(256)
_anti_log_table.fill(0)
_log_table.resize(256)
_log_table.fill(0)
for degree: int in range(0, 256):
var value: int = _anti_log(degree)
_anti_log_table[degree] = value
_log_table[value] = degree % 255
# Russian Peasant Multiplication algorithm, adapted to reed solomon
static func mul(lhs: int, rhs: int) -> int:
var res: int = 0
while rhs > 0:
if rhs & 1:
res = res ^ lhs
lhs = lhs << 1 # lhs * 2
rhs = rhs >> 1 # rhs / 2
if lhs & 256:
lhs = lhs ^ 0x11D
return res
static func generator_polynom(size: int) -> PackedByteArray:
var res: PackedByteArray = []
res.resize(size + 1)
res.fill(0)
res[0] = 1
var a_j: int = 1
for exp: int in range(0, size):
var cur_val: int = a_j
for cur_exp: int in range(1, exp + 1):
var old_res: int = res[cur_exp]
res[cur_exp] = cur_val ^ old_res
cur_val = mul(old_res, a_j)
res[exp + 1] = cur_val
a_j = mul(a_j, 0x02)
return res
static func encode(data: PackedByteArray, code_words: int) -> PackedByteArray:
assert(len(data) + code_words <= 255, "message to encode is to long")
var gen_poly: PackedByteArray = generator_polynom(code_words)
var enc_msg: PackedByteArray = []
enc_msg.resize(len(data) + len(gen_poly) - 1)
enc_msg.fill(0)
for idx: int in range(len(data)):
enc_msg[idx] = data[idx]
for idx: int in range(len(data)):
var coef: int = enc_msg[idx]
for p_idx: int in range(1, len(gen_poly)):
enc_msg[idx+p_idx] ^= mul(gen_poly[p_idx], coef)
return enc_msg.slice(len(data))
@@ -0,0 +1 @@
uid://g8jskaqqsmlg
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
uid://8yd22fd2gbxt
+46
View File
@@ -0,0 +1,46 @@
class_name Character
extends Control
@onready
var panel: Panel = $Panel
@onready
var character_image: TextureRect = %CharacterTextureRect
@onready
var character_name_label: Label = %CharacterName
signal new_character_selected(img_texture: ImageTexture)
func set_character_name(character_name: String) -> void:
panel.size = Vector2(240, 145)
#margin.size = Vector2(240, 145)
#margin set margin 15, 10, 15, 0
character_name_label.text = character_name.split(".")[0]
character_name_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
var image_fetched: Callable = func image_fetched(image: PackedByteArray) -> void:
var img: Image = Image.new()
var err: Error = img.load_png_from_buffer(image)
if err != OK:
print(err)
var err2: Error = img.load_jpg_from_buffer(image)
if err2 != OK:
print(err2)
var new_image: ImageTexture = ImageTexture.new()
new_image.set_image(img)
character_image.custom_minimum_size = Vector2(200, 100)
character_image.size = Vector2(200, 100)
character_image.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
character_image.size_flags_vertical = Control.SIZE_SHRINK_CENTER
character_image.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
character_image.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
character_image.texture = new_image
Settings.make_request2("/character?name=" + character_name.uri_encode(), image_fetched, true)
func _input(event: InputEvent) -> void:
if self.visible == true && Settings.character_select_open == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if Rect2(Vector2(0, 0), panel.size).has_point(evLocal.position):
print(character_name_label.text)
new_character_selected.emit(character_image.texture)
+1
View File
@@ -0,0 +1 @@
uid://i35b3scbpwpu
+45
View File
@@ -0,0 +1,45 @@
[gd_scene load_steps=4 format=3 uid="uid://c7ecjj2af6usf"]
[ext_resource type="Script" uid="uid://i35b3scbpwpu" path="res://character.gd" id="1_pjt0s"]
[ext_resource type="Texture2D" uid="uid://cv3hdd6bsruau" path="res://icon.svg" id="2_pjt0s"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pjt0s"]
bg_color = Color(0.302, 0.302, 0.302, 1)
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_pjt0s")
[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 240.0
offset_bottom = 145.0
theme_override_styles/panel = SubResource("StyleBoxFlat_pjt0s")
[node name="MarginContainer" type="MarginContainer" parent="Panel"]
layout_mode = 0
offset_right = 240.0
offset_bottom = 145.0
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 15
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer"]
layout_mode = 2
[node name="CharacterTextureRect" type="TextureRect" parent="Panel/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 100)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_pjt0s")
expand_mode = 3
stretch_mode = 5
[node name="CharacterName" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Aloy"
horizontal_alignment = 1
+6
View File
@@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://8bllart6xn1f"]
[ext_resource type="StyleBox" uid="uid://bsv6yb0yir04l" path="res://style_box_flat.tres" id="1_uierc"]
[resource]
PanelContainer/styles/panel = ExtResource("1_uierc")
+257 -78
View File
@@ -3,39 +3,37 @@
name="Windows Desktop" name="Windows Desktop"
platform="Windows Desktop" platform="Windows Desktop"
runnable=true runnable=true
advanced_options=false
dedicated_server=false dedicated_server=false
custom_features="" custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="" export_path="../../MusicPlayer_1.5.1.exe"
patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
seed=0
encrypt_pck=false encrypt_pck=false
encrypt_directory=false encrypt_directory=false
script_encryption_key="" script_export_mode=2
[preset.0.options] [preset.0.options]
custom_template/debug="" custom_template/debug=""
custom_template/release="" custom_template/release=""
debug/export_console_script=1 debug/export_console_wrapper=0
binary_format/embed_pck=false binary_format/embed_pck=true
texture_format/bptc=true texture_format/s3tc_bptc=true
texture_format/s3tc=true texture_format/etc2_astc=false
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64" binary_format/architecture="x86_64"
codesign/enable=false codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true codesign/timestamp=true
codesign/timestamp_server_url="" codesign/timestamp_server_url=""
codesign/digest_algorithm=1 codesign/digest_algorithm=1
codesign/description="" codesign/description=""
codesign/custom_options=PackedStringArray() codesign/custom_options=PackedStringArray()
application/modify_resources=true application/modify_resources=false
application/icon="" application/icon=""
application/console_wrapper_icon="" application/console_wrapper_icon=""
application/icon_interpolation=4 application/icon_interpolation=4
@@ -46,6 +44,9 @@ application/product_name=""
application/file_description="" application/file_description=""
application/copyright="" application/copyright=""
application/trademarks="" application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22" ssh_remote_deploy/port="22"
@@ -63,44 +64,66 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'" Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
debug/export_console_script=1
[preset.1] [preset.1]
name="macOS" name="macOS"
platform="macOS" platform="macOS"
runnable=true runnable=true
advanced_options=false
dedicated_server=false dedicated_server=false
custom_features="" custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="" export_path="./MusicPlayer_0.9_Beta.dmg"
patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
seed=0
encrypt_pck=false encrypt_pck=false
encrypt_directory=false encrypt_directory=false
script_encryption_key="" script_export_mode=2
[preset.1.options] [preset.1.options]
export/distribution_type=1
binary_format/architecture="universal" binary_format/architecture="universal"
custom_template/debug="" custom_template/debug=""
custom_template/release="" custom_template/release=""
debug/export_console_script=1 debug/export_console_wrapper=1
application/icon="" application/icon=""
application/icon_interpolation=4 application/icon_interpolation=4
application/bundle_identifier="" application/bundle_identifier="tech.sanplex.musicplayer"
application/signature="" application/signature=""
application/app_category="Games" application/app_category="Music-games"
application/short_version="1.0" application/short_version=""
application/version="1.0" application/version=""
application/copyright="" application/copyright=""
application/copyright_localized={} application/copyright_localized={}
application/min_macos_version_x86_64="10.12"
application/min_macos_version_arm64="11.00"
application/export_angle=0
display/high_res=true display/high_res=true
codesign/codesign=3 application/additional_plist_content=""
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
xcode/sdk_build="22C55"
xcode/sdk_name="macosx13.1"
xcode/xcode_version="1420"
xcode/xcode_build="14C18"
codesign/codesign=1
codesign/installer_identity=""
codesign/apple_team_id=""
codesign/identity="" codesign/identity=""
codesign/certificate_file=""
codesign/certificate_password=""
codesign/entitlements/custom_file="" codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false codesign/entitlements/allow_unsigned_executable_memory=false
@@ -123,15 +146,11 @@ codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0 codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0 codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0 codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/files_user_selected=0
codesign/entitlements/app_sandbox/helper_executables=[] codesign/entitlements/app_sandbox/helper_executables=[]
codesign/entitlements/additional=""
codesign/custom_options=PackedStringArray() codesign/custom_options=PackedStringArray()
notarization/notarization=0 notarization/notarization=0
notarization/apple_id_name=""
notarization/apple_id_password=""
notarization/apple_team_id=""
notarization/api_uuid=""
notarization/api_key=""
notarization/api_key_id=""
privacy/microphone_usage_description="" privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={} privacy/microphone_usage_description_localized={}
privacy/camera_usage_description="" privacy/camera_usage_description=""
@@ -154,6 +173,148 @@ privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={} privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description="" privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={} privacy/removable_volumes_usage_description_localized={}
privacy/tracking_enabled=false
privacy/tracking_domains=PackedStringArray()
privacy/collected_data/name/collected=false
privacy/collected_data/name/linked_to_user=false
privacy/collected_data/name/used_for_tracking=false
privacy/collected_data/name/collection_purposes=0
privacy/collected_data/email_address/collected=false
privacy/collected_data/email_address/linked_to_user=false
privacy/collected_data/email_address/used_for_tracking=false
privacy/collected_data/email_address/collection_purposes=0
privacy/collected_data/phone_number/collected=false
privacy/collected_data/phone_number/linked_to_user=false
privacy/collected_data/phone_number/used_for_tracking=false
privacy/collected_data/phone_number/collection_purposes=0
privacy/collected_data/physical_address/collected=false
privacy/collected_data/physical_address/linked_to_user=false
privacy/collected_data/physical_address/used_for_tracking=false
privacy/collected_data/physical_address/collection_purposes=0
privacy/collected_data/other_contact_info/collected=false
privacy/collected_data/other_contact_info/linked_to_user=false
privacy/collected_data/other_contact_info/used_for_tracking=false
privacy/collected_data/other_contact_info/collection_purposes=0
privacy/collected_data/health/collected=false
privacy/collected_data/health/linked_to_user=false
privacy/collected_data/health/used_for_tracking=false
privacy/collected_data/health/collection_purposes=0
privacy/collected_data/fitness/collected=false
privacy/collected_data/fitness/linked_to_user=false
privacy/collected_data/fitness/used_for_tracking=false
privacy/collected_data/fitness/collection_purposes=0
privacy/collected_data/payment_info/collected=false
privacy/collected_data/payment_info/linked_to_user=false
privacy/collected_data/payment_info/used_for_tracking=false
privacy/collected_data/payment_info/collection_purposes=0
privacy/collected_data/credit_info/collected=false
privacy/collected_data/credit_info/linked_to_user=false
privacy/collected_data/credit_info/used_for_tracking=false
privacy/collected_data/credit_info/collection_purposes=0
privacy/collected_data/other_financial_info/collected=false
privacy/collected_data/other_financial_info/linked_to_user=false
privacy/collected_data/other_financial_info/used_for_tracking=false
privacy/collected_data/other_financial_info/collection_purposes=0
privacy/collected_data/precise_location/collected=false
privacy/collected_data/precise_location/linked_to_user=false
privacy/collected_data/precise_location/used_for_tracking=false
privacy/collected_data/precise_location/collection_purposes=0
privacy/collected_data/coarse_location/collected=false
privacy/collected_data/coarse_location/linked_to_user=false
privacy/collected_data/coarse_location/used_for_tracking=false
privacy/collected_data/coarse_location/collection_purposes=0
privacy/collected_data/sensitive_info/collected=false
privacy/collected_data/sensitive_info/linked_to_user=false
privacy/collected_data/sensitive_info/used_for_tracking=false
privacy/collected_data/sensitive_info/collection_purposes=0
privacy/collected_data/contacts/collected=false
privacy/collected_data/contacts/linked_to_user=false
privacy/collected_data/contacts/used_for_tracking=false
privacy/collected_data/contacts/collection_purposes=0
privacy/collected_data/emails_or_text_messages/collected=false
privacy/collected_data/emails_or_text_messages/linked_to_user=false
privacy/collected_data/emails_or_text_messages/used_for_tracking=false
privacy/collected_data/emails_or_text_messages/collection_purposes=0
privacy/collected_data/photos_or_videos/collected=false
privacy/collected_data/photos_or_videos/linked_to_user=false
privacy/collected_data/photos_or_videos/used_for_tracking=false
privacy/collected_data/photos_or_videos/collection_purposes=0
privacy/collected_data/audio_data/collected=false
privacy/collected_data/audio_data/linked_to_user=false
privacy/collected_data/audio_data/used_for_tracking=false
privacy/collected_data/audio_data/collection_purposes=0
privacy/collected_data/gameplay_content/collected=false
privacy/collected_data/gameplay_content/linked_to_user=false
privacy/collected_data/gameplay_content/used_for_tracking=false
privacy/collected_data/gameplay_content/collection_purposes=0
privacy/collected_data/customer_support/collected=false
privacy/collected_data/customer_support/linked_to_user=false
privacy/collected_data/customer_support/used_for_tracking=false
privacy/collected_data/customer_support/collection_purposes=0
privacy/collected_data/other_user_content/collected=false
privacy/collected_data/other_user_content/linked_to_user=false
privacy/collected_data/other_user_content/used_for_tracking=false
privacy/collected_data/other_user_content/collection_purposes=0
privacy/collected_data/browsing_history/collected=false
privacy/collected_data/browsing_history/linked_to_user=false
privacy/collected_data/browsing_history/used_for_tracking=false
privacy/collected_data/browsing_history/collection_purposes=0
privacy/collected_data/search_hhistory/collected=false
privacy/collected_data/search_hhistory/linked_to_user=false
privacy/collected_data/search_hhistory/used_for_tracking=false
privacy/collected_data/search_hhistory/collection_purposes=0
privacy/collected_data/user_id/collected=false
privacy/collected_data/user_id/linked_to_user=false
privacy/collected_data/user_id/used_for_tracking=false
privacy/collected_data/user_id/collection_purposes=0
privacy/collected_data/device_id/collected=false
privacy/collected_data/device_id/linked_to_user=false
privacy/collected_data/device_id/used_for_tracking=false
privacy/collected_data/device_id/collection_purposes=0
privacy/collected_data/purchase_history/collected=false
privacy/collected_data/purchase_history/linked_to_user=false
privacy/collected_data/purchase_history/used_for_tracking=false
privacy/collected_data/purchase_history/collection_purposes=0
privacy/collected_data/product_interaction/collected=false
privacy/collected_data/product_interaction/linked_to_user=false
privacy/collected_data/product_interaction/used_for_tracking=false
privacy/collected_data/product_interaction/collection_purposes=0
privacy/collected_data/advertising_data/collected=false
privacy/collected_data/advertising_data/linked_to_user=false
privacy/collected_data/advertising_data/used_for_tracking=false
privacy/collected_data/advertising_data/collection_purposes=0
privacy/collected_data/other_usage_data/collected=false
privacy/collected_data/other_usage_data/linked_to_user=false
privacy/collected_data/other_usage_data/used_for_tracking=false
privacy/collected_data/other_usage_data/collection_purposes=0
privacy/collected_data/crash_data/collected=false
privacy/collected_data/crash_data/linked_to_user=false
privacy/collected_data/crash_data/used_for_tracking=false
privacy/collected_data/crash_data/collection_purposes=0
privacy/collected_data/performance_data/collected=false
privacy/collected_data/performance_data/linked_to_user=false
privacy/collected_data/performance_data/used_for_tracking=false
privacy/collected_data/performance_data/collection_purposes=0
privacy/collected_data/other_diagnostic_data/collected=false
privacy/collected_data/other_diagnostic_data/linked_to_user=false
privacy/collected_data/other_diagnostic_data/used_for_tracking=false
privacy/collected_data/other_diagnostic_data/collection_purposes=0
privacy/collected_data/environment_scanning/collected=false
privacy/collected_data/environment_scanning/linked_to_user=false
privacy/collected_data/environment_scanning/used_for_tracking=false
privacy/collected_data/environment_scanning/collection_purposes=0
privacy/collected_data/hands/collected=false
privacy/collected_data/hands/linked_to_user=false
privacy/collected_data/hands/used_for_tracking=false
privacy/collected_data/hands/collection_purposes=0
privacy/collected_data/head/collected=false
privacy/collected_data/head/linked_to_user=false
privacy/collected_data/head/used_for_tracking=false
privacy/collected_data/head/collection_purposes=0
privacy/collected_data/other_data_types/collected=false
privacy/collected_data/other_data_types/linked_to_user=false
privacy/collected_data/other_data_types/used_for_tracking=false
privacy/collected_data/other_data_types/collection_purposes=0
ssh_remote_deploy/enabled=false ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22" ssh_remote_deploy/port="22"
@@ -165,34 +326,88 @@ open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\"" rm -rf \"{temp_dir}\""
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
application/min_macos_version="10.12"
debug/export_console_script=1
notarization/apple_team_id=""
[preset.2] [preset.2]
name="Linux/X11" name="Web"
platform="Linux/X11" platform="Web"
runnable=true runnable=false
advanced_options=false
dedicated_server=false dedicated_server=false
custom_features="" custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="" export_path="web/index.html"
patches=PackedStringArray()
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
seed=0
encrypt_pck=false encrypt_pck=false
encrypt_directory=false encrypt_directory=false
script_encryption_key="" script_export_mode=2
[preset.2.options] [preset.2.options]
custom_template/debug="" custom_template/debug=""
custom_template/release="" custom_template/release=""
debug/export_console_script=1 variant/extensions_support=false
binary_format/embed_pck=false variant/thread_support=false
texture_format/bptc=true vram_texture_compression/for_desktop=true
texture_format/s3tc=true vram_texture_compression/for_mobile=false
texture_format/etc=false html/export_icon=true
texture_format/etc2=false html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/ensure_cross_origin_isolation_headers=true
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
[preset.3]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="./MusicPlayer_1.5.1.x86_64"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64" binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/host="user@host_ip"
@@ -206,42 +421,6 @@ unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\"" rm -rf \"{temp_dir}\""
dotnet/include_scripts_content=false
[preset.3] dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false
name="Web"
platform="Web"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_encryption_key=""
[preset.3.options]
custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color(0, 0, 0, 1)
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6 C218.6,448,224,442.6,224,435.8z"/><path d="M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1 C384,69.4,378.6,64,371.8,64z"/></g></svg>

After

Width:  |  Height:  |  Size: 664 B

@@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://t1tnj6nqpi4a" uid="uid://c7cg1h7rmiclx"
path="res://.godot/imported/person_remove-black-36dp.svg-60481722f4b86c76228674c37c2e8b80.ctex" path="res://.godot/imported/pause_icon_dark.svg-98d49724f33d33ed5239328ede02d5a2.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://person_remove-black-36dp.svg" source_file="res://icons/pause_icon_dark.svg"
dest_files=["res://.godot/imported/person_remove-black-36dp.svg-60481722f4b86c76228674c37c2e8b80.ctex"] dest_files=["res://.godot/imported/pause_icon_dark.svg-98d49724f33d33ed5239328ede02d5a2.ctex"]
[params] [params]
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bl2bxfgk316gl"
path="res://.godot/imported/pause_icon_light.png-314c2e88feb5eb30bccf80cbe51b0031.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/pause_icon_light.png"
dest_files=["res://.godot/imported/pause_icon_light.png-314c2e88feb5eb30bccf80cbe51b0031.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
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="512px"
id="Layer_1"
style="enable-background:new 0 0 512 512;"
version="1.1"
viewBox="0 0 512 512"
width="512px"
xml:space="preserve"
sodipodi:docname="pause_icon_light.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs2" /><sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="0.4609375"
inkscape:cx="254.91525"
inkscape:cy="256"
inkscape:window-width="1312"
inkscape:window-height="449"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g2"><path
d="M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6 C218.6,448,224,442.6,224,435.8z"
id="path1" /><path
d="M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1 C384,69.4,378.6,64,371.8,64z"
id="path2" /></g><path
style="fill:#f9f9f9;stroke-width:2.16949"
d="m 133.29601,443.8359 c -4.11162,-3.00648 -4.21126,-7.45101 -4.21126,-187.8359 0,-180.384884 0.0996,-184.829414 4.21126,-187.835903 3.27287,-2.393182 13.03484,-3.079351 43.80919,-3.079351 38.45999,0 39.69497,0.138561 42.97517,4.821708 2.99126,4.270626 3.37726,25.539631 3.37726,186.093546 0,160.55391 -0.386,181.82292 -3.37726,186.09354 -3.2802,4.68315 -4.51518,4.82171 -42.97517,4.82171 -30.77435,0 -40.53632,-0.68616 -43.80919,-3.07935 z"
id="path3" /><path
style="fill:#f9f9f9;stroke-width:2.16949"
d="M 291.91963,442.09354 C 288.92837,437.82292 288.54237,416.55391 288.54237,256 c 0,-160.553915 0.386,-181.82292 3.37726,-186.093546 3.2802,-4.683147 4.51518,-4.821708 42.97517,-4.821708 30.77435,0 40.53632,0.686169 43.80919,3.079351 4.11162,3.006489 4.21126,7.451019 4.21126,187.835903 0,180.38489 -0.0996,184.82942 -4.21126,187.8359 -3.27287,2.39319 -13.03484,3.07935 -43.80919,3.07935 -38.45999,0 -39.69497,-0.13856 -42.97517,-4.82171 z"
id="path4" /></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -2,16 +2,16 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://o5go6smk7hm1" uid="uid://dmgng6l3ghnhu"
path="res://.godot/imported/person_add_alt_1-black-36dp.svg-bf42e8ddf13a4f7adae8637f26a86e94.ctex" path="res://.godot/imported/pause_icon_light.svg-7be43594fcd7796d212e42302c91652b.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://person_add_alt_1-black-36dp.svg" source_file="res://icons/pause_icon_light.svg"
dest_files=["res://.godot/imported/person_add_alt_1-black-36dp.svg-bf42e8ddf13a4f7adae8637f26a86e94.ctex"] dest_files=["res://.godot/imported/pause_icon_light.svg-7be43594fcd7796d212e42302c91652b.ctex"]
[params] [params]

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvwx7761s3vsl"
path="res://.godot/imported/person_add_dark.svg-fa5958cbd492c9763746d15a4bd2b4b7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/person_add_dark.svg"
dest_files=["res://.godot/imported/person_add_dark.svg-fa5958cbd492c9763746d15a4bd2b4b7.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
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 24 24"
viewBox="0 0 24 24"
fill="black"
width="36px"
height="36px"
version="1.1"
id="svg2"
sodipodi:docname="person_add_light.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="6.5555556"
inkscape:cx="17.923729"
inkscape:cy="17.923729"
inkscape:window-width="1496"
inkscape:window-height="798"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="g1">
<rect
fill="none"
height="24"
width="24"
id="rect1" />
</g>
<g
id="g2">
<path
d="M13,8c0-2.21-1.79-4-4-4S5,5.79,5,8s1.79,4,4,4S13,10.21,13,8z M15,10v2h3v3h2v-3h3v-2h-3V7h-2v3H15z M1,18v2h16v-2 c0-2.66-5.33-4-8-4S1,15.34,1,18z"
id="path1" />
</g>
<path
style="fill:#f9f9f9;stroke-width:0.152542"
d="M 12.050847,17.723968 C 10.298612,17.216539 8.9330121,16.08432 8.152112,14.491525 7.7421124,13.655253 7.7033898,13.438053 7.7033898,11.974576 c 0,-1.517001 0.026741,-1.65292 0.5057127,-2.5704452 2.3002035,-4.4063041 8.2815915,-4.4063041 10.5817945,0 0.478972,0.9175252 0.505713,1.0534442 0.505713,2.5704452 0,1.440008 -0.04251,1.688254 -0.421094,2.459158 -0.998487,2.033192 -2.846502,3.29706 -5.004979,3.422933 -0.679614,0.03963 -1.408028,-0.01349 -1.81969,-0.132699 z"
id="path2"
transform="scale(0.66666667)" />
<path
style="fill:#f9f9f9;stroke-width:0.152542"
d="m 1.5478738,28.105932 c 0.049291,-1.711363 0.089039,-1.928552 0.4722376,-2.580413 0.5805182,-0.987521 1.4827698,-1.716649 3.0900581,-2.497136 5.1516355,-2.501598 11.6280255,-2.501598 16.7796615,0 1.607288,0.780487 2.50954,1.509615 3.090058,2.497136 0.383199,0.651861 0.422947,0.86905 0.472238,2.580413 l 0.05382,1.868644 H 13.5 1.4940527 Z"
id="path3"
transform="scale(0.66666667)" />
<path
style="fill:#f9f9f9;stroke-width:0.152542"
d="M 27,20.211864 V 17.923729 H 24.788136 22.576271 V 16.474576 15.025424 H 24.788136 27 v -2.211865 -2.211864 h 1.449153 1.449152 v 2.211864 2.211865 h 2.288136 2.288135 v 1.449152 1.449153 H 32.186441 29.898305 V 20.211864 22.5 H 28.449153 27 Z"
id="path4"
transform="scale(0.66666667)" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bcfmpd7h512ef"
path="res://.godot/imported/person_add_light.svg-7c9cac9c92cc3eda248789ddbb71074d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/person_add_light.svg"
dest_files=["res://.godot/imported/person_add_light.svg-7c9cac9c92cc3eda248789ddbb71074d.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

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c0j74osuavbl4"
path="res://.godot/imported/person_remove_dark.svg-c3cfe8468e6bd12731ae808bc4683774.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/person_remove_dark.svg"
dest_files=["res://.godot/imported/person_remove_dark.svg-c3cfe8468e6bd12731ae808bc4683774.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
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 24 24"
viewBox="0 0 24 24"
fill="black"
width="36px"
height="36px"
version="1.1"
id="svg2"
sodipodi:docname="person_remove_light.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="9.3898034"
inkscape:cx="3.5676998"
inkscape:cy="8.3068832"
inkscape:window-width="1312"
inkscape:window-height="449"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="g1">
<rect
fill="none"
height="24"
width="24"
id="rect1" />
</g>
<g
id="g2">
<path
d="M14,8c0-2.21-1.79-4-4-4S6,5.79,6,8s1.79,4,4,4S14,10.21,14,8z M17,10v2h6v-2H17z M2,18v2h16v-2c0-2.66-5.33-4-8-4 S2,15.34,2,18z"
id="path1" />
</g>
<path
style="fill:#f9f9f9;stroke-width:0.152542"
d="m 14.114229,17.814704 c -1.200856,-0.154629 -2.308546,-0.714127 -3.251543,-1.642366 -2.8909108,-2.845671 -2.0621039,-7.6847196 1.6271,-9.4999394 0.933562,-0.4593458 1.113311,-0.494096 2.532966,-0.4896906 1.370162,0.00425 1.62269,0.050581 2.44335,0.4482567 1.168116,0.5660468 2.336886,1.7348175 2.902933,2.9029336 0.397514,0.8203247 0.444007,1.0734697 0.448257,2.4406777 0.0042,1.341552 -0.04454,1.630563 -0.40408,2.397671 -1.138382,2.428809 -3.623523,3.786963 -6.298983,3.442457 z"
id="path2"
transform="scale(0.66666667)" />
<path
style="fill:#f9f9f9;stroke-width:0.152542"
d="m 3.078365,28.029661 c 0.067442,-2.14007 0.1979722,-2.496714 1.3003824,-3.553009 1.2793101,-1.225795 3.8504194,-2.330448 6.9697866,-2.994503 2.149115,-0.457507 5.209569,-0.456418 7.366647,0.0026 3.008244,0.640173 5.419211,1.669766 6.784527,2.897302 1.156675,1.03995 1.38038,1.607426 1.467982,3.723859 l 0.07419,1.792373 H 15.030677 3.0194764 Z"
id="path3"
transform="scale(0.66666667)" />
<path
style="fill:#f9f9f9;stroke-width:0.06381"
d="m 25.524016,16.5268 v -1.467631 h 4.466703 4.466703 v 1.467631 1.467631 h -4.466703 -4.466703 z"
id="path14"
transform="scale(0.66666667)" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b2kj6m8qpsgb1"
path="res://.godot/imported/person_remove_light.svg-f66f76b2044247abe95f91e24fc2af1f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/person_remove_light.svg"
dest_files=["res://.godot/imported/person_remove_light.svg-f66f76b2044247abe95f91e24fc2af1f.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
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg>

After

Width:  |  Height:  |  Size: 566 B

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bhxuxyoa3dtod"
path="res://.godot/imported/play_icon_dark.svg-419dcda1c79f76564a2bc3d6d462ea65.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/play_icon_dark.svg"
dest_files=["res://.godot/imported/play_icon_dark.svg-419dcda1c79f76564a2bc3d6d462ea65.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
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6ha11jjqeor7"
path="res://.godot/imported/play_icon_light.png-142b6e450780d542143c90ca20fe2ec3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/play_icon_light.png"
dest_files=["res://.godot/imported/play_icon_light.png-142b6e450780d542143c90ca20fe2ec3.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
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="512px"
id="Layer_1"
style="enable-background:new 0 0 512 512;"
version="1.1"
viewBox="0 0 512 512"
width="512px"
xml:space="preserve"
sodipodi:docname="play_icon_light.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
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="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="0.4609375"
inkscape:cx="254.91525"
inkscape:cy="256"
inkscape:window-width="1312"
inkscape:window-height="449"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"
id="path1" /><path
style="fill:#f9f9f9;stroke-width:2.16949"
d="m 104.30205,441.29868 -6.674931,-5.6166 V 256 76.317911 l 6.674931,-5.616583 c 3.67121,-3.08912 8.87924,-5.616582 11.57341,-5.616582 2.69417,0 68.76164,37.954254 146.8166,84.342784 151.06623,89.77956 151.68082,90.21139 151.68082,106.57247 0,16.36108 -0.61459,16.79291 -151.68082,106.57247 -78.05496,46.38853 -144.12243,84.34278 -146.8166,84.34278 -2.69417,0 -7.9022,-2.52745 -11.57341,-5.61657 z"
id="path2" /></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://comxqfiykp54f"
path="res://.godot/imported/play_icon_light.svg-33163dc2761ca6834802d172d7abe6de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/play_icon_light.svg"
dest_files=["res://.godot/imported/play_icon_light.svg-33163dc2761ca6834802d172d7abe6de.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
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M28,16c-1.219,0-1.797,0.859-2,1.766C25.269,21.03,22.167,26,16,26c-5.523,0-10-4.478-10-10S10.477,6,16,6 c2.24,0,4.295,0.753,5.96,2H20c-1.104,0-2,0.896-2,2s0.896,2,2,2h6c1.104,0,2-0.896,2-2V4c0-1.104-0.896-2-2-2s-2,0.896-2,2v0.518 C21.733,2.932,18.977,2,16,2C8.268,2,2,8.268,2,16s6.268,14,14,14c9.979,0,14-9.5,14-11.875C30,16.672,28.938,16,28,16z"/></svg>

After

Width:  |  Height:  |  Size: 705 B

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cugsedyfrbhxe"
path="res://.godot/imported/reload_dark_icon.svg-cd02ac8e0fd4f1af4baad0f567299606.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/reload_dark_icon.svg"
dest_files=["res://.godot/imported/reload_dark_icon.svg-cd02ac8e0fd4f1af4baad0f567299606.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
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfsr0wowt7pnt"
path="res://.godot/imported/reload_light_icon.png-4c6c6146370d9a98f9730b35cf32a7af.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/reload_light_icon.png"
dest_files=["res://.godot/imported/reload_light_icon.png-4c6c6146370d9a98f9730b35cf32a7af.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
+37
View File
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="28"
id="Layer_1"
version="1.1"
viewBox="0 0 28 28"
width="28"
xml:space="preserve"
sodipodi:docname="reload_light_icon.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
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="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="7.375"
inkscape:cx="13.966102"
inkscape:cy="13.966102"
inkscape:window-width="1416"
inkscape:window-height="785"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="m 26,14 c -1.219,0 -1.797,0.859 -2,1.766 C 23.269,19.03 20.167,24 14,24 8.477,24 4,19.522 4,14 4,8.478 8.477,4 14,4 c 2.24,0 4.295,0.753 5.96,2 H 18 c -1.104,0 -2,0.896 -2,2 0,1.104 0.896,2 2,2 h 6 c 1.104,0 2,-0.896 2,-2 V 2 C 26,0.896 25.104,0 24,0 22.896,0 22,0.896 22,2 V 2.518 C 19.733,0.932 16.977,0 14,0 6.268,0 0,6.268 0,14 0,21.732 6.268,28 14,28 23.979,28 28,18.5 28,16.125 28,14.672 26.938,14 26,14 Z"
id="path1" /><path
style="fill:#f9f9f9;stroke-width:0.135593"
d="M 12.273759,27.821814 C 8.301606,27.305128 4.6414458,25.025364 2.4172439,21.682595 -0.6740156,17.036719 -0.6987372,11.050866 2.3541959,6.4167276 6.4831292,0.1492961 14.7875,-1.7884148 21.095349,2.0437368 l 0.883303,0.5366251 0.09577,-0.6963111 c 0.07593,-0.5520493 0.198918,-0.7994615 0.593645,-1.1941885 0.682393,-0.6823936 1.29683,-0.7876518 2.135162,-0.3657721 1.11162,0.5594083 1.142977,0.6968977 1.099029,4.8188242 C 25.866598,8.48735 25.848168,8.714727 25.583585,9.075118 24.993194,9.879284 24.711316,9.931761 20.980939,9.931993 17.03905,9.932238 16.871859,9.891713 16.324094,8.803226 15.94065,8.041272 16.00249,7.4396205 16.528498,6.8144942 17.041282,6.2050862 17.302265,6.1106614 18.732442,6.0170974 l 1.29765,-0.084894 -0.711421,-0.4557502 C 16.407302,3.611373 12.42501,3.4754273 9.250891,5.1327637 6.9185825,6.3505563 5.186242,8.47902 4.3514391,11.152542 c -0.4596099,1.471937 -0.4596099,4.222979 0,5.694916 1.0532717,3.373185 3.4279179,5.747831 6.8011029,6.801103 0.874696,0.273122 1.291973,0.316826 2.983051,0.31243 1.791555,-0.0047 2.062404,-0.03855 3.050848,-0.381822 2.095349,-0.727675 4.004905,-2.225187 5.276499,-4.137935 0.712133,-1.071201 1.028577,-1.77101 1.500599,-3.318525 0.234713,-0.769505 0.466198,-1.242244 0.733848,-1.49867 0.768275,-0.736054 1.953395,-0.694987 2.67526,0.0927 0.56162,0.612834 0.678351,1.318164 0.398766,2.409492 -0.7664,2.991551 -3.210883,6.444937 -5.916304,8.35812 -2.688606,1.901292 -6.251776,2.77056 -9.58135,2.337459 z"
id="path2" /></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ccb6rvbldlgdg"
path="res://.godot/imported/reload_light_icon.svg-34193f54dfd701d2b8b52323306521b5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/reload_light_icon.svg"
dest_files=["res://.godot/imported/reload_light_icon.svg-34193f54dfd701d2b8b52323306521b5.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
+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
height="32px"
id="Layer_1"
style="enable-background:new 0 0 32 32;"
version="1.1"
viewBox="0 0 32 32"
width="32px"
xml:space="preserve"
sodipodi:docname="reload_light_icon_bigger.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
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="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="7.375"
inkscape:cx="15.932203"
inkscape:cy="16"
inkscape:window-width="1360"
inkscape:window-height="789"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1"
showguides="false" /><path
d="m 37.839151,21.298001 c -1.680302,0 -2.477034,1.184071 -2.756862,2.434309 -1.007624,4.499191 -5.283516,11.349979 -13.784289,11.349979 -7.613057,0 -13.7842845,-6.172601 -13.7842845,-13.784288 0,-7.611687 6.1712275,-13.7842855 13.7842845,-13.7842855 3.087685,0 5.920358,1.0379566 8.21544,2.7568575 h -2.701723 c -1.521785,0 -2.756857,1.235071 -2.756857,2.756856 0,1.521788 1.235072,2.75686 2.756857,2.75686 h 8.270572 c 1.521791,0 2.756862,-1.235072 2.756862,-2.75686 V 4.7568578 C 37.839151,3.2350724 36.60408,2 35.082289,2 33.560511,2 32.325428,3.2350724 32.325428,4.7568578 V 5.4708841 C 29.200533,3.2846956 25.401585,2 21.298001,2 10.639993,2 2,10.639993 2,21.298001 c 0,10.658018 8.639993,19.298004 19.298001,19.298004 13.755345,0 19.298004,-13.095074 19.298004,-16.368845 0,-2.002853 -1.463887,-2.929159 -2.756854,-2.929159 z"
id="path1"
style="stroke-width:1.37848" /><path
style="fill:#f9f9f9;stroke-width:0.186902"
d="M 18.918506,40.350388 C 13.443182,39.63818 8.3979028,36.495687 5.3319986,31.88792 1.0709171,25.483906 1.036841,17.23283 5.2450917,10.845003 10.936533,2.2057942 22.383521,-0.46520252 31.078434,4.817146 l 1.217583,0.7396995 0.132018,-0.9598153 c 0.104664,-0.7609608 0.274196,-1.1020011 0.818306,-1.646104 0.940625,-0.9406314 1.787583,-1.085722 2.943158,-0.5041908 1.5323,0.7711043 1.575516,0.9606236 1.514939,6.6424063 -0.04917,4.6100643 -0.07453,4.9234883 -0.439271,5.4202633 -0.813812,1.108485 -1.202361,1.180823 -6.344419,1.181148 -5.433612,3.28e-4 -5.664073,-0.05555 -6.419132,-1.555934 -0.528546,-1.050299 -0.4433,-1.879632 0.281763,-2.741323 0.70683,-0.840023 1.066587,-0.970184 3.037975,-1.099153 L 29.610074,10.17712 28.62943,9.5489022 C 24.616298,6.9780209 19.127001,6.7906296 14.751696,9.0751499 11.536771,10.753789 9.1488656,13.687727 7.9981488,17.372983 c -0.6335394,2.028966 -0.6335394,5.821074 0,7.850036 1.4518599,4.649699 4.7251442,7.922984 9.3748342,9.374842 1.205708,0.376479 1.780892,0.43672 4.111928,0.430665 2.469531,-0.0047 2.842871,-0.05316 4.20538,-0.526323 2.888285,-1.003047 5.520471,-3.067255 7.27327,-5.703846 0.981629,-1.476575 1.417821,-2.44121 2.068479,-4.574347 0.323529,-1.060706 0.642616,-1.712347 1.011558,-2.065812 1.059007,-1.0146 2.692607,-0.957992 3.687649,0.127767 0.774153,0.844749 0.935056,1.817001 0.549667,3.321315 -1.056426,4.123646 -4.42597,8.883889 -8.155195,11.521071 -3.70606,2.6208 -8.617635,3.819021 -13.207213,3.222021 z"
id="path2" /></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

+37
View File
@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cubxh4fv4s6t0"
path="res://.godot/imported/reload_light_icon_bigger.svg-4075121715f2e748470d76df50055875.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icons/reload_light_icon_bigger.svg"
dest_files=["res://.godot/imported/reload_light_icon_bigger.svg-4075121715f2e748470d76df50055875.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
+29
View File
@@ -0,0 +1,29 @@
extends Control
@onready
var log_panel: Panel = %LogPanel
@onready
var log_box: VBoxContainer = %LogVBoxContainer
var log_rows: Array
func add_log_row(text: String) -> void:
var log_row: String = get_time() + text
log_rows.append(log_row)
update_log()
func update_log() -> void:
print("update_log")
Settings.delete_children(log_box)
for row: String in log_rows:
var log_label: Label = Label.new()
log_label.set_texture_filter(TextureFilter.TEXTURE_FILTER_NEAREST)
log_label.add_theme_font_size_override("font_size", 20)
log_label.text = row
log_label.autowrap_mode = TextServer.AUTOWRAP_WORD
log_box.add_child(log_label)
func get_time() -> String:
var dateTime: Dictionary = Time.get_datetime_dict_from_system()
return "" + str(dateTime.hour) + ":" + str(dateTime.minute) + ":" + str(dateTime.second) + " "
+1
View File
@@ -0,0 +1 @@
uid://cw41y87l64qo7
+85
View File
@@ -0,0 +1,85 @@
extends Control
@onready
var character_panel: Panel = %CharacterPanel
@onready
var title_label: Label = %TitleLabel
@onready
var character_grid: GridContainer = %CharacterGridContainer
@onready
var close_timer: Timer = %CloseTimer
signal character_selected(file_name: String)
signal new_new_character_selected(file_name: String)
var character: PackedScene = preload("res://character.tscn")
func _ready() -> void:
close_timer.timeout.connect(_on_close_timeout)
func select_character(file_name: String) -> void:
print("select_character")
character_selected.emit(file_name)
func _on_close_timeout() -> void:
print("_on_close_timeout!")
Settings.character_select_open = false
close_timer.stop()
func load_characters() -> void:
print("load_characters")
var fetch_character_list: Callable = func fetch_character_list(list) -> void:
print("fetch_character_list")
Settings.delete_children(character_grid)
if typeof(list) == TYPE_ARRAY:
for character_name: String in list:
print("character_name ", character_name)
var character_box: Character = character.instantiate()
character_grid.add_child(character_box)
character_box.custom_minimum_size = Vector2(235, 145)
character_box.size = Vector2(235, 145)
character_box.set_character_name(character_name)
character_box.connect("new_character_selected", _on_character_selected)
Settings.make_request2("/characters", fetch_character_list, true)
func show_grid(player_name: String) -> void:
print("show_grid")
title_label.text = "Select character for " + player_name
close_timer.stop()
self.visible = true
Settings.character_select_open = true
func _on_character_selected(texture: ImageTexture) -> void:
print("_on_character_selected")
self.visible = false
new_new_character_selected.emit(texture)
close_timer.start()
func _input(event: InputEvent) -> void:
if self.visible == true:
if event is InputEventMouseButton && event.is_pressed():
var evLocal: InputEvent = make_input_local(event)
if !Rect2(Vector2(0, 0), character_panel.size).has_point(evLocal.position):
self.visible = false
Settings.character_select_open = false
func load_characters_local() -> void:
var characters: DirAccess = DirAccess.open("res://characters/")
if characters:
characters.list_dir_begin()
var file_name: String = characters.get_next()
while file_name != "":
file_name = file_name.replace('.import', '') # <--- remove the .import
if file_name.ends_with(".png"):
var texture: Resource = load("res://characters/" + file_name)
var texture_btn: TextureButton = TextureButton.new()
character_grid.add_child(texture_btn)
texture_btn.custom_minimum_size = Vector2(80, 40)
texture_btn.ignore_texture_size = true
texture_btn.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT
texture_btn.texture_normal = texture
texture_btn.pressed.connect(select_character.bind(file_name))
file_name = characters.get_next()
+1
View File
@@ -0,0 +1 @@
uid://cvffg87wr6r3y
+56
View File
@@ -0,0 +1,56 @@
[gd_scene load_steps=3 format=3 uid="uid://cdy4kvemwaiom"]
[ext_resource type="Script" uid="uid://cvffg87wr6r3y" path="res://new_character_select.gd" id="1_h4tdp"]
[sub_resource type="LabelSettings" id="LabelSettings_p4iny"]
font_size = 25
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_h4tdp")
[node name="CharacterPanel" type="Panel" parent="."]
unique_name_in_owner = true
layout_mode = 0
offset_right = 1260.0
offset_bottom = 665.0
[node name="VBoxContainer" type="VBoxContainer" parent="CharacterPanel"]
layout_mode = 0
offset_right = 1263.0
offset_bottom = 659.0
size_flags_horizontal = 3
[node name="TitleLabel" type="Label" parent="CharacterPanel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "Character Select"
label_settings = SubResource("LabelSettings_p4iny")
horizontal_alignment = 1
[node name="MarginContainer" type="MarginContainer" parent="CharacterPanel/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_left = 20
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 10
[node name="ScrollContainer" type="ScrollContainer" parent="CharacterPanel/VBoxContainer/MarginContainer"]
custom_minimum_size = Vector2(0, 600)
layout_mode = 2
size_flags_vertical = 3
horizontal_scroll_mode = 0
[node name="CharacterGridContainer" type="GridContainer" parent="CharacterPanel/VBoxContainer/MarginContainer/ScrollContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(1150, 600)
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/h_separation = 10
theme_override_constants/v_separation = 10
columns = 5
[node name="CloseTimer" type="Timer" parent="CharacterPanel"]
unique_name_in_owner = true

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