Compare commits
24 Commits
5b6169ed6c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| b4ba96cf63 | |||
| 2a32cc34ef | |||
| bae5831a3e | |||
| c6ed3c8e53 | |||
| 166705f2ab | |||
| 734a463db9 | |||
| 4e6e37775d | |||
| 3e4d417b4f | |||
| f46e742cdc | |||
| f2b362067a | |||
| 6d008b7715 | |||
| 23f2ed11eb | |||
| c4a7d743d3 | |||
| e8171d81a9 | |||
| 1a7b371161 | |||
| 2f12c1e25c | |||
| f0b57981bc | |||
| d43a1c7df6 | |||
| 0d0b5280f8 | |||
| b36e2271a8 | |||
| c5e6366760 | |||
| 724455b232 | |||
| c9ea40215d | |||
| 050d19039c |
61
.gitea/workflows/gitea-build.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# .gitea/workflows/gitea-build.yaml
|
||||
#
|
||||
#
|
||||
|
||||
name: "Build"
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
|
||||
env:
|
||||
GODOT_VERSION: 4.5
|
||||
PROJECT_PATH: .
|
||||
#GAME_VERSION: 0.0.8
|
||||
#GAME_VERSION: ${{gitea.ref_name}}
|
||||
EXPORT_NAME: test-project
|
||||
|
||||
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
.gitea/workflows/gitea-release.yaml
Normal file
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# .gitea/workflows/gitea-release.yaml
|
||||
#
|
||||
#
|
||||
|
||||
name: "Publish"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*.*'
|
||||
|
||||
env:
|
||||
GODOT_VERSION: 4.5
|
||||
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.tech/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.tech/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.tech/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
.gitignore
vendored
@@ -1,2 +1,8 @@
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
/web/
|
||||
*.exe
|
||||
*.dmg
|
||||
.idea
|
||||
.vscode
|
||||
.DS_Store
|
||||
|
||||
@@ -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
|
||||
@@ -15,7 +15,8 @@ func _ready():
|
||||
characters.list_dir_begin()
|
||||
var file_name = characters.get_next()
|
||||
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)
|
||||
|
||||
@@ -36,9 +37,4 @@ func show_grid():
|
||||
|
||||
func select_character(file_name: String):
|
||||
print("select_character")
|
||||
#character_grid_container.visible = false
|
||||
character_selected.emit(file_name)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
1
CharacterSelect.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cmxl2w45vvmx6
|
||||
@@ -1,6 +1,6 @@
|
||||
[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"]
|
||||
layout_mode = 3
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
extends ScrollContainer
|
||||
|
||||
var SCROLL = 0
|
||||
var delay = 0.02 #seconds
|
||||
var wait = 0
|
||||
|
||||
var SPEED: int = 1
|
||||
var SCROLL: float = 0
|
||||
var delay: float = 0.02 #seconds
|
||||
var wait: float = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
func _ready() -> void:
|
||||
wait = delay
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
func _process(delta: float) -> void:
|
||||
wait -= delta
|
||||
if wait < 0:
|
||||
wait = delay
|
||||
#SCROLL DOWN
|
||||
if SCROLL == 1:
|
||||
if (scroll_vertical + get_v_scroll_bar().page) < get_v_scroll_bar().max_value:
|
||||
scroll_vertical += SPEED
|
||||
scroll_vertical += Settings.inspiration_list_speed
|
||||
else:
|
||||
scroll_back_up()
|
||||
#SCROLL UP
|
||||
elif SCROLL == -1:
|
||||
if scroll_vertical != 0:
|
||||
scroll_vertical -= SPEED
|
||||
scroll_vertical -= Settings.inspiration_list_speed
|
||||
else:
|
||||
scroll_to_bottom()
|
||||
|
||||
func scroll_back_up():
|
||||
func scroll_back_up() -> void:
|
||||
SCROLL = -1
|
||||
|
||||
func scroll_to_bottom():
|
||||
func scroll_to_bottom() -> void:
|
||||
scroll_vertical = 0 #Reset to top first.
|
||||
SCROLL = 1
|
||||
|
||||
1
InsperationScrollContainer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://elgn7gkxgagq
|
||||
33
Log.tscn
Normal 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
|
||||
767
MainWindow.gd
@@ -1,288 +1,527 @@
|
||||
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
|
||||
# 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
|
||||
# 16. Change all calls to make_request and function in function
|
||||
# 17. Change some buttons to icons
|
||||
|
||||
@onready
|
||||
var open_button := $Open
|
||||
var open_button: Button = $Open
|
||||
|
||||
@onready
|
||||
var fileDialog := $FileDialog
|
||||
var fileDialog: FileDialog = $FileDialog
|
||||
|
||||
@onready
|
||||
var insperation_scroll := $ScrollContainer
|
||||
var inspiration_scroll: ScrollContainer = $ScrollContainer
|
||||
|
||||
@onready
|
||||
var insperation_list := $ScrollContainer/VBoxContainer
|
||||
var inspiration_list: VBoxContainer = $ScrollContainer/VBoxContainer
|
||||
|
||||
@onready
|
||||
var game_label := $VBoxContainer/GameLabel
|
||||
var game_label: Label = $VBoxContainer/GameLabel
|
||||
|
||||
@onready
|
||||
var song_label := $VBoxContainer/SongLabel
|
||||
var song_label: Label = $VBoxContainer/SongLabel
|
||||
|
||||
@onready
|
||||
var play_button := $PanelContainer/HBoxContainer/PlayButton
|
||||
var add_player_container: HBoxContainer = $Players/VBoxContainer/AddPlayerContainer
|
||||
|
||||
@onready
|
||||
var stop_button := $PanelContainer/HBoxContainer/StopButton
|
||||
var add_players_button: TextureButton = $Players/VBoxContainer/HBoxContainer/AddPlayersButton
|
||||
|
||||
@onready
|
||||
var audio := $AudioStreamPlayer
|
||||
var add_player_button: Button = $Players/VBoxContainer/AddPlayerContainer/AddPlayerButton
|
||||
|
||||
@onready
|
||||
var progress := $PanelContainer/HBoxContainer/HSlider
|
||||
var new_player_name_field: TextEdit = $Players/VBoxContainer/AddPlayerContainer/PlayerNameField
|
||||
|
||||
@onready
|
||||
var label := $PanelContainer/HBoxContainer/Label
|
||||
var reset_playlist_button: Button = $ResetPlaylistButton
|
||||
|
||||
@onready
|
||||
var add_player := $Players/VBoxContainer/HBoxContainer/AddPlayer
|
||||
var reset_points_button: Button = $ResetPointsButton
|
||||
|
||||
@onready
|
||||
var sound_test_button := $SoundTestButton
|
||||
var sound_test_button: Button = $SoundTestButton
|
||||
|
||||
@onready
|
||||
var sync_button := $SyncButton
|
||||
var sync_button: Button = $SyncButton
|
||||
|
||||
@onready
|
||||
var sync_popup := $PopupPanel
|
||||
var sync_window: Control = %SyncWindow
|
||||
|
||||
@onready
|
||||
var show_answer_button := $ShowAnswerButton
|
||||
var settings_button: Button = $SettingsButton
|
||||
|
||||
@onready
|
||||
var next_button := $NextButton
|
||||
var settings_window: Control = $SettingsWindow
|
||||
|
||||
@onready
|
||||
var music_list_scroll := $MusicListPanel/ScrollContainer
|
||||
var statistics_button: Button = $StatisticsButton
|
||||
|
||||
@onready
|
||||
var music_list := $MusicListPanel/ScrollContainer/MusicList
|
||||
var statistic_popup: PopupPanel = $StatisticsPopupPanel
|
||||
|
||||
@onready
|
||||
var players := $Players/VBoxContainer
|
||||
var statistic_label: Label = $StatisticsPopupPanel/StatisticsLabel
|
||||
|
||||
@onready
|
||||
var character_select := $CharacterSelect
|
||||
var about_button: Button = $AboutButton
|
||||
|
||||
@onready
|
||||
var search_button := $SearchButton
|
||||
var about_popup: PopupPanel = $AboutPopupPanel
|
||||
|
||||
@onready
|
||||
var search_view := $Search
|
||||
|
||||
var Player := preload("res://Player.tscn")
|
||||
var show_answer_button: Button = $ShowAnswerButton
|
||||
|
||||
@onready
|
||||
var path = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
|
||||
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 version_label: Label = $AboutPopupPanel/VBoxContainer/VersionLabel
|
||||
|
||||
@onready
|
||||
var whats_new_label: Label = $AboutPopupPanel/VBoxContainer/HBoxContainer/NewLabel
|
||||
|
||||
@onready
|
||||
var shortcut_label: Label = $AboutPopupPanel/VBoxContainer/HBoxContainer/ShortcutsLabel
|
||||
|
||||
@onready
|
||||
var coming_label: Label = $AboutPopupPanel/VBoxContainer/HBoxContainer/CommingLabel
|
||||
|
||||
@onready
|
||||
var winner_popup: PopupPanel = $WinnerPopupPanel
|
||||
|
||||
@onready
|
||||
var winner_label: Label = %WinnerLabel
|
||||
|
||||
@onready
|
||||
var winner_picture: TextureRect = %WinnerPicture
|
||||
|
||||
@onready
|
||||
var auto_repeat_song_button: CheckButton = $RepeatSongCheckButton
|
||||
|
||||
@onready
|
||||
var music_player_container: PanelContainer = $MusicPlayer
|
||||
|
||||
@onready
|
||||
var log: 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.
|
||||
func _ready():
|
||||
next_button.pressed.connect(fetch_next_song)
|
||||
play_button.pressed.connect(play_or_pause)
|
||||
stop_button.pressed.connect(stop)
|
||||
show_answer_button.pressed.connect(show_answer)
|
||||
func _ready() -> void:
|
||||
var debug: bool = OS.has_feature("debug")
|
||||
var is_mac: bool = OS.has_feature("macos")
|
||||
if debug:
|
||||
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)
|
||||
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)
|
||||
about_button.pressed.connect(show_about)
|
||||
settings_button.pressed.connect(show_settings)
|
||||
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)
|
||||
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)
|
||||
auto_repeat_song_button.pressed.connect(repeat_song)
|
||||
|
||||
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():
|
||||
var play_sound_test_song = func(result, response_code, headers, body):
|
||||
if result != HTTPRequest.RESULT_SUCCESS:
|
||||
push_error("Song couldn't be downloaded. Try a different song.")
|
||||
var sound = AudioStreamMP3.new()
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventKey and event.pressed:
|
||||
if event.alt_pressed && event.keycode == KEY_UP:
|
||||
print("Alt + UP pressed")
|
||||
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_L:
|
||||
log.visible = !log.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
|
||||
audio.stream = sound
|
||||
audio.play()
|
||||
stream = audio.stream
|
||||
progress.max_value = round(stream.get_length())
|
||||
progress.tick_count = round(stream.get_length() / 60)
|
||||
new_song_object.song = sound
|
||||
|
||||
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():
|
||||
path = "res://01. Opening.mp3"
|
||||
audio.stream = load_mp3(path)
|
||||
audio.play()
|
||||
stream = audio.stream
|
||||
progress.max_value = round(stream.get_length())
|
||||
progress.tick_count = round(stream.get_length() / 60)
|
||||
print("new_song_object: ", new_song_object.to_string())
|
||||
Playlist.add_to_playlist(new_song_object)
|
||||
next_button.disabled = false
|
||||
if Playlist.should_preload_more_songs():
|
||||
fetch_song()
|
||||
else:
|
||||
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():
|
||||
var http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(games_synced)
|
||||
Settings.make_request2("/music/addQue", added_to_que_done, false)
|
||||
|
||||
# Perform a GET request. The URL below returns JSON as of writing.
|
||||
var error = http_request.request("https://music.sanplex.tech/sync")
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
Settings.make_request2(url, fetch_song_done, true)
|
||||
|
||||
func games_synced(result, response_code, headers, body):
|
||||
if response_code == 200:
|
||||
sync_popup.visible = true
|
||||
func update_song_list() -> void:
|
||||
print("update_song_list")
|
||||
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_popup.visible = true
|
||||
version_label.text = Settings.version
|
||||
whats_new_label.text = Settings.whats_new
|
||||
shortcut_label.text = Settings.shortcuts
|
||||
coming_label.text = Settings.whats_left
|
||||
|
||||
func show_settings() -> void:
|
||||
print("show_settings")
|
||||
settings_window.visible = true
|
||||
|
||||
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:
|
||||
var http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(_http_request_completed)
|
||||
print("get_suggestion_list")
|
||||
var populate_list: Callable = func populate_list(array) -> void:
|
||||
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.
|
||||
var error = http_request.request("https://music.sanplex.tech/music/all")
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
func add_players() -> void:
|
||||
print("add_players")
|
||||
Settings.edit_players = !Settings.edit_players
|
||||
add_player_container.visible = !add_player_container.visible
|
||||
new_player_name_field.grab_focus()
|
||||
|
||||
func add_players():
|
||||
var new_player := Player.instantiate()
|
||||
players.add_child(new_player)
|
||||
new_player.connect("change_character_clicked", _on_player_change_character_clicked.bind(new_player))
|
||||
func add_player() -> void:
|
||||
print("add_player")
|
||||
if new_player_name_field.text != "":
|
||||
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))
|
||||
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.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.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_popup.visible = true
|
||||
winner_label.text = Settings.player_array[winning_player_id].player_name + " won!!"
|
||||
winner_picture.custom_minimum_size = Vector2(692, 300)
|
||||
winner_picture.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
||||
winner_picture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
winner_picture.texture = Settings.player_array[winning_player_id].character
|
||||
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: Node) -> void:
|
||||
print("_on_player_change_character_clicked")
|
||||
current_player = new_player
|
||||
new_character_select.show_grid()
|
||||
|
||||
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:
|
||||
search_view.visible = true
|
||||
else:
|
||||
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.
|
||||
var error = http_request.request("https://music.sanplex.tech/music/info")
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
###Local
|
||||
|
||||
func fetched():
|
||||
var http_request2 = HTTPRequest.new()
|
||||
add_child(http_request2)
|
||||
http_request2.request_completed.connect(show_fetched_list)
|
||||
var local_path: String = '/Users/sebastian/ResilioSync/Sorterat_test/Metal Gear Solid 4 - Guns of the Patriots/2-16 Metal Gear Saga.mp3'
|
||||
|
||||
# Perform a GET request. The URL below returns JSON as of writing.
|
||||
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():
|
||||
func open() -> void:
|
||||
fileDialog.popup()
|
||||
|
||||
|
||||
|
||||
# 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):
|
||||
func _on_file_dialog_dir_selected(path: String) -> void:
|
||||
print(path)
|
||||
dir_contents(path)
|
||||
|
||||
var songs := []
|
||||
var games := []
|
||||
#var player = preload("res://Player.gd")
|
||||
|
||||
func dir_contents(path: String) -> void:
|
||||
var dir = DirAccess.open(path)
|
||||
var dir: DirAccess = DirAccess.open(path)
|
||||
if dir:
|
||||
dir.list_dir_begin()
|
||||
var file_name = dir.get_next()
|
||||
var file_name: String = dir.get_next()
|
||||
songs.clear()
|
||||
games = []
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
#print("Found directory: " + file_name)
|
||||
@@ -292,142 +531,10 @@ func dir_contents(path: String) -> void:
|
||||
if file_name.ends_with(".mp3"):
|
||||
songs.append(path + "/" + file_name)
|
||||
file_name = dir.get_next()
|
||||
|
||||
else:
|
||||
print("An error occurred when trying to access the path.")
|
||||
|
||||
for game in games:
|
||||
var label := Label.new()
|
||||
label.text = game
|
||||
insperation_list.add_child(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()
|
||||
for game: String in games:
|
||||
var local_inspiration_label: Label = Label.new()
|
||||
local_inspiration_label.text = game
|
||||
inspiration_list.add_child(local_inspiration_label)
|
||||
|
||||
1
MainWindow.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b8f4g15cas2j2
|
||||
663
MainWindow.tscn
@@ -1,14 +1,19 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://xwq863o6uvsu"]
|
||||
[gd_scene load_steps=29 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="Script" 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="AudioStream" uid="uid://n2g8jddr85h2" path="res://01. Opening.mp3" id="4_5kvsq"]
|
||||
[ext_resource type="Texture2D" uid="uid://o5go6smk7hm1" path="res://person_add_alt_1-black-36dp.svg" id="4_op458"]
|
||||
[ext_resource type="Script" path="res://MusicListScrollContainer.gd" id="7_dj026"]
|
||||
[ext_resource type="Script" uid="uid://elgn7gkxgagq" path="res://InsperationScrollContainer.gd" id="2_gxtxm"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcfmpd7h512ef" path="res://icons/person_add_light.svg" id="5_31tjv"]
|
||||
[ext_resource type="PackedScene" uid="uid://ds15cgsf8vpvc" path="res://MusicPlayer.tscn" id="5_emn36"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdy4kvemwaiom" path="res://new_character_select.tscn" id="6_dhrvg"]
|
||||
[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="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="Texture2D" uid="uid://r4as0nmtoa7p" path="res://noCharacter.png" id="11_1qef0"]
|
||||
[ext_resource type="PackedScene" uid="uid://dldpeo5y3l5hq" path="res://SettingsWindow.tscn" id="11_k62u5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bijh5h5yrivm3" path="res://Log.tscn" id="14_26rwn"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_ychxr"]
|
||||
font_size = 25
|
||||
@@ -19,14 +24,50 @@ font_size = 50
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_3m52w"]
|
||||
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"]
|
||||
device = -1
|
||||
command_or_control_autoremap = true
|
||||
alt_pressed = true
|
||||
keycode = 83
|
||||
|
||||
[sub_resource type="Shortcut" id="Shortcut_fbju4"]
|
||||
events = [SubResource("InputEventKey_ujjlu")]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_hr75l"]
|
||||
font_size = 35
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
@@ -38,21 +79,23 @@ offset_right = 1920.0
|
||||
offset_bottom = 56.0
|
||||
|
||||
[node name="Title" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 32.0
|
||||
offset_top = 8.0
|
||||
offset_right = 337.0
|
||||
offset_bottom = 46.0
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 12.0
|
||||
offset_right = 369.0
|
||||
offset_bottom = 50.0
|
||||
size_flags_horizontal = 0
|
||||
text = "Music Player Randomizer"
|
||||
label_settings = SubResource("LabelSettings_ychxr")
|
||||
|
||||
[node name="Open" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 65.0
|
||||
offset_top = 877.0
|
||||
offset_right = 115.0
|
||||
offset_bottom = 908.0
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 1296.0
|
||||
offset_top = 66.0
|
||||
offset_right = 1346.0
|
||||
offset_bottom = 97.0
|
||||
text = "Open"
|
||||
|
||||
[node name="FileDialog" type="FileDialog" parent="."]
|
||||
@@ -64,169 +107,12 @@ file_mode = 2
|
||||
access = 2
|
||||
show_hidden_files = true
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1204.0
|
||||
offset_top = 95.0
|
||||
offset_right = 1845.0
|
||||
offset_bottom = 465.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
|
||||
offset_left = 64.0
|
||||
offset_top = 384.0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 896.0
|
||||
theme = ExtResource("7_wxbv6")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="MusicListPanel"]
|
||||
@@ -235,60 +121,441 @@ follow_focus = true
|
||||
script = ExtResource("7_dj026")
|
||||
|
||||
[node name="MusicList" type="VBoxContainer" parent="MusicListPanel/ScrollContainer"]
|
||||
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="."]
|
||||
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"]
|
||||
texture_filter = 1
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
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"]
|
||||
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"]
|
||||
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="." 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="." 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="."]
|
||||
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"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SearchButton" type="Button" parent="."]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Players/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Players/VBoxContainer/HBoxContainer"]
|
||||
texture_filter = 1
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
text = "Players"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="AddPlayersButton" type="TextureButton" parent="Players/VBoxContainer/HBoxContainer"]
|
||||
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"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Panel" type="Panel" parent="Players/VBoxContainer/AddPlayerContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_qk7sj")
|
||||
|
||||
[node name="PlayerNameField" type="TextEdit" parent="Players/VBoxContainer/AddPlayerContainer"]
|
||||
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"]
|
||||
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"]
|
||||
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="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1528.0
|
||||
offset_top = 8.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="."]
|
||||
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="."]
|
||||
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="."]
|
||||
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="."]
|
||||
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="."]
|
||||
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="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1488.0
|
||||
offset_top = 8.0
|
||||
offset_right = 1558.0
|
||||
offset_bottom = 48.0
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
shortcut = SubResource("Shortcut_fbju4")
|
||||
text = "Search"
|
||||
|
||||
[node name="SettingsButton" type="Button" parent="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1624.0
|
||||
offset_left = 1584.0
|
||||
offset_top = 8.0
|
||||
offset_right = 1694.0
|
||||
offset_right = 1654.0
|
||||
offset_bottom = 48.0
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
text = "Settings"
|
||||
|
||||
[node name="StatisticsButton" type="Button" parent="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1720.0
|
||||
offset_left = 1680.0
|
||||
offset_top = 8.0
|
||||
offset_right = 1798.0
|
||||
offset_right = 1758.0
|
||||
offset_bottom = 48.0
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
text = "Statistics"
|
||||
|
||||
[node name="AboutButton" type="Button" parent="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1824.0
|
||||
offset_left = 1784.0
|
||||
offset_top = 8.0
|
||||
offset_right = 1894.0
|
||||
offset_right = 1854.0
|
||||
offset_bottom = 48.0
|
||||
focus_mode = 0
|
||||
action_mode = 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
|
||||
offset_left = 56.0
|
||||
offset_top = 96.0
|
||||
offset_right = 56.0
|
||||
offset_bottom = 96.0
|
||||
|
||||
[node name="PopupPanel" type="PopupPanel" parent="."]
|
||||
[node name="SyncWindow" parent="." 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="." 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="NewCharacterSelect" parent="." 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="StatisticsPopupPanel" type="PopupPanel" parent="."]
|
||||
oversampling_override = 1.0
|
||||
initial_position = 2
|
||||
size = Vector2i(140, 70)
|
||||
size = Vector2i(450, 100)
|
||||
|
||||
[node name="Label" type="Label" parent="PopupPanel"]
|
||||
[node name="Label" type="Label" parent="StatisticsPopupPanel"]
|
||||
texture_filter = 1
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 136.0
|
||||
offset_bottom = 66.0
|
||||
text = "Games synced!"
|
||||
offset_right = 446.0
|
||||
offset_bottom = 96.0
|
||||
text = "Statistics"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="StatisticsLabel" type="Label" parent="StatisticsPopupPanel"]
|
||||
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="AboutPopupPanel" type="PopupPanel" parent="."]
|
||||
oversampling_override = 1.0
|
||||
initial_position = 2
|
||||
size = Vector2i(848, 710)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="AboutPopupPanel"]
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 844.0
|
||||
offset_bottom = 706.0
|
||||
|
||||
[node name="Label" type="Label" parent="AboutPopupPanel/VBoxContainer"]
|
||||
texture_filter = 1
|
||||
layout_mode = 2
|
||||
text = "Music Player Randomizer"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="VersionLabel" type="Label" parent="AboutPopupPanel/VBoxContainer"]
|
||||
texture_filter = 1
|
||||
layout_mode = 2
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="AboutLabel" type="Label" parent="AboutPopupPanel/VBoxContainer"]
|
||||
texture_filter = 1
|
||||
layout_mode = 2
|
||||
text = "Try your video game music knowledge with this VGM randomizer, invite your friends and see who is the best."
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="AboutPopupPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="NewLabel" type="Label" parent="AboutPopupPanel/VBoxContainer/HBoxContainer"]
|
||||
texture_filter = 1
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "0.7-Beta: Can now hop between songs"
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="ShortcutsLabel" type="Label" parent="AboutPopupPanel/VBoxContainer/HBoxContainer"]
|
||||
texture_filter = 1
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CommingLabel" type="Label" parent="AboutPopupPanel/VBoxContainer/HBoxContainer"]
|
||||
texture_filter = 1
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "Fix reset buttons
|
||||
Fix settings
|
||||
Fix winner
|
||||
Fix graphics in lists
|
||||
Fix layout
|
||||
Fix for local play
|
||||
Change some buttons to icons
|
||||
Add shortcuts"
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="WinnerPopupPanel" type="PopupPanel" parent="."]
|
||||
oversampling_override = 1.0
|
||||
initial_position = 2
|
||||
size = Vector2i(700, 350)
|
||||
|
||||
[node name="Panel" type="Panel" parent="WinnerPopupPanel"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 4.0
|
||||
offset_top = 4.0
|
||||
offset_right = 696.0
|
||||
offset_bottom = 346.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="WinnerPopupPanel/Panel"]
|
||||
layout_mode = 0
|
||||
offset_right = 692.0
|
||||
offset_bottom = 342.0
|
||||
alignment = 1
|
||||
|
||||
[node name="WinnerPicture" type="TextureRect" parent="WinnerPopupPanel/Panel/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(692, 300)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("11_1qef0")
|
||||
expand_mode = 3
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="WinnerLabel" type="Label" parent="WinnerPopupPanel/Panel/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
texture_filter = 1
|
||||
layout_mode = 2
|
||||
text = "Sansan won!!"
|
||||
label_settings = SubResource("LabelSettings_hr75l")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="RepeatSongCheckButton" type="CheckButton" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 1032.0
|
||||
offset_right = 208.0
|
||||
offset_bottom = 1063.0
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
text = "Auto repeat"
|
||||
|
||||
[node name="DebugLabel" type="Label" parent="."]
|
||||
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="." 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"]
|
||||
|
||||
134
MediaPlayer.gd
@@ -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
|
||||
@@ -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"
|
||||
@@ -1,16 +1,8 @@
|
||||
extends ScrollContainer
|
||||
|
||||
var max = 0;
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
var max_value = 0;
|
||||
|
||||
func _draw():
|
||||
if max != self.get_v_scroll_bar().max_value:
|
||||
max = self.get_v_scroll_bar().max_value
|
||||
self.scroll_vertical = max
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
if max_value != self.get_v_scroll_bar().max_value:
|
||||
max_value = self.get_v_scroll_bar().max_value
|
||||
self.scroll_vertical = max_value
|
||||
|
||||
1
MusicListScrollContainer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://gf1bk6xbe3j
|
||||
210
MusicPlayer.gd
Normal file
@@ -0,0 +1,210 @@
|
||||
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:
|
||||
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:
|
||||
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())
|
||||
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.max_value = round(stream.get_length())
|
||||
progress_slider.tick_count = round(stream.get_length() / 60)
|
||||
|
||||
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.max_value = round(stream.get_length())
|
||||
progress_slider.tick_count = round(stream.get_length() / 60)
|
||||
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
MusicPlayer.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d1v0rquma6nt8
|
||||
94
MusicPlayer.tscn
Normal 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
MusicPlayer.zip
Normal file
4
MusicPlayer_1.5.1.sh
Executable 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
MusicPlayer_1.5.1.x86_64
Executable file
82
Player.gd
@@ -1,53 +1,79 @@
|
||||
class_name Player
|
||||
extends Control
|
||||
|
||||
@onready
|
||||
var player_name := $HBoxContainer/Name
|
||||
var player_name_field := $HBoxContainer/Name
|
||||
|
||||
@onready
|
||||
var points := $HBoxContainer/Points
|
||||
var add_button := $HBoxContainer/AddPoint
|
||||
|
||||
@onready
|
||||
var add := $HBoxContainer/AddPoint
|
||||
|
||||
@onready
|
||||
var minus := $HBoxContainer/RemovePoint
|
||||
var minus_button := $HBoxContainer/RemovePoint
|
||||
|
||||
@onready
|
||||
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.
|
||||
func _ready():
|
||||
print("_ready")
|
||||
add.pressed.connect(add_point)
|
||||
minus.pressed.connect(minus_point)
|
||||
func _ready() -> void:
|
||||
add_button.pressed.connect(add_point)
|
||||
add_button.set_shortcut(create_button_shortcut(id, false))
|
||||
minus_button.pressed.connect(minus_point)
|
||||
minus_button.set_shortcut(create_button_shortcut(id, true))
|
||||
character.pressed.connect(change_character)
|
||||
player_name.mouse_filter = Control.MOUSE_FILTER_PASS
|
||||
player_name.gui_input.connect(name_clicked)
|
||||
remove_player.pressed.connect(func() -> void: player_removed.emit())
|
||||
update_score()
|
||||
set_player_character()
|
||||
|
||||
func name_clicked(event):
|
||||
if (event is InputEventMouseButton && event.pressed && event.button_index == MOUSE_BUTTON_LEFT):
|
||||
print("Clicked: " + player_name.text)
|
||||
func _process(delta: float) -> void:
|
||||
remove_player.visible = Settings.edit_players
|
||||
|
||||
func add_point():
|
||||
var value := int(points.text)
|
||||
points.text = str(value + 1)
|
||||
func create_button_shortcut(scancode : int, ctrl_pressed: bool) -> Shortcut:
|
||||
var button_shortcut: Shortcut = Shortcut.new()
|
||||
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():
|
||||
var value := int(points.text)
|
||||
points.text = str(value - 1)
|
||||
func add_point() -> void:
|
||||
Settings.player_array[id].add_point()
|
||||
update_score()
|
||||
|
||||
func change_character():
|
||||
print("change_character")
|
||||
func minus_point() -> void:
|
||||
Settings.player_array[id].minus_point()
|
||||
update_score()
|
||||
|
||||
func change_character() -> void:
|
||||
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)
|
||||
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.ignore_texture_size = true
|
||||
character.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT
|
||||
character.texture_normal = texture
|
||||
character.stretch_mode = TextureButton.STRETCH_KEEP_ASPECT_CENTERED
|
||||
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
Player.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dl6no2wr2c86y
|
||||
87
Player.tscn
@@ -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="Texture2D" uid="uid://bah8j3gu07305" path="res://characters/Kiryu.png" id="1_y7dih"]
|
||||
[ext_resource type="Texture2D" uid="uid://t1tnj6nqpi4a" path="res://person_remove-black-36dp.svg" id="2_xw2ck"]
|
||||
[ext_resource type="Script" uid="uid://dl6no2wr2c86y" path="res://Player.gd" id="1_if4kc"]
|
||||
[ext_resource type="Texture2D" uid="uid://r4as0nmtoa7p" path="res://noCharacter.png" id="2_hpj3s"]
|
||||
[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"]
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
anchors_preset = 0
|
||||
offset_bottom = 40.0
|
||||
size_flags_horizontal = 3
|
||||
script = ExtResource("1_if4kc")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
custom_minimum_size = Vector2(2.08165e-12, 40)
|
||||
layout_mode = 0
|
||||
offset_right = 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
|
||||
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
|
||||
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"]
|
||||
custom_minimum_size = Vector2(80, 40)
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("1_y7dih")
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
texture_normal = ExtResource("2_hpj3s")
|
||||
ignore_texture_size = true
|
||||
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
|
||||
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"
|
||||
|
||||
[node name="RemovePoint" type="Button" parent="HBoxContainer"]
|
||||
[node name="Panel5" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(3, 40)
|
||||
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"
|
||||
|
||||
[node name="RemovePlayer" type="TextureButton" parent="HBoxContainer"]
|
||||
[node name="Panel" type="Panel" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(30, 40)
|
||||
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
PlayerNameField.gd
Normal 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
PlayerNameField.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cgakje8gb37tf
|
||||
52
PlayerObject.gd
Normal 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
|
||||
187
SearchWindow.gd
@@ -1,73 +1,178 @@
|
||||
extends Control
|
||||
|
||||
@onready
|
||||
var search_list := $ScrollContainer/VBoxContainer
|
||||
var search_list: VBoxContainer = $ScrollContainer/VBoxContainer
|
||||
|
||||
@onready
|
||||
var clear_button := $ClearButton
|
||||
var search_panel: Panel = %SearchPanel
|
||||
|
||||
@onready
|
||||
var close_button := $CloseButton
|
||||
var clear_button: Button = $ClearButton
|
||||
|
||||
@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.
|
||||
func _ready():
|
||||
get_list_of_games()
|
||||
func _ready() -> void:
|
||||
clear_button.pressed.connect(clear)
|
||||
close_button.pressed.connect(close)
|
||||
search_bar.grab_focus()
|
||||
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()
|
||||
self.visible = false
|
||||
|
||||
func search():
|
||||
func search() -> void:
|
||||
print(search_bar.text)
|
||||
delete_children(search_list)
|
||||
for game in games:
|
||||
if search_bar.text == "" || game.replace(" ", "").to_lower().contains(search_bar.text.replace(" ", "").to_lower()):
|
||||
var label := Label.new()
|
||||
label.text = game
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD
|
||||
search_list.add_child(label)
|
||||
Settings.delete_children(search_list)
|
||||
var search_text: String = search_bar.text.to_lower()
|
||||
for game: String in games:
|
||||
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)
|
||||
|
||||
static func delete_children(node):
|
||||
for n in node.get_children():
|
||||
node.remove_child(n)
|
||||
n.queue_free()
|
||||
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
|
||||
print("game: " + game)
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD
|
||||
if !check_if_game_exists(game):
|
||||
search_list.add_child(label)
|
||||
|
||||
func check_if_game_exists(game: String) -> bool:
|
||||
var game_exists: bool = false
|
||||
for child: Label in search_list.get_children():
|
||||
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:
|
||||
var http_request = HTTPRequest.new()
|
||||
add_child(http_request)
|
||||
http_request.request_completed.connect(self._http_request_completed)
|
||||
|
||||
# Perform a GET request. The URL below returns JSON as of writing.
|
||||
var error = http_request.request("https://music.sanplex.tech/music/all/order")
|
||||
if error != OK:
|
||||
push_error("An error occurred in the HTTP request.")
|
||||
|
||||
# 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()
|
||||
print("get_list_of_games")
|
||||
var handle_games: Callable = func handle_games(array: Array) -> void:
|
||||
if typeof(array) == TYPE_ARRAY:
|
||||
games = []
|
||||
Settings.delete_children(search_list)
|
||||
games.append_array(array)
|
||||
for game: String in games:
|
||||
var label: Label = Label.new()
|
||||
label.text = game
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD
|
||||
search_list.add_child(label)
|
||||
else:
|
||||
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()
|
||||
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
SearchWindow.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bg5yo08638600
|
||||
@@ -1,6 +1,6 @@
|
||||
[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"]
|
||||
layout_mode = 3
|
||||
@@ -11,30 +11,38 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_m7bij")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
[node name="SearchPanel" type="Panel" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 640.0
|
||||
|
||||
[node name="ClearButton" type="Button" parent="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 880.0
|
||||
offset_top = 24.0
|
||||
offset_right = 944.0
|
||||
offset_bottom = 64.0
|
||||
scale = Vector2(2, 2)
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
text = "Clear"
|
||||
|
||||
[node name="CloseButton" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 1032.0
|
||||
offset_top = 24.0
|
||||
offset_right = 1082.0
|
||||
offset_bottom = 64.0
|
||||
scale = Vector2(2, 2)
|
||||
focus_mode = 0
|
||||
action_mode = 0
|
||||
text = "Close"
|
||||
|
||||
[node name="Searchbar" type="TextEdit" parent="."]
|
||||
texture_filter = 1
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 24.0
|
||||
@@ -44,7 +52,7 @@ scale = Vector2(2, 2)
|
||||
placeholder_text = "Search"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
layout_mode = 2
|
||||
layout_mode = 0
|
||||
offset_top = 128.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 384.0
|
||||
|
||||
150
Settings.gd
Normal file
@@ -0,0 +1,150 @@
|
||||
extends Node
|
||||
|
||||
var default_path: String = "https://music.sanplex.tech"
|
||||
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 = false
|
||||
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 player_array: Array[PlayerObject]
|
||||
var edit_players: bool = false
|
||||
var currently_syncing: bool = false
|
||||
var character_select_open: bool = false
|
||||
|
||||
var version: String = "1.7.5"
|
||||
|
||||
var whats_new: String = "Changelog:
|
||||
1.7.5:
|
||||
#20: The winner song can now be stopped
|
||||
#24: The speed of the inspiration list can now be changed
|
||||
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"
|
||||
|
||||
var whats_left: String = "Things left to do:
|
||||
Fix layout
|
||||
Fix for local play"
|
||||
|
||||
var shortcuts: String = "Shortcuts:
|
||||
Alt + S = Search
|
||||
Alt + A = Add Players
|
||||
Alt + Z = Reset
|
||||
Alt + X = Play/Pause
|
||||
Alt + C = Next Song
|
||||
Alt + V = Show Answer
|
||||
Alt + Enter = Fullscreen
|
||||
Alt + UP = Volume up
|
||||
Alt + DOWN = Volume down
|
||||
Alt + LEFT = Jump back in song
|
||||
Alt + Ctrl = Restart song
|
||||
Alt + RIGHT = Jump forward in song
|
||||
Alt + 1, 2, 3, 4, 5, 6 = Give player point
|
||||
Alt + Ctrl + 1, 2, 3, 4, 5, 6 = Take point from player"
|
||||
|
||||
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
Settings.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dex06sca65j4t
|
||||
165
SettingsWindow.gd
Normal file
@@ -0,0 +1,165 @@
|
||||
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 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 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)
|
||||
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)
|
||||
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
|
||||
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)
|
||||
fullscreen_button.button_pressed = Settings.fullscreen
|
||||
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 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 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
SettingsWindow.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dukqyjoduf1af
|
||||
190
SettingsWindow.tscn
Normal file
@@ -0,0 +1,190 @@
|
||||
[gd_scene load_steps=3 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"]
|
||||
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_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 500.0
|
||||
offset_bottom = 640.0
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="SettingsPanel"]
|
||||
layout_mode = 0
|
||||
offset_right = 500.0
|
||||
offset_bottom = 640.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="SettingsPanel/ScrollContainer"]
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Label" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer"]
|
||||
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_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_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_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_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
action_mode = 0
|
||||
text = "Use low played mode"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="SettingsPanel/ScrollContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label2" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Winning Score: "
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "20"
|
||||
|
||||
[node name="LowerButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/HBoxContainer"]
|
||||
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_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"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CacheTitleLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Predownload songs: "
|
||||
|
||||
[node name="CacheLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "1"
|
||||
|
||||
[node name="LowerCacheButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/CacheHBoxContainer"]
|
||||
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_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"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="InspirationListSpeedTitle" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Inspiration List Speed: "
|
||||
|
||||
[node name="InspirationListSpeedLabel" type="Label" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "1"
|
||||
|
||||
[node name="LowerInspirationSpeedButton" type="Button" parent="SettingsPanel/ScrollContainer/VBoxContainer/InspirationHBoxContainer"]
|
||||
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_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_name_in_owner = true
|
||||
layout_mode = 2
|
||||
selected = 0
|
||||
item_count = 5
|
||||
popup/item_0/text = "https://music.sanplex.tech"
|
||||
popup/item_0/id = 1
|
||||
popup/item_1/text = "https://tmusic.sanplex.tech"
|
||||
popup/item_1/id = 2
|
||||
popup/item_2/text = "https://rmusic.sanplex.tech"
|
||||
popup/item_2/id = 3
|
||||
popup/item_3/text = "https://old-music.sanplex.tech"
|
||||
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_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
text = "Fullscreen"
|
||||
|
||||
[node name="QuickSyncButton" type="CheckButton" parent="SettingsPanel/ScrollContainer/VBoxContainer"]
|
||||
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_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
disabled = true
|
||||
text = "Local"
|
||||
56
SongObject.gd
Normal 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
SyncWindow.tscn
Normal 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
|
||||
46
character.gd
Normal 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
character.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://i35b3scbpwpu
|
||||
45
character.tscn
Normal 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
default_theme.tres
Normal 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")
|
||||
@@ -3,39 +3,37 @@
|
||||
name="Windows Desktop"
|
||||
platform="Windows Desktop"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
export_path="../../MusicPlayer_1.5.1.exe"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
encrypt_pck=false
|
||||
encrypt_directory=false
|
||||
script_encryption_key=""
|
||||
script_export_mode=2
|
||||
|
||||
[preset.0.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_script=1
|
||||
binary_format/embed_pck=false
|
||||
texture_format/bptc=true
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
debug/export_console_wrapper=0
|
||||
binary_format/embed_pck=true
|
||||
texture_format/s3tc_bptc=true
|
||||
texture_format/etc2_astc=false
|
||||
binary_format/architecture="x86_64"
|
||||
codesign/enable=false
|
||||
codesign/identity_type=0
|
||||
codesign/identity=""
|
||||
codesign/password=""
|
||||
codesign/timestamp=true
|
||||
codesign/timestamp_server_url=""
|
||||
codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
application/modify_resources=true
|
||||
application/modify_resources=false
|
||||
application/icon=""
|
||||
application/console_wrapper_icon=""
|
||||
application/icon_interpolation=4
|
||||
@@ -46,6 +44,9 @@ application/product_name=""
|
||||
application/file_description=""
|
||||
application/copyright=""
|
||||
application/trademarks=""
|
||||
application/export_angle=0
|
||||
application/export_d3d12=0
|
||||
application/d3d12_agility_sdk_multiarch=true
|
||||
ssh_remote_deploy/enabled=false
|
||||
ssh_remote_deploy/host="user@host_ip"
|
||||
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
|
||||
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||
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]
|
||||
|
||||
name="macOS"
|
||||
platform="macOS"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
export_path="./MusicPlayer_0.9_Beta.dmg"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
encrypt_pck=false
|
||||
encrypt_directory=false
|
||||
script_encryption_key=""
|
||||
script_export_mode=2
|
||||
|
||||
[preset.1.options]
|
||||
|
||||
export/distribution_type=1
|
||||
binary_format/architecture="universal"
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_script=1
|
||||
debug/export_console_wrapper=1
|
||||
application/icon=""
|
||||
application/icon_interpolation=4
|
||||
application/bundle_identifier=""
|
||||
application/bundle_identifier="tech.sanplex.musicplayer"
|
||||
application/signature=""
|
||||
application/app_category="Games"
|
||||
application/short_version="1.0"
|
||||
application/version="1.0"
|
||||
application/app_category="Music-games"
|
||||
application/short_version=""
|
||||
application/version=""
|
||||
application/copyright=""
|
||||
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
|
||||
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/certificate_file=""
|
||||
codesign/certificate_password=""
|
||||
codesign/entitlements/custom_file=""
|
||||
codesign/entitlements/allow_jit_code_execution=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_music=0
|
||||
codesign/entitlements/app_sandbox/files_movies=0
|
||||
codesign/entitlements/app_sandbox/files_user_selected=0
|
||||
codesign/entitlements/app_sandbox/helper_executables=[]
|
||||
codesign/entitlements/additional=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
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_localized={}
|
||||
privacy/camera_usage_description=""
|
||||
@@ -154,6 +173,148 @@ privacy/network_volumes_usage_description=""
|
||||
privacy/network_volumes_usage_description_localized={}
|
||||
privacy/removable_volumes_usage_description=""
|
||||
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/host="user@host_ip"
|
||||
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
|
||||
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
|
||||
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]
|
||||
|
||||
name="Linux/X11"
|
||||
platform="Linux/X11"
|
||||
runnable=true
|
||||
name="Web"
|
||||
platform="Web"
|
||||
runnable=false
|
||||
advanced_options=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path=""
|
||||
export_path="web/index.html"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
seed=0
|
||||
encrypt_pck=false
|
||||
encrypt_directory=false
|
||||
script_encryption_key=""
|
||||
script_export_mode=2
|
||||
|
||||
[preset.2.options]
|
||||
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_script=1
|
||||
binary_format/embed_pck=false
|
||||
texture_format/bptc=true
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
texture_format/etc2=false
|
||||
variant/extensions_support=false
|
||||
variant/thread_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/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"
|
||||
ssh_remote_deploy/enabled=false
|
||||
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
|
||||
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
||||
rm -rf \"{temp_dir}\""
|
||||
|
||||
[preset.3]
|
||||
|
||||
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)
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=true
|
||||
dotnet/embed_build_outputs=false
|
||||
|
||||
1
icons/pause_icon_dark.svg
Normal 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"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://t1tnj6nqpi4a"
|
||||
path="res://.godot/imported/person_remove-black-36dp.svg-60481722f4b86c76228674c37c2e8b80.ctex"
|
||||
uid="uid://c7cg1h7rmiclx"
|
||||
path="res://.godot/imported/pause_icon_dark.svg-98d49724f33d33ed5239328ede02d5a2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://person_remove-black-36dp.svg"
|
||||
dest_files=["res://.godot/imported/person_remove-black-36dp.svg-60481722f4b86c76228674c37c2e8b80.ctex"]
|
||||
source_file="res://icons/pause_icon_dark.svg"
|
||||
dest_files=["res://.godot/imported/pause_icon_dark.svg-98d49724f33d33ed5239328ede02d5a2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
BIN
icons/pause_icon_light.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
34
icons/pause_icon_light.png.import
Normal 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
icons/pause_icon_light.svg
Normal 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"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://o5go6smk7hm1"
|
||||
path="res://.godot/imported/person_add_alt_1-black-36dp.svg-bf42e8ddf13a4f7adae8637f26a86e94.ctex"
|
||||
uid="uid://dmgng6l3ghnhu"
|
||||
path="res://.godot/imported/pause_icon_light.svg-7be43594fcd7796d212e42302c91652b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://person_add_alt_1-black-36dp.svg"
|
||||
dest_files=["res://.godot/imported/person_add_alt_1-black-36dp.svg-bf42e8ddf13a4f7adae8637f26a86e94.ctex"]
|
||||
source_file="res://icons/pause_icon_light.svg"
|
||||
dest_files=["res://.godot/imported/pause_icon_light.svg-7be43594fcd7796d212e42302c91652b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
37
icons/person_add_dark.svg.import
Normal 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
icons/person_add_light.svg
Normal 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
icons/person_add_light.svg.import
Normal 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
icons/person_remove_dark.svg.import
Normal 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
icons/person_remove_light.svg
Normal 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
icons/person_remove_light.svg.import
Normal 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
icons/play_icon_dark.svg
Normal 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
icons/play_icon_dark.svg.import
Normal 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
|
||||
BIN
icons/play_icon_light.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
34
icons/play_icon_light.png.import
Normal 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
icons/play_icon_light.svg
Normal 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
icons/play_icon_light.svg.import
Normal 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
icons/reload_dark_icon.svg
Normal 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
icons/reload_dark_icon.svg.import
Normal 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
|
||||
BIN
icons/reload_light_icon.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
34
icons/reload_light_icon.png.import
Normal 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
icons/reload_light_icon.svg
Normal 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
icons/reload_light_icon.svg.import
Normal 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
icons/reload_light_icon_bigger.svg
Normal 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
icons/reload_light_icon_bigger.svg.import
Normal 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
log.gd
Normal 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
log.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cw41y87l64qo7
|
||||
81
new_character_select.gd
Normal file
@@ -0,0 +1,81 @@
|
||||
extends Control
|
||||
|
||||
@onready
|
||||
var character_panel: Panel = %CharacterPanel
|
||||
|
||||
@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() -> void:
|
||||
print("show_grid")
|
||||
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
new_character_select.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cvffg87wr6r3y
|
||||
55
new_character_select.tscn
Normal file
@@ -0,0 +1,55 @@
|
||||
[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="Label" type="Label" parent="CharacterPanel/VBoxContainer"]
|
||||
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
|
||||
1
playerObject.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://83f1fdubqdxy
|
||||
99
playlist.gd
Normal file
@@ -0,0 +1,99 @@
|
||||
extends Node
|
||||
|
||||
var song_object_array: Array[SongObject] = []
|
||||
var latest_played_song: int = 0
|
||||
var currently_playing_song: int = -1
|
||||
|
||||
var first_song_downloaded: bool = false
|
||||
var first_song_played: bool = false
|
||||
|
||||
var number_of_tracks_to_preload: int = 1
|
||||
var is_song_downloading: bool = false
|
||||
|
||||
func get_next_song() -> SongObject:
|
||||
return song_object_array[latest_played_song]
|
||||
|
||||
func set_latest_played_song() -> void:
|
||||
latest_played_song += 1
|
||||
if latest_played_song > song_object_array.size() - 1:
|
||||
latest_played_song = song_object_array.size() - 1
|
||||
|
||||
func update_last_played_song() -> void:
|
||||
latest_played_song = song_object_array.size()
|
||||
|
||||
func get_preloaded_songs() -> int:
|
||||
var number_of_tracks_preloaded: int = 0
|
||||
for song: SongObject in song_object_array:
|
||||
if !song.has_played:
|
||||
number_of_tracks_preloaded += 1
|
||||
return number_of_tracks_preloaded
|
||||
|
||||
func should_preload_more_songs() -> bool:
|
||||
return number_of_tracks_to_preload > get_preloaded_songs()
|
||||
|
||||
func set_last_played_answered() -> void:
|
||||
if song_object_array[latest_played_song].has_played && !song_object_array[latest_played_song].is_answered:
|
||||
song_object_array[latest_played_song].is_answered = true
|
||||
|
||||
func song_is_answered(song_no: int = currently_playing_song) -> void:
|
||||
print("show_answer_pressed song_object: ", song_object_array[song_no]._to_string())
|
||||
song_object_array[song_no].is_answered = true
|
||||
if Settings.add_to_stats:
|
||||
print("add to stats: ", song_no)
|
||||
Settings.make_put_request("/music/played?song="+str(song_no))
|
||||
|
||||
func add_to_playlist(new_song_object: SongObject) -> void:
|
||||
song_object_array.append(new_song_object)
|
||||
|
||||
func get_playlist() -> Array[SongObject]:
|
||||
if Settings.is_debug:
|
||||
return song_object_array
|
||||
else:
|
||||
var temp_list: Array[SongObject] = []
|
||||
for s: SongObject in song_object_array:
|
||||
if s.has_played:
|
||||
temp_list.append(s)
|
||||
return temp_list
|
||||
|
||||
func reset_playlist() -> void:
|
||||
currently_playing_song = -1
|
||||
latest_played_song = 0
|
||||
clear_song_list()
|
||||
|
||||
func clear_song_list() -> void:
|
||||
song_object_array.clear()
|
||||
|
||||
func unset_is_playing() -> void:
|
||||
for song_object: SongObject in song_object_array:
|
||||
song_object.is_playing = false
|
||||
|
||||
func set_currently_playing_song(value: int) -> void:
|
||||
currently_playing_song = value
|
||||
|
||||
func get_current_game_title() -> String:
|
||||
return song_object_array[currently_playing_song].get_game_title()
|
||||
|
||||
func get_current_song_title() -> String:
|
||||
return song_object_array[currently_playing_song].get_song_title()
|
||||
|
||||
func add_point(player_id: int) -> void:
|
||||
song_object_array[currently_playing_song].add_point(player_id)
|
||||
|
||||
func remove_point(player_id: int) -> void:
|
||||
song_object_array[currently_playing_song].remove_point(player_id)
|
||||
|
||||
func remove_player_from_list(player_to_remove: int) -> void:
|
||||
for song_list_object: SongObject in song_object_array:
|
||||
song_object_array[song_list_object.song_number].players_given_point.remove_at(song_object_array[song_list_object.song_number].players_given_point.find(player_to_remove))
|
||||
|
||||
func get_song(song_no: int) -> AudioStream:
|
||||
return song_object_array[song_no].song
|
||||
|
||||
func add_song_to_song_object(song_no: int, sound: AudioStream) -> void:
|
||||
song_object_array[song_no].song = sound
|
||||
|
||||
func song_has_played(song_no: int = latest_played_song) -> void:
|
||||
song_object_array[song_no].has_played = true
|
||||
|
||||
func song_is_playing(song_no: int = latest_played_song) -> void:
|
||||
song_object_array[song_no].is_playing = true
|
||||
1
playlist.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bgei7qocdnolw
|
||||
5
progress_response.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
class_name ProgressResponse
|
||||
extends Node
|
||||
|
||||
var progress: String
|
||||
var total_time: String
|
||||
1
progress_response.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://e74iuu78stc3
|
||||
@@ -12,18 +12,46 @@ config_version=5
|
||||
|
||||
config/name="MusicPlayer"
|
||||
run/main_scene="res://MainWindow.tscn"
|
||||
config/features=PackedStringArray("4.1", "Forward Plus")
|
||||
run/low_processor_mode=true
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[autoload]
|
||||
|
||||
Settings="*res://Settings.gd"
|
||||
Playlist="*res://playlist.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
gdscript/warnings/untyped_declaration=1
|
||||
gdscript/warnings/inferred_declaration=1
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
window/size/viewport_height=1080
|
||||
window/subwindows/embed_subwindows=false
|
||||
window/energy_saving/keep_screen_on=false
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
window/vsync/vsync_mode=2
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="MusicPlayer"
|
||||
|
||||
[input]
|
||||
|
||||
ui_accept={
|
||||
"deadzone": 0.5,
|
||||
"events": []
|
||||
}
|
||||
ui_select={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
textures/vram_compression/import_s3tc_bptc=true
|
||||
textures/vram_compression/import_etc2_astc=true
|
||||
textures/default_filters/use_nearest_mipmap_filter=true
|
||||
textures/decals/filter=0
|
||||
|
||||
1
songObject.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d1o4ys4qqxfcp
|
||||
50
song_list_object.gd
Normal file
@@ -0,0 +1,50 @@
|
||||
class_name SongListObject
|
||||
extends PanelContainer
|
||||
|
||||
@onready
|
||||
var song_list_label: Label = $HBoxContainer/SongListLabel
|
||||
|
||||
@onready
|
||||
var song_list_players: HBoxContainer = $HBoxContainer/SongListPlayers
|
||||
|
||||
var song_object: SongObject
|
||||
|
||||
#Color(0.18, 0.18, 0.18)
|
||||
#Color(0.302, 0.302, 0.302)
|
||||
#Color(0.259, 0.259, 0.259)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
#if song_object != null && song_object.song_number % 2 == 0:
|
||||
# var new_stylebox_normal = self.get_theme_stylebox("panel").duplicate()
|
||||
# new_stylebox_normal.bg_color = Color(0.18, 0.18, 0.18)
|
||||
# self.add_theme_stylebox_override("panel", new_stylebox_normal)
|
||||
# song_list_label.add_theme_stylebox_override("normal", new_stylebox_normal)
|
||||
#else:
|
||||
# var new_stylebox_normal = self.get_theme_stylebox("panel").duplicate()
|
||||
# new_stylebox_normal.bg_color = Color(0.18, 0.18, 0.18)
|
||||
# self.add_theme_stylebox_override("panel", new_stylebox_normal)
|
||||
# song_list_label.add_theme_stylebox_override("normal", new_stylebox_normal)
|
||||
set_label()
|
||||
update_players()
|
||||
|
||||
func set_label() -> void:
|
||||
if song_object != null:
|
||||
var size_to_change: int = song_object.players_given_point.size() * 50
|
||||
song_list_label.custom_minimum_size = Vector2(1000 - size_to_change, 28)
|
||||
if song_object.is_playing:
|
||||
song_list_label.add_theme_color_override("font_color", Color(1, 0.5, 0))
|
||||
song_list_label.text = song_object.get_song_info()
|
||||
|
||||
func update_players() -> void:
|
||||
Settings.delete_children(song_list_players)
|
||||
if song_object != null:
|
||||
for player_id: int in song_object.players_given_point:
|
||||
for player: PlayerObject in Settings.player_array:
|
||||
if player.id == player_id:
|
||||
var texture: TextureRect = TextureRect.new()
|
||||
texture.texture = player.character
|
||||
texture.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
||||
texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||
texture.custom_minimum_size = Vector2(50, 25)
|
||||
song_list_players.add_child(texture)
|
||||
1
song_list_object.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cjo13wixip8mq
|
||||
65
song_list_object.tscn
Normal file
@@ -0,0 +1,65 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://1jbtmhbqolqe"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c8r7ykphss4c2" path="res://characters/Link.png" id="1_ll28s"]
|
||||
[ext_resource type="Script" uid="uid://cjo13wixip8mq" path="res://song_list_object.gd" id="1_lspki"]
|
||||
[ext_resource type="Theme" uid="uid://8bllart6xn1f" path="res://default_theme.tres" id="1_x7fq8"]
|
||||
[ext_resource type="StyleBox" uid="uid://bsv6yb0yir04l" path="res://style_box_flat.tres" id="3_5h84f"]
|
||||
|
||||
[node name="SongListObject" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(1000, 0)
|
||||
offset_right = 1088.0
|
||||
offset_bottom = 59.0
|
||||
theme = ExtResource("1_x7fq8")
|
||||
script = ExtResource("1_lspki")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="SongListLabel" type="Label" parent="HBoxContainer"]
|
||||
texture_filter = 2
|
||||
custom_minimum_size = Vector2(865, 28)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
mouse_filter = 1
|
||||
theme = ExtResource("1_x7fq8")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
theme_override_styles/normal = ExtResource("3_5h84f")
|
||||
text = "Final Fantasy Dissidia 012 Duodecim (Sista Fantasin Meningsskiljaktigheter 012 Tolv) - 'Crystal Cave -arrange-'' from FINAL FANTASY III"
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="Panel" type="Panel" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="SongListPlayers" type="HBoxContainer" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/SongListPlayers"]
|
||||
custom_minimum_size = Vector2(50, 25)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ll28s")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="HBoxContainer/SongListPlayers"]
|
||||
custom_minimum_size = Vector2(50, 25)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ll28s")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="TextureRect3" type="TextureRect" parent="HBoxContainer/SongListPlayers"]
|
||||
custom_minimum_size = Vector2(50, 25)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ll28s")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="TextureRect4" type="TextureRect" parent="HBoxContainer/SongListPlayers"]
|
||||
custom_minimum_size = Vector2(50, 25)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_ll28s")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
19
sounds/01. Opening.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://n2g8jddr85h2"
|
||||
path="res://.godot/imported/01. Opening.mp3-559a476b5f0faf13d7bec359898ef47c.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/01. Opening.mp3"
|
||||
dest_files=["res://.godot/imported/01. Opening.mp3-559a476b5f0faf13d7bec359898ef47c.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
sounds/itemequip.wav
Normal file
24
sounds/itemequip.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bxec8tc8fbni"
|
||||
path="res://.godot/imported/itemequip.wav-7374990029ccea3349119e7625a59c28.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/itemequip.wav"
|
||||
dest_files=["res://.godot/imported/itemequip.wav-7374990029ccea3349119e7625a59c28.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
BIN
sounds/itemopen.wav
Normal file
24
sounds/itemopen.wav.import
Normal file
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://csg6u2h41dm4t"
|
||||
path="res://.godot/imported/itemopen.wav-f6c0fafd05bb02980988f5de7142987f.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/itemopen.wav"
|
||||
dest_files=["res://.godot/imported/itemopen.wav-f6c0fafd05bb02980988f5de7142987f.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
4
style_box_flat.tres
Normal file
@@ -0,0 +1,4 @@
|
||||
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bsv6yb0yir04l"]
|
||||
|
||||
[resource]
|
||||
bg_color = Color(0.180392, 0.180392, 0.180392, 1)
|
||||
10
sync_response.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
class_name SyncResponse
|
||||
extends Node
|
||||
|
||||
var games_added: Array
|
||||
var games_re_added: Array
|
||||
var games_changed_title: Array
|
||||
var games_changed_content: Array
|
||||
var games_removed: Array
|
||||
var catched_errors: Array
|
||||
var total_time: String
|
||||
1
sync_response.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dtfsuob2aidl7
|
||||
201
sync_window.gd
Normal file
@@ -0,0 +1,201 @@
|
||||
extends Control
|
||||
|
||||
@onready
|
||||
var sync_panel: Panel = %SyncPanel
|
||||
|
||||
@onready
|
||||
var sync_title_label: Label = %SyncTitleLabel
|
||||
|
||||
@onready
|
||||
var no_changes_label: Label = %NoChangesLabel
|
||||
|
||||
@onready
|
||||
var progress_hbox: HBoxContainer = %ProgressHBoxContainer
|
||||
|
||||
@onready
|
||||
var sync_hbox: HBoxContainer = %SyncHBoxContainer
|
||||
|
||||
@onready
|
||||
var sync_progress_bar: ProgressBar = %SyncProgressBar
|
||||
|
||||
@onready
|
||||
var games_added_vbox: VBoxContainer = %GamesAddedVBox
|
||||
|
||||
@onready
|
||||
var games_added_separator: VSeparator = %GamesAddedSeparator
|
||||
|
||||
@onready
|
||||
var games_readded_vbox: VBoxContainer = %GamesReAddedVBox
|
||||
|
||||
@onready
|
||||
var games_readded_separator: VSeparator = %GamesReAddedSeparator
|
||||
|
||||
@onready
|
||||
var games_changed_title_vbox: VBoxContainer = %GamesChangedTitleVBox
|
||||
|
||||
@onready
|
||||
var games_changed_title_separator: VSeparator = %GamesChangedTitleSeparator
|
||||
|
||||
@onready
|
||||
var games_changed_content_vbox: VBoxContainer = %GamesChangedContentVBox
|
||||
|
||||
@onready
|
||||
var games_changed_content_separator: VSeparator = %GamesChangedContentSeparator
|
||||
|
||||
@onready
|
||||
var games_removed_vbox: VBoxContainer = %GamesRemovedVBox
|
||||
|
||||
@onready
|
||||
var games_removed_separator: VSeparator = %GamesRemovedSeparator
|
||||
|
||||
@onready
|
||||
var catched_errors_vbox: VBoxContainer = %CatchedErrorsVBox
|
||||
|
||||
@onready
|
||||
var sync_time: Label = %SyncTime
|
||||
|
||||
@onready
|
||||
var sync_timer: Timer = %SyncTimer
|
||||
|
||||
var changes: bool = false
|
||||
|
||||
var has_synced: bool = false
|
||||
|
||||
signal sync_started
|
||||
signal sync_finished
|
||||
|
||||
func _ready() -> void:
|
||||
sync_timer.timeout.connect(_on_sync_timeout)
|
||||
|
||||
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), sync_panel.size).has_point(evLocal.position):
|
||||
self.visible = false
|
||||
|
||||
func start_sync() -> void:
|
||||
print("start_sync")
|
||||
self.visible = true
|
||||
if !has_synced:
|
||||
var sync_request_sent: Callable = func sync_request_sent() -> void:
|
||||
sync_timer.start(0.75)
|
||||
Settings.currently_syncing = true
|
||||
sync_started.emit()
|
||||
show_sync_progress()
|
||||
if !Settings.currently_syncing:
|
||||
Settings.make_request2("/sync", sync_request_sent, false)
|
||||
|
||||
func _on_sync_timeout() -> void:
|
||||
print("_on_sync_timeout!")
|
||||
var get_progress: Callable = func get_progress(data_received: Dictionary) -> void:
|
||||
print("get_progress")
|
||||
print("data_received: ", data_received)
|
||||
if data_received != null:
|
||||
if data_received.has("progress"):
|
||||
sync_progress_bar.value = int(data_received.progress)
|
||||
sync_time.text = data_received.time_spent
|
||||
else:
|
||||
on_sync_finished(data_received)
|
||||
Settings.make_request2("/sync/progress", get_progress, true)
|
||||
|
||||
func on_sync_finished(data_received: Dictionary) -> void:
|
||||
has_synced = true
|
||||
reset_sync_result()
|
||||
if data_received.games_added != null:
|
||||
changes = true
|
||||
list_visible(games_added_vbox, games_added_separator)
|
||||
make_list(data_received.games_added, games_added_vbox, "GamesAdded")
|
||||
if data_received.games_re_added != null:
|
||||
changes = true
|
||||
list_visible(games_readded_vbox, games_readded_separator)
|
||||
make_list(data_received.games_re_added, games_readded_vbox, "GamesReAdded")
|
||||
if data_received.games_changed_title != null:
|
||||
changes = true
|
||||
list_visible(games_changed_title_vbox, games_changed_title_separator)
|
||||
Settings.delete_children(games_changed_title_vbox)
|
||||
make_header_label(games_changed_title_vbox, "GamesChangedTitle")
|
||||
var row: int = 0
|
||||
for old_game_title: String in data_received.games_changed_title:
|
||||
var label: Label = make_game_label(old_game_title + " changed title to " + data_received.games_changed_title[old_game_title])
|
||||
if row % 2 != 0:
|
||||
label.add_theme_color_override("font_color", Color(1, 0.5, 0))
|
||||
games_changed_title_vbox.add_child(label)
|
||||
if data_received.games_changed_content != null:
|
||||
changes = true
|
||||
list_visible(games_changed_content_vbox, games_changed_content_separator)
|
||||
make_list(data_received.games_changed_content, games_changed_content_vbox, "GamesChangedContent")
|
||||
if data_received.games_removed != null:
|
||||
changes = true
|
||||
list_visible(games_removed_vbox, games_removed_separator)
|
||||
make_list(data_received.games_removed, games_removed_vbox, "GamesRemoved")
|
||||
if data_received.catched_errors != null:
|
||||
catched_errors_vbox.visible = true
|
||||
make_list(data_received.catched_errors, catched_errors_vbox, "CatchedErrors")
|
||||
if !changes:
|
||||
no_changes_label.visible = true
|
||||
sync_time.text = data_received.total_time
|
||||
Settings.currently_syncing = false
|
||||
sync_timer.stop()
|
||||
print("sync finished")
|
||||
show_sync_result()
|
||||
sync_finished.emit()
|
||||
|
||||
func list_visible(vbox: VBoxContainer, seperator: VSeparator) -> void:
|
||||
vbox.visible = true
|
||||
seperator.visible = true
|
||||
|
||||
func make_header_label(vbox: VBoxContainer, text: String) -> void:
|
||||
var label: Label = Label.new()
|
||||
label.set_texture_filter(TextureFilter.TEXTURE_FILTER_NEAREST)
|
||||
label.add_theme_font_size_override("font_size", 20)
|
||||
label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
label.text = text
|
||||
vbox.add_child(label)
|
||||
|
||||
func make_game_label(text: String) -> Label:
|
||||
var label: Label = Label.new()
|
||||
label.set_texture_filter(TextureFilter.TEXTURE_FILTER_NEAREST)
|
||||
label.add_theme_font_size_override("font_size", 20)
|
||||
label.text = text
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD
|
||||
return label
|
||||
|
||||
func reset_sync_result() -> void:
|
||||
sync_progress_bar.value = 0
|
||||
sync_time.text = ""
|
||||
changes = false
|
||||
no_changes_label.visible = false
|
||||
games_added_vbox.visible = false
|
||||
games_added_separator.visible = false
|
||||
games_readded_vbox.visible = false
|
||||
games_readded_separator.visible = false
|
||||
games_changed_title_vbox.visible = false
|
||||
games_changed_title_separator.visible = false
|
||||
games_changed_content_vbox.visible = false
|
||||
games_changed_content_separator.visible = false
|
||||
games_removed_vbox.visible = false
|
||||
games_removed_separator.visible = false
|
||||
catched_errors_vbox.visible = false
|
||||
|
||||
func make_list(list: Array, vbox: VBoxContainer, text: String) -> void:
|
||||
Settings.delete_children(vbox)
|
||||
make_header_label(vbox, text)
|
||||
var row: int = 0
|
||||
for game: String in list:
|
||||
var label: Label = make_game_label(game)
|
||||
if row % 2 != 0:
|
||||
label.add_theme_color_override("font_color", Color(1, 0.5, 0))
|
||||
vbox.add_child(label)
|
||||
|
||||
func show_sync_result() -> void:
|
||||
sync_title_label.text = "Sync Result"
|
||||
progress_hbox.visible = false
|
||||
sync_hbox.visible = true
|
||||
|
||||
func show_sync_progress() -> void:
|
||||
sync_title_label.text = "Sync in Progress"
|
||||
progress_hbox.visible = true
|
||||
no_changes_label.visible = false
|
||||
sync_hbox.visible = false
|
||||
catched_errors_vbox.visible = false
|
||||
1
sync_window.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c3ejukwth512a
|
||||
@@ -11,5 +11,8 @@ func _ready():
|
||||
value_changed.connect(_on_value_changed)
|
||||
value = db_to_linear(AudioServer.get_bus_volume_db(_bus))
|
||||
|
||||
func _on_value_changed(value: float) -> void:
|
||||
AudioServer.set_bus_volume_db(_bus, linear_to_db(value))
|
||||
func _on_value_changed(changed_value: float) -> void:
|
||||
AudioServer.set_bus_volume_db(_bus, linear_to_db(changed_value))
|
||||
|
||||
func change_volume(changed_value: float) -> void:
|
||||
AudioServer.set_bus_volume_db(_bus, linear_to_db(changed_value))
|
||||
|
||||
1
volume_slider.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bgviu7smansj1
|
||||