diff --git a/.editorconfig b/.editorconfig index 61eee91c..1769fc9c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -183,7 +183,7 @@ csharp_style_namespace_declarations = file_scoped:warning csharp_style_prefer_primary_constructors = false #Roslyn severities -dotnet_diagnostic.IDE0130.severity = none +dotnet_diagnostic.IDE0130.severity = warning dotnet_diagnostic.CA1305.severity = warning [*.{yaml,yml}] diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml new file mode 100644 index 00000000..1ebf6ffb --- /dev/null +++ b/.github/workflows/export.yml @@ -0,0 +1,170 @@ +name: export + +on: + push: + tags: + - "v*.*.*" + +jobs: + export: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + + - name: Verify project version + shell: bash + run: | + TAG="${GITHUB_REF_NAME#v}" + PROJECT_VERSION=$(grep -oP '(?<=config/version=")[^"]+' project.godot) + + if [ "$PROJECT_VERSION" != "$TAG" ]; then + echo "::error file=project.godot::expected version $TAG (from tag) but found $PROJECT_VERSION" + exit 1 + fi + + - name: Verify xmllint + shell: bash + run: | + command -v xmllint >/dev/null 2>&1 || { + sudo apt-get update + sudo apt-get install -y --no-install-recommends libxml2-utils + } + + - name: Verify project + id: godot + shell: bash + env: + CSPROJ_PATH: "Rhythia.csproj" + VERSION_FILE: ".github/godot_version.txt" + run: | + if compgen -G "${CSPROJ_PATH}.old*" > /dev/null; then + echo "::error file=${CSPROJ_PATH}.old::${CSPROJ_PATH}.old migration exists" + exit 1 + fi + + if [ ! -f "$CSPROJ_PATH" ]; then + echo "::error::$CSPROJ_PATH not found" + exit 1 + fi + + if [ ! -f "$VERSION_FILE" ]; then + echo "::error::$VERSION_FILE not found" + exit 1 + fi + + EXPECTED_VERSION=$(tr -d '[:space:]' < "$VERSION_FILE") + EXPECTED_SDK="Godot.NET.Sdk/${EXPECTED_VERSION}" + + ACTUAL_SDK=$(xmllint --xpath 'string(/Project/@Sdk)' "$CSPROJ_PATH") + + if [ -z "$ACTUAL_SDK" ]; then + echo "::error file=$CSPROJ_PATH::no attribute found" + exit 1 + fi + + if [ "$ACTUAL_SDK" != "$EXPECTED_SDK" ]; then + echo "::error file=$CSPROJ_PATH::expected Sdk=\"$EXPECTED_SDK\" but found Sdk=\"$ACTUAL_SDK\"" + exit 1 + fi + + echo "Godot SDK OK: $ACTUAL_SDK" + + echo "version=$EXPECTED_VERSION" >> "$GITHUB_OUTPUT" + echo "base_url=https://github.com/godotengine/godot-builds/releases/download/${EXPECTED_VERSION}-stable" >> "$GITHUB_OUTPUT" + + - name: Setup + uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # Dotnet 4.0.2 + with: + dotnet-version: 10.0.x + cache: true + + - name: Restore dependencies + run: dotnet restore --locked-mode + + - name: Detect build type + id: kind + run: | + if [[ "$GITHUB_REF_NAME" == *-* ]]; then + echo "prerelease=true" >> "$GITHUB_OUTPUT" + else + echo "prerelease=false" >> "$GITHUB_OUTPUT" + fi + + - name: Export builds + id: export + uses: firebelley/godot-export@615a6f7afc22d6266bf55c17748fb07447e8bdab # v8.0.0 + with: + godot_executable_download_url: ${{ steps.godot.outputs.base_url }}/Godot_v${{ steps.godot.outputs.version }}-stable_mono_linux_x86_64.zip + godot_export_templates_download_url: ${{ steps.godot.outputs.base_url }}/Godot_v${{ steps.godot.outputs.version }}-stable_mono_export_templates.tpz + export_debug: ${{ steps.kind.outputs.prerelease }} + relative_project_path: ./ + relative_export_path: builds + cache: true + + - name: Verify exports exist + shell: bash + run: | + test -f "builds/Windows Desktop/Rhythia.exe" || { echo "::error::Windows export missing"; exit 1; } + test -f "builds/Linux/Rhythia.x86_64" || { echo "::error::Linux export missing"; exit 1; } + test -f "builds/macOS/Rhythia.zip" || { echo "::error::macOS export missing"; exit 1; } + + - name: Compress exports + run: | + mkdir -p dist + (cd "builds/Windows Desktop" && zip -r "$GITHUB_WORKSPACE/dist/windows.zip" .) + (cd "builds/Linux" && zip -r "$GITHUB_WORKSPACE/dist/linux.zip" .) + cp builds/macOS/Rhythia.zip dist/macos.zip + + - name: Upload Windows build for installer + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: rhythia-windows + path: builds/Windows Desktop/ + if-no-files-found: error + + - name: Create draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PRERELEASE: ${{ steps.kind.outputs.prerelease }} + run: | + FLAGS="" + [[ "$PRERELEASE" == "true" ]] && FLAGS="--prerelease" + gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 || \ + gh release create "$GITHUB_REF_NAME" --draft --title "$GITHUB_REF_NAME" $FLAGS + + - name: Upload to GitHub Releases + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload "$GITHUB_REF_NAME" dist/* --clobber + installer: + needs: export + runs-on: windows-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: rhythia-windows + path: builds/Windows Desktop/ + + - name: Build installer + run: | + $version = $env:GITHUB_REF_NAME.TrimStart('v') + & "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" ` + "/DAppVersion=$version" ` + "/DSourceDir=$env:GITHUB_WORKSPACE\builds\Windows Desktop" ` + "/DOutputDir=$env:GITHUB_WORKSPACE\dist" ` + installer\rhythia.iss + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + + - name: Upload to GitHub Releases + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload $env:GITHUB_REF_NAME dist\*.exe --clobber + diff --git a/Rhythia.csproj b/Rhythia.csproj index 6905bd64..841b6556 100644 --- a/Rhythia.csproj +++ b/Rhythia.csproj @@ -4,6 +4,9 @@ net10.0 true preview + $(MSBuildProjectDirectory)\scripts\ + + true diff --git a/export_presets.cfg b/export_presets.cfg index d69582c3..15d45d6b 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -1,7 +1,8 @@ [runnable_presets] "Windows Desktop"="Windows Desktop" -Linux="Linux" +"Linux x86_64"="Linux x86_64" +"Linux AArch64"="Linux AArch64" macOS="macOS" [preset.0] @@ -13,7 +14,7 @@ custom_features="" export_filter="all_resources" include_filter="user/*" exclude_filter="" -export_path="../../../Desktop/Windows/Rhythia.zip" +export_path="exports/Windows Desktop/Rhythia.exe" patches=PackedStringArray() patch_delta_encoding=false patch_delta_compression_level_zstd=19 @@ -80,14 +81,14 @@ dotnet/embed_build_outputs=false [preset.1] -name="Linux" +name="Linux x86_64" platform="Linux" dedicated_server=false custom_features="" export_filter="all_resources" include_filter="user/*" exclude_filter="" -export_path="../../../Desktop/Linux/Rhythia.zip" +export_path="exports/Linux/Rhythia.x86_64" patches=PackedStringArray() patch_delta_encoding=false patch_delta_compression_level_zstd=19 @@ -129,6 +130,55 @@ dotnet/embed_build_outputs=false [preset.2] +name="Linux AArch64" +platform="Linux" +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="user/*" +exclude_filter="" +export_path="../../../Desktop/Linux/Rhythia.zip" +patches=PackedStringArray() +patch_delta_encoding=false +patch_delta_compression_level_zstd=19 +patch_delta_min_reduction=0.1 +patch_delta_include_filters="*" +patch_delta_exclude_filters="" +encryption_include_filters="" +encryption_exclude_filters="" +seed=0 +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.2.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 +shader_baker/enabled=false +binary_format/architecture="arm64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +pkill -x -f \"{temp_dir}/{exe_name} {cmd_args}\" +rm -rf \"{temp_dir}\"" +dotnet/include_scripts_content=false +dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=false + +[preset.3] + name="macOS" platform="macOS" dedicated_server=false @@ -136,7 +186,7 @@ custom_features="" export_filter="all_resources" include_filter="user/*" exclude_filter="" -export_path="" +export_path="exports/macOS/Rhythia.zip" patches=PackedStringArray() patch_delta_encoding=false patch_delta_compression_level_zstd=19 @@ -150,7 +200,7 @@ encrypt_pck=false encrypt_directory=false script_export_mode=2 -[preset.2.options] +[preset.3.options] export/distribution_type=1 binary_format/architecture="universal" @@ -160,7 +210,7 @@ debug/export_console_wrapper=1 application/liquid_glass_icon="" application/icon="" application/icon_interpolation=4 -application/bundle_identifier="" +application/bundle_identifier="net.rhythia.client" application/signature="" application/app_category="Games" application/short_version="" diff --git a/installer/ReadMe.rtf b/installer/ReadMe.rtf new file mode 100755 index 00000000..8ab4bf41 Binary files /dev/null and b/installer/ReadMe.rtf differ diff --git a/installer/rhythia.iss b/installer/rhythia.iss new file mode 100644 index 00000000..19d461e6 --- /dev/null +++ b/installer/rhythia.iss @@ -0,0 +1,53 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! +; Non-commercial use only. + +#define MyAppName "Rhythia" +#ifndef AppVersion + #define AppVersion "0.0.0" +#endif +#define MyAppVersion AppVersion +#define MyAppPublisher "Rhythia Org" +#define MyAppURL "https://github.com/Rhythia" +#define EscapeConstArgument(Value) StringChange(StringChange(StringChange(Value, "%", "%25"), ",", "%2c"), "}", "%7d") + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{58B8F9FB-4F1F-4953-BEA4-C7FA437761D9} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={cm:NameAndVersion,{#EscapeConstArgument(MyAppName)},{#EscapeConstArgument(MyAppVersion)}} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +InfoAfterFile=ReadMe.rtf +; Remove the following line to run in administrative install mode (install for all users). +PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog +OutputDir={#OutputDir} +OutputBaseFilename=Rhythia Installer +SetupIconFile=..\textures\icon.ico +SolidCompression=yes +WizardStyle=modern dark polar + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "startmenuicon"; Description: "Create a &Start Menu shortcut"; GroupDescription: "{cm:AdditionalIcons}" +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}" + +[Files] +Source: "{#SourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files. + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\Rhythia.exe"; Tasks: startmenuicon +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\Rhythia.exe"; Tasks: desktopicon +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" + diff --git a/prefabs/map_info_container.tscn b/prefabs/map_info_container.tscn index db3771d1..82cb61d5 100644 --- a/prefabs/map_info_container.tscn +++ b/prefabs/map_info_container.tscn @@ -33,19 +33,6 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_i21mh"] -content_margin_left = 2.0 -content_margin_top = 2.0 -content_margin_right = 2.0 -content_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1m5pv"] -bg_color = Color(0, 0, 0, 0.3764706) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 - [sub_resource type="ShaderMaterial" id="ShaderMaterial_4d08m"] shader = ExtResource("2_nrche") shader_parameter/outline_color = Color(0.05, 0.05, 0.05, 1) @@ -70,6 +57,13 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1m5pv"] +bg_color = Color(0, 0, 0, 0.3764706) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 + [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6xsea"] content_margin_left = 2.0 content_margin_top = 2.0 @@ -176,7 +170,7 @@ outline_color = Color(0, 0, 0, 1) shadow_size = 4 shadow_color = Color(0, 0, 0, 1) -[node name="MapInfoContainer" type="Panel" unique_id=150923669 node_paths=PackedStringArray("info", "dim", "coverBackground", "cover", "infoSubholder", "mainLabel", "extraLabel", "artistLink", "exportButton", "favoriteButton", "videoButton", "videoDialog", "copyButton", "copyDialog", "deleteButton", "actions", "preview", "speedHolder", "speedPresets", "playHolder", "startButton", "leaderboard", "lbScrollContainer", "lbContainer", "lbExpand", "lbHide")] +[node name="MapInfoContainer" type="Panel" unique_id=150923669 node_paths=PackedStringArray("info", "dim", "coverBackground", "cover", "mainLabel", "extraLabel", "artistLink", "exportButton", "favoriteButton", "videoButton", "videoDialog", "copyButton", "copyDialog", "deleteButton", "actions", "preview", "speedHolder", "speedPresets", "playHolder", "startButton", "leaderboard", "lbScrollContainer", "lbContainer", "lbExpand", "lbHide")] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -188,19 +182,18 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_svokg") script = ExtResource("1_50xtp") info = NodePath("Info") dim = NodePath("Dim") -coverBackground = NodePath("Info/ScrollContainer/HBoxContainer/Background") -cover = NodePath("Info/ScrollContainer/HBoxContainer/Background/Cover") -infoSubholder = NodePath("Info/ScrollContainer/HBoxContainer") -mainLabel = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Main") -extraLabel = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Extra") -artistLink = NodePath("Info/ScrollContainer/HBoxContainer/Background/ArtistLink") -exportButton = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Export") -favoriteButton = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Favorite") -videoButton = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Video") -videoDialog = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Video/VideoDialog") -copyButton = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Copy") -copyDialog = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Copy/CopyDialog") -deleteButton = NodePath("Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Delete") +coverBackground = NodePath("Info/Control/Background") +cover = NodePath("Info/Control/Background/Cover") +mainLabel = NodePath("Info/Control/infoControl/infoSubholder/Main") +extraLabel = NodePath("Info/Control/infoControl/infoSubholder/Extra") +artistLink = NodePath("Info/Control/Background/ArtistLink") +exportButton = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Export") +favoriteButton = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Favorite") +videoButton = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Video") +videoDialog = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Video/VideoDialog") +copyButton = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Copy") +copyDialog = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Copy/CopyDialog") +deleteButton = NodePath("Info/Control/infoControl/infoSubholder/Buttons/Delete") actions = NodePath("Actions") preview = NodePath("Actions/ScrollContainer/Holder/Preview/AspectRatioContainer/FlatPreview") speedHolder = NodePath("Actions/ScrollContainer/Holder/Speed") @@ -232,46 +225,57 @@ grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_1q06g") -[node name="ScrollContainer" type="ScrollContainer" parent="Info" unique_id=771327651] +[node name="Outline" type="Panel" parent="Info" unique_id=1992047374] +material = SubResource("ShaderMaterial_4d08m") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_w0o2h") + +[node name="Control" type="Control" parent="Info" unique_id=358752342] +clip_contents = true layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -mouse_filter = 0 mouse_force_pass_scroll_events = false theme = ExtResource("4_4d08m") -theme_override_styles/panel = SubResource("StyleBoxEmpty_i21mh") - -[node name="HBoxContainer" type="HBoxContainer" parent="Info/ScrollContainer" unique_id=660353866] -custom_minimum_size = Vector2(0, 245) -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 -[node name="Background" type="TextureRect" parent="Info/ScrollContainer/HBoxContainer" unique_id=1995472053] +[node name="Background" type="TextureRect" parent="Info/Control" unique_id=1995472053] show_behind_parent = true -layout_mode = 2 +layout_mode = 1 +anchors_preset = -1 +anchor_right = 0.34800002 +anchor_bottom = 0.99300003 +offset_left = 2.0 +offset_top = 2.0 +offset_right = -0.34414673 +offset_bottom = -0.040008545 texture = ExtResource("3_ne4r3") expand_mode = 2 -stretch_mode = 4 -[node name="Cover" type="TextureRect" parent="Info/ScrollContainer/HBoxContainer/Background" unique_id=1954943621] +[node name="Cover" type="TextureRect" parent="Info/Control/Background" unique_id=1954943621] layout_mode = 1 anchors_preset = -1 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = 8.0 -offset_top = 8.0 -offset_right = -8.0 -offset_bottom = -8.0 +anchor_left = 0.029000001 +anchor_top = 0.029000001 +anchor_right = 0.9710001 +anchor_bottom = 0.9710001 +offset_left = -0.0040006638 +offset_top = -0.0040006638 +offset_right = 0.003967285 +offset_bottom = 0.003967285 grow_horizontal = 2 grow_vertical = 2 expand_mode = 1 -stretch_mode = 6 -[node name="ArtistLink" type="Button" parent="Info/ScrollContainer/HBoxContainer/Background" unique_id=752801089] +[node name="ArtistLink" type="Button" parent="Info/Control/Background" unique_id=752801089] layout_mode = 1 anchors_preset = -1 anchor_left = 0.5 @@ -290,7 +294,7 @@ flat = true alignment = 0 script = ExtResource("4_dccrs") -[node name="Panel" type="Panel" parent="Info/ScrollContainer/HBoxContainer/Background/ArtistLink" unique_id=194309589] +[node name="Panel" type="Panel" parent="Info/Control/Background/ArtistLink" unique_id=194309589] show_behind_parent = true layout_mode = 1 anchors_preset = 15 @@ -301,65 +305,96 @@ grow_vertical = 2 mouse_filter = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_1m5pv") -[node name="CoverContainer" type="AspectRatioContainer" parent="Info/ScrollContainer/HBoxContainer" unique_id=1266967334] +[node name="CoverContainer" type="AspectRatioContainer" parent="Info/Control" unique_id=1266967334] visible = false -layout_mode = 2 +layout_mode = 0 +offset_left = 282.0 +offset_top = 2.0 +offset_right = 282.0 +offset_bottom = 278.0 alignment_horizontal = 0 -[node name="Subholder" type="Panel" parent="Info/ScrollContainer/HBoxContainer" unique_id=80746001] -layout_mode = 2 +[node name="infoControl" type="Control" parent="Info/Control" unique_id=1409035100] +layout_mode = 1 +anchor_left = 0.35300002 +anchor_right = 1.0 +anchor_bottom = 0.99300003 +offset_left = -0.34335327 +offset_right = -1.5853882 +offset_bottom = -0.040008545 +grow_horizontal = 0 + +[node name="infoSubholder" type="Panel" parent="Info/Control/infoControl" unique_id=80746001] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.056 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -0.078229904 +offset_right = -0.25408936 +grow_horizontal = 2 +grow_vertical = 2 size_flags_horizontal = 3 -[node name="Extra" type="RichTextLabel" parent="Info/ScrollContainer/HBoxContainer/Subholder" unique_id=469525934] +[node name="Extra" type="RichTextLabel" parent="Info/Control/infoControl/infoSubholder" unique_id=469525934] layout_mode = 1 anchors_preset = -1 +anchor_left = 0.019000001 +anchor_top = 0.572 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = 8.0 -offset_top = 138.0 -offset_right = -8.399963 -offset_bottom = -50.0 -grow_horizontal = 0 +offset_left = -0.08819294 +offset_top = -0.51600647 +offset_right = -8.0 +offset_bottom = -60.0 +grow_horizontal = 2 +grow_vertical = 2 theme = ExtResource("4_4d08m") theme_override_font_sizes/normal_font_size = 18 bbcode_enabled = true text = "[color=ffffff88]{0} -{1} notes -[color=ffffff44]{2}" +{1} notes" +fit_content = true +autowrap_mode = 2 horizontal_alignment = 2 vertical_alignment = 2 -[node name="Main" type="RichTextLabel" parent="Info/ScrollContainer/HBoxContainer/Subholder" unique_id=394044659] +[node name="Main" type="RichTextLabel" parent="Info/Control/infoControl/infoSubholder" unique_id=394044659] layout_mode = 1 anchors_preset = -1 -anchor_right = 1.0 -offset_left = 8.0 +anchor_left = 0.015000001 +anchor_right = 0.984 +anchor_bottom = 0.57600003 +offset_left = 0.21499968 offset_top = 6.0 -offset_right = -8.399963 -offset_bottom = 130.0 +offset_right = -0.09597778 +offset_bottom = -0.12800598 mouse_filter = 1 theme = ExtResource("4_4d08m") theme_override_constants/paragraph_separation = 4 bbcode_enabled = true text = "[outline_size=2][font_size=24]{0} -[color={1}]{2} [font_size=16][color=909096]by {3}" +[color={1}]{2} [font_size=16][color=909096] +by {3} +[font_size=12][color=ffffff44]{4}" -[node name="Buttons" type="HBoxContainer" parent="Info/ScrollContainer/HBoxContainer/Subholder" unique_id=1191092010] +[node name="Buttons" type="HBoxContainer" parent="Info/Control/infoControl/infoSubholder" unique_id=1191092010] custom_minimum_size = Vector2(0, 40) layout_mode = 1 anchors_preset = -1 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = 8.0 -offset_top = -46.0 -offset_right = -6.0 -offset_bottom = -6.0 +anchor_left = 0.016 +anchor_top = 0.906 +anchor_right = 0.98800004 +anchor_bottom = 0.97800004 +offset_left = 0.20531178 +offset_top = -19.868011 +offset_right = -0.1539917 +offset_bottom = 0.115997314 grow_horizontal = 0 grow_vertical = 0 alignment = 2 -[node name="Export" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=2033571562] +[node name="Export" type="Button" parent="Info/Control/infoControl/infoSubholder/Buttons" unique_id=2033571562] layout_mode = 2 tooltip_text = "Exports map into a .phxm file to share easily" focus_mode = 0 @@ -370,7 +405,7 @@ theme_override_constants/icon_max_width = 24 icon = ExtResource("5_g02bu") icon_alignment = 1 -[node name="Favorite" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=1022164792] +[node name="Favorite" type="Button" parent="Info/Control/infoControl/infoSubholder/Buttons" unique_id=1022164792] layout_mode = 2 tooltip_text = "Favorite" focus_mode = 0 @@ -381,7 +416,7 @@ theme_override_constants/icon_max_width = 24 icon = ExtResource("5_1m5pv") icon_alignment = 1 -[node name="Video" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=1985048325] +[node name="Video" type="Button" parent="Info/Control/infoControl/infoSubholder/Buttons" unique_id=1985048325] visible = false layout_mode = 2 tooltip_text = "Add Video" @@ -394,7 +429,7 @@ disabled = true icon = ExtResource("6_g02bu") icon_alignment = 1 -[node name="VideoDialog" type="FileDialog" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Video" unique_id=72805866] +[node name="VideoDialog" type="FileDialog" parent="Info/Control/infoControl/infoSubholder/Buttons/Video" unique_id=72805866] oversampling_override = 1.0 title = "Open a File" position = Vector2i(0, 36) @@ -403,7 +438,7 @@ access = 2 filters = PackedStringArray("*.mp4") use_native_dialog = true -[node name="Copy" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=2053076461] +[node name="Copy" type="Button" parent="Info/Control/infoControl/infoSubholder/Buttons" unique_id=2053076461] visible = false layout_mode = 2 tooltip_text = "Copy" @@ -415,12 +450,12 @@ theme_override_constants/icon_max_width = 24 icon = ExtResource("7_oibm8") icon_alignment = 1 -[node name="CopyDialog" type="FileDialog" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons/Copy" unique_id=1634895255] +[node name="CopyDialog" type="FileDialog" parent="Info/Control/infoControl/infoSubholder/Buttons/Copy" unique_id=1634895255] access = 2 filters = PackedStringArray("*.phxm") use_native_dialog = true -[node name="Delete" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=2015809903] +[node name="Delete" type="Button" parent="Info/Control/infoControl/infoSubholder/Buttons" unique_id=2015809903] layout_mode = 2 tooltip_text = "Delete" focus_mode = 0 @@ -431,17 +466,6 @@ theme_override_constants/icon_max_width = 24 icon = ExtResource("8_ssthb") icon_alignment = 1 -[node name="Outline" type="Panel" parent="Info" unique_id=1992047374] -material = SubResource("ShaderMaterial_4d08m") -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -mouse_filter = 2 -theme_override_styles/panel = SubResource("StyleBoxFlat_w0o2h") - [node name="Actions" type="Panel" parent="." unique_id=1101045169] clip_contents = true layout_mode = 1 @@ -533,7 +557,7 @@ offset_right = -8.0 offset_bottom = -8.0 grow_horizontal = 2 grow_vertical = 0 -tooltip_text = "Favorite" +tooltip_text = "Changes how the camera functions: Spin enables a first-person perspective, while Lock keeps the camera still" theme = ExtResource("4_4d08m") script = ExtResource("11_ne4r3") container = NodePath("ScrollContainer/VBoxContainer") @@ -665,6 +689,7 @@ grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("4_4d08m") theme_override_styles/panel = SubResource("StyleBoxEmpty_6xsea") +vertical_scroll_mode = 0 [node name="Presets" type="HBoxContainer" parent="Actions/ScrollContainer/Holder/Speed/ScrollContainer" unique_id=163344429] layout_mode = 2 @@ -825,10 +850,11 @@ ticks_position = 3 layout_mode = 1 anchors_preset = -1 anchor_left = 0.1 -anchor_right = 0.9 -anchor_bottom = 0.75 -offset_top = 48.0 -offset_bottom = -24.0 +anchor_top = 0.21800001 +anchor_right = 0.90000004 +anchor_bottom = 0.64000005 +offset_top = 18.352 +offset_bottom = -9.040009 grow_horizontal = 2 grow_vertical = 2 focus_mode = 0 @@ -907,6 +933,8 @@ layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_left = -3.0 +offset_right = -3.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 diff --git a/prefabs/modifier_button.tscn b/prefabs/modifier_button.tscn deleted file mode 100644 index 29657df1..00000000 --- a/prefabs/modifier_button.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene format=3 uid="uid://dndbtgq2yrwen"] - -[ext_resource type="Theme" uid="uid://dhuhu3mmaew1a" path="res://themes/theme.tres" id="1_bp66n"] -[ext_resource type="Texture2D" uid="uid://baivqqkfll133" path="res://textures/RhythiaSquircle.png" id="2_dhidr"] -[ext_resource type="Script" uid="uid://c8xhwjmasp86y" path="res://scripts/ui/menu/play/ModifierButton.cs" id="3_b55dm"] - -[node name="ModifierButton" type="Button" unique_id=1417833013] -offset_right = 58.0 -offset_bottom = 54.0 -focus_mode = 0 -mouse_default_cursor_shape = 2 -theme = ExtResource("1_bp66n") -theme_override_constants/icon_max_width = 42 -toggle_mode = true -icon = ExtResource("2_dhidr") -icon_alignment = 1 -script = ExtResource("3_b55dm") diff --git a/project.godot b/project.godot index b22af139..f6eaa4ca 100644 --- a/project.godot +++ b/project.godot @@ -85,6 +85,7 @@ common/physics_ticks_per_second=120 [rendering] +textures/vram_compression/import_s3tc_bptc=true textures/vram_compression/import_etc2_astc=true textures/lossless_compression/force_png=true environment/defaults/default_clear_color=Color(0.0885599, 0.08855992, 0.08855987, 1) diff --git a/scenes/game.tscn b/scenes/game.tscn index 1d706810..97ec2a45 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -44,7 +44,7 @@ [ext_resource type="Script" uid="uid://dlxxg2h4cl5hj" path="res://scripts/game/ui/PauseMenu.cs" id="38_8ool0"] [ext_resource type="Script" uid="uid://c24b7vefbxvbh" path="res://scripts/game/ui/PlaytestOverlay.cs" id="40_m4url"] -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a6jk1"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_05nbr"] resource_name = "Material" transparency = 1 shading_mode = 0 @@ -52,10 +52,10 @@ albedo_texture = ExtResource("2_q78ea") texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_aih2q"] -material = SubResource("StandardMaterial3D_a6jk1") +material = SubResource("StandardMaterial3D_05nbr") size = Vector2(4, 4) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lvhmj"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0sl42"] transparency = 1 shading_mode = 0 disable_ambient_light = true @@ -66,7 +66,7 @@ texture_repeat = false distance_fade_min_distance = 1076.07 [sub_resource type="QuadMesh" id="QuadMesh_xij4d"] -material = SubResource("StandardMaterial3D_lvhmj") +material = SubResource("StandardMaterial3D_0sl42") size = Vector2(0.263, 0.263) [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ssr8x"] @@ -78,14 +78,14 @@ vertex_color_use_as_albedo = true vertex_color_is_srgb = true albedo_texture = ExtResource("13_6rhgc") -[sub_resource type="QuadMesh" id="QuadMesh_5p2n8"] +[sub_resource type="QuadMesh" id="QuadMesh_458eo"] [sub_resource type="MultiMesh" id="MultiMesh_e28va"] transform_format = 1 use_colors = true -mesh = SubResource("QuadMesh_5p2n8") +mesh = SubResource("QuadMesh_458eo") -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_05nbr"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_h3rex"] resource_name = "Material" transparency = 1 shading_mode = 0 @@ -93,18 +93,18 @@ albedo_texture = ExtResource("12_pr1ej") texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_0sl42"] -material = SubResource("StandardMaterial3D_05nbr") +material = SubResource("StandardMaterial3D_h3rex") size = Vector2(4, 4) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rc4du"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fedci"] transparency = 1 shading_mode = 0 albedo_texture = ExtResource("36_05nbr") [sub_resource type="QuadMesh" id="QuadMesh_oaba0"] -material = SubResource("StandardMaterial3D_rc4du") +material = SubResource("StandardMaterial3D_fedci") -[sub_resource type="ViewportTexture" id="ViewportTexture_pl11u"] +[sub_resource type="ViewportTexture" id="ViewportTexture_qkpxi"] viewport_path = NodePath("Runner/HUD/Health/HealthViewport") [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4p8vu"] @@ -112,7 +112,7 @@ resource_local_to_scene = true transparency = 1 shading_mode = 0 disable_fog = true -albedo_texture = SubResource("ViewportTexture_pl11u") +albedo_texture = SubResource("ViewportTexture_qkpxi") texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_b1hbo"] @@ -120,7 +120,7 @@ resource_local_to_scene = true material = SubResource("StandardMaterial3D_4p8vu") size = Vector2(10.88, 0.8) -[sub_resource type="ViewportTexture" id="ViewportTexture_sww3w"] +[sub_resource type="ViewportTexture" id="ViewportTexture_tel4y"] viewport_path = NodePath("Runner/HUD/PanelLeft/PanelLeftViewport") [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nody0"] @@ -128,7 +128,7 @@ resource_local_to_scene = true transparency = 1 shading_mode = 0 disable_fog = true -albedo_texture = SubResource("ViewportTexture_sww3w") +albedo_texture = SubResource("ViewportTexture_tel4y") texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_ssyve"] @@ -158,7 +158,7 @@ font_size = 50 font = ExtResource("21_05nbr") font_size = 50 -[sub_resource type="ViewportTexture" id="ViewportTexture_suyxu"] +[sub_resource type="ViewportTexture" id="ViewportTexture_5q0nq"] viewport_path = NodePath("Runner/HUD/PanelRight/PanelRightViewport") [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ro5ir"] @@ -166,7 +166,7 @@ resource_local_to_scene = true transparency = 1 shading_mode = 0 disable_fog = true -albedo_texture = SubResource("ViewportTexture_suyxu") +albedo_texture = SubResource("ViewportTexture_5q0nq") texture_repeat = false [sub_resource type="LabelSettings" id="LabelSettings_5bid2"] @@ -189,7 +189,7 @@ font_size = 50 [sub_resource type="ShaderMaterial" id="ShaderMaterial_gc8yu"] shader = ExtResource("14_3xchs") -[sub_resource type="ViewportTexture" id="ViewportTexture_bhx41"] +[sub_resource type="ViewportTexture" id="ViewportTexture_dgi5k"] viewport_path = NodePath("Runner/HUD/ProgressBar/ProgressBarViewport") [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p1h21"] @@ -197,7 +197,7 @@ resource_local_to_scene = true transparency = 1 shading_mode = 0 disable_fog = true -albedo_texture = SubResource("ViewportTexture_bhx41") +albedo_texture = SubResource("ViewportTexture_dgi5k") texture_repeat = false [sub_resource type="QuadMesh" id="QuadMesh_7mook"] @@ -281,12 +281,13 @@ CursorManager = NodePath("CursorManager") UseGameSpace = true AddSpaceAsChild = true -[node name="CursorManager" type="Node" parent="." unique_id=862696440 node_paths=PackedStringArray("runner", "playerInputController", "replayManager", "cursorMesh", "camera")] +[node name="CursorManager" type="Node" parent="." unique_id=862696440 node_paths=PackedStringArray("runner", "playerInputController", "replayManager", "cursorMesh", "bufferCursor", "camera")] script = ExtResource("2_nepv3") runner = NodePath("../Runner") playerInputController = NodePath("../PlayerInputController") replayManager = NodePath("../ReplayManager") cursorMesh = NodePath("../Runner/HUD/Grid/Cursor") +bufferCursor = NodePath("../Runner/HUD/Grid/BufferCursor") camera = NodePath("../Runner/Camera3D") [node name="TrailRenderer" type="Node" parent="CursorManager" unique_id=2058712869 node_paths=PackedStringArray("cursor", "cursorTrail", "runner")] @@ -325,6 +326,12 @@ script = ExtResource("27_js0lu") mesh = SubResource("QuadMesh_xij4d") skeleton = NodePath("../../../..") +[node name="BufferCursor" type="MeshInstance3D" parent="Runner/HUD/Grid" unique_id=703771191] +visible = false +transparency = 1.0 +mesh = SubResource("QuadMesh_xij4d") +skeleton = NodePath("../../..") + [node name="CursorTrail" type="MultiMeshInstance3D" parent="Runner/HUD/Grid" unique_id=913051903] material_override = SubResource("StandardMaterial3D_ssr8x") multimesh = SubResource("MultiMesh_e28va") @@ -405,9 +412,9 @@ anchor_top = 0.65 anchor_right = 0.5 anchor_bottom = 0.65 offset_left = -128.0 -offset_top = -128.0 +offset_top = -166.25 offset_right = 128.0 -offset_bottom = 128.0 +offset_bottom = 89.75128 theme_override_styles/panel = SubResource("StyleBoxFlat_56f8v") [node name="Score" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=1330190508] @@ -416,10 +423,10 @@ anchor_left = 0.5 anchor_top = 0.35 anchor_right = 0.5 anchor_bottom = 0.35 -offset_left = -14.5 -offset_top = -28.5 -offset_right = 14.5 -offset_bottom = 28.5 +offset_left = -15.0 +offset_top = -34.5 +offset_right = 15.0 +offset_bottom = 34.500122 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("4_rvp5o") @@ -433,6 +440,10 @@ anchor_left = 0.5 anchor_top = 0.65 anchor_right = 0.5 anchor_bottom = 0.65 +offset_left = -28.5 +offset_top = -71.25 +offset_right = 28.5 +offset_bottom = -2.2499695 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("4_rvp5o") @@ -441,16 +452,15 @@ label_settings = SubResource("LabelSettings_pr1ej") horizontal_alignment = 1 [node name="ComboCount" type="Label" parent="Runner/HUD/PanelLeft/PanelLeftViewport" unique_id=531787894] -visible = false anchors_preset = -1 anchor_left = 0.5 anchor_top = 0.86 anchor_right = 0.5 anchor_bottom = 0.86 offset_left = -90.0 -offset_top = -18.0 +offset_top = -34.5 offset_right = 90.0 -offset_bottom = 18.0 +offset_bottom = 34.5 grow_horizontal = 2 grow_vertical = 2 text = "0" diff --git a/scenes/main.tscn b/scenes/main.tscn index 02c331f3..aabb6a1c 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -8,8 +8,29 @@ [ext_resource type="Texture2D" uid="uid://men3chmi3esy" path="res://textures/ui/add.png" id="6_ya4ey"] [ext_resource type="Shader" uid="uid://rngh60dyh10b" path="res://scripts/shaders/outline.gdshader" id="7_eb6dy"] [ext_resource type="Texture2D" uid="uid://3e1tjlr4m0wt" path="res://user/skins/default/game/cursor.png" id="8_85g3d"] +[ext_resource type="Texture2D" uid="uid://b3g4aw54n6bow" path="res://user/skins/default/game/grid.png" id="8_dgi5k"] +[ext_resource type="Script" uid="uid://nwvon7h1bvhc" path="res://scripts/ui/menu/SkinPreview/TitlePreview.cs" id="9_5q0nq"] [ext_resource type="Script" uid="uid://carutkgoqpr4e" path="res://scripts/ui/MenuCursor.cs" id="9_choun"] [ext_resource type="Script" uid="uid://bmq7ajx48l7ng" path="res://scripts/ui/FPSCounter.cs" id="10_choun"] +[ext_resource type="Script" uid="uid://bxshhmy8fg6nh" path="res://scripts/ui/menu/SkinPreview/PanelLeftPreview.cs" id="10_qkpxi"] +[ext_resource type="Texture2D" uid="uid://dw2gxd3m24h4m" path="res://user/skins/default/game/hits.png" id="11_kmb1v"] +[ext_resource type="Texture2D" uid="uid://ccdaf14yq65jf" path="res://user/skins/default/game/grid_guides.png" id="12_fuf3a"] +[ext_resource type="Texture2D" uid="uid://bc0w1ujoshiyk" path="res://user/skins/default/game/visibility_assist.png" id="13_pibwh"] +[ext_resource type="Texture2D" uid="uid://cxv6ey5xb6b0f" path="res://user/skins/default/game/health_background.png" id="15_5he1u"] +[ext_resource type="Script" uid="uid://cv27mk2qd18i2" path="res://scripts/ui/menu/SkinPreview/PanelRightPreview.cs" id="15_dgi5k"] +[ext_resource type="Texture2D" uid="uid://4x2vfpyjkri6" path="res://user/skins/default/game/health.png" id="16_5poiv"] +[ext_resource type="Texture2D" uid="uid://80bitp5weqrb" path="res://user/skins/default/game/panel_left_background.png" id="18_chjal"] +[ext_resource type="Shader" uid="uid://bx4888tau78tk" path="res://scripts/shaders/combo_progress.gdshader" id="19_cjqg0"] +[ext_resource type="Script" uid="uid://c3xaw5hps8bel" path="res://scripts/ui/menu/SkinPreview/ProgressBarPreview.cs" id="20_j8jky"] +[ext_resource type="FontFile" uid="uid://dhyog1pif7c5i" path="res://fonts/Nunito/Nunito-Bold.ttf" id="20_vchkt"] +[ext_resource type="FontFile" uid="uid://b0ru0lfde5a21" path="res://fonts/Nunito/Nunito-SemiBold.ttf" id="21_txyw0"] +[ext_resource type="Texture2D" uid="uid://diba7c3s8as4s" path="res://user/skins/default/game/panel_right_background.png" id="23_nvyfr"] +[ext_resource type="Script" uid="uid://cfavwgar504b0" path="res://scripts/ui/menu/SkinPreview/HealthBarPreview.cs" id="24_kmb1v"] +[ext_resource type="Texture2D" uid="uid://c3x2cp3tx4vqt" path="res://user/skins/default/game/misses.png" id="24_ty1g6"] +[ext_resource type="Shader" uid="uid://bp2sv5ynsubi2" path="res://scripts/shaders/alpha_gradient.gdshader" id="25_j2jfr"] +[ext_resource type="Script" uid="uid://c0of2i2mjcd3r" path="res://scripts/ui/menu/SkinPreview/GridPreview.cs" id="28_fuf3a"] +[ext_resource type="Texture2D" uid="uid://dmc5f6ajp8xv1" path="res://user/skins/default/game/progress_background.png" id="28_o7ddy"] +[ext_resource type="Texture2D" uid="uid://d3s17ehomjscd" path="res://user/skins/default/game/progress.png" id="29_0loja"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1q06g"] bg_color = Color(0, 0, 0, 0.8784314) @@ -104,6 +125,187 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tel4y"] +bg_color = Color(0.16565639, 0.16565642, 0.16565639, 0.8784314) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0, 0, 0, 0.6) +corner_radius_top_left = 12 +corner_radius_top_right = 12 +corner_radius_bottom_right = 12 +corner_radius_bottom_left = 12 + +[sub_resource type="ViewportTexture" id="ViewportTexture_152kg"] +viewport_path = NodePath("Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_r4e17"] +resource_local_to_scene = true +transparency = 1 +shading_mode = 0 +disable_fog = true +albedo_texture = SubResource("ViewportTexture_152kg") +texture_repeat = false + +[sub_resource type="QuadMesh" id="QuadMesh_tel4y"] +size = Vector2(4, 10) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mlv25"] +shader = ExtResource("19_cjqg0") +shader_parameter/progress = 0.8870000421325 +shader_parameter/colour = Color(1, 1, 1, 1) +shader_parameter/background_colour = Color(0.155, 0.155, 0.155, 1) +shader_parameter/sides = 8 +shader_parameter/thickness = 3.0 +shader_parameter/size = 1.0 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a82wo"] +bg_color = Color(0, 0, 0, 0) + +[sub_resource type="LabelSettings" id="LabelSettings_gdvew"] +font = ExtResource("20_vchkt") +font_size = 50 + +[sub_resource type="LabelSettings" id="LabelSettings_kjtvk"] +font = ExtResource("21_txyw0") +font_size = 50 + +[sub_resource type="LabelSettings" id="LabelSettings_xrs0c"] +font = ExtResource("21_txyw0") +font_size = 50 + +[sub_resource type="ViewportTexture" id="ViewportTexture_fp3uj"] +viewport_path = NodePath("Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j4bwh"] +resource_local_to_scene = true +transparency = 1 +shading_mode = 0 +disable_fog = true +albedo_texture = SubResource("ViewportTexture_fp3uj") +texture_repeat = false + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qkpxi"] + +[sub_resource type="QuadMesh" id="QuadMesh_y57op"] +material = SubResource("StandardMaterial3D_qkpxi") +size = Vector2(4, 10) + +[sub_resource type="LabelSettings" id="LabelSettings_ksmap"] +font = ExtResource("21_txyw0") +font_size = 30 + +[sub_resource type="LabelSettings" id="LabelSettings_ygd8o"] +font = ExtResource("21_txyw0") +font_size = 30 + +[sub_resource type="LabelSettings" id="LabelSettings_2s0kr"] +font = ExtResource("21_txyw0") +font_size = 50 +font_color = Color(1, 1, 1, 0.768627) + +[sub_resource type="LabelSettings" id="LabelSettings_xaipn"] +font = ExtResource("21_txyw0") +font_size = 50 + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ndrjj"] +shader = ExtResource("25_j2jfr") + +[sub_resource type="ViewportTexture" id="ViewportTexture_rc4du"] +viewport_path = NodePath("Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar/ProgressBarViewport") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_11yus"] +resource_local_to_scene = true +transparency = 1 +shading_mode = 0 +disable_fog = true +albedo_texture = SubResource("ViewportTexture_rc4du") +texture_repeat = false + +[sub_resource type="QuadMesh" id="QuadMesh_b6ruc"] +resource_local_to_scene = true +material = SubResource("StandardMaterial3D_11yus") +size = Vector2(10.88, 0.8) + +[sub_resource type="ViewportTexture" id="ViewportTexture_od4ux"] +viewport_path = NodePath("Settings/SkinPreviewPanel/SkinPreview/SubViewport/Health/HealthViewport") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xhfw6"] +resource_local_to_scene = true +transparency = 1 +shading_mode = 0 +disable_fog = true +albedo_texture = SubResource("ViewportTexture_od4ux") +texture_repeat = false + +[sub_resource type="QuadMesh" id="QuadMesh_1epgm"] +resource_local_to_scene = true +material = SubResource("StandardMaterial3D_xhfw6") +size = Vector2(10.88, 0.8) + +[sub_resource type="Environment" id="Environment_gdxgs"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a6jk1"] +resource_name = "Material" +transparency = 1 +shading_mode = 0 +albedo_texture = ExtResource("8_dgi5k") +texture_repeat = false + +[sub_resource type="QuadMesh" id="QuadMesh_augu2"] +material = SubResource("StandardMaterial3D_a6jk1") +size = Vector2(4, 4) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lvhmj"] +transparency = 1 +shading_mode = 0 +disable_ambient_light = true +disable_fog = true +albedo_texture = ExtResource("8_85g3d") +texture_filter = 5 +texture_repeat = false +distance_fade_min_distance = 1076.07 + +[sub_resource type="QuadMesh" id="QuadMesh_tm6hj"] +material = SubResource("StandardMaterial3D_lvhmj") +size = Vector2(0.263, 0.263) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kf5aa"] +transparency = 1 +cull_mode = 2 +shading_mode = 0 +disable_fog = true +vertex_color_use_as_albedo = true +vertex_color_is_srgb = true +albedo_texture = ExtResource("11_kmb1v") + +[sub_resource type="QuadMesh" id="QuadMesh_5p2n8"] + +[sub_resource type="MultiMesh" id="MultiMesh_t5ykj"] +transform_format = 1 +use_colors = true +mesh = SubResource("QuadMesh_5p2n8") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_05nbr"] +resource_name = "Material" +transparency = 1 +shading_mode = 0 +albedo_texture = ExtResource("12_fuf3a") +texture_repeat = false + +[sub_resource type="QuadMesh" id="QuadMesh_e755i"] +material = SubResource("StandardMaterial3D_05nbr") +size = Vector2(4, 4) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rc4du"] +transparency = 1 +shading_mode = 0 +albedo_texture = ExtResource("13_pibwh") + +[sub_resource type="QuadMesh" id="QuadMesh_ro3en"] +material = SubResource("StandardMaterial3D_rc4du") + [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_o6xl0"] [sub_resource type="LabelSettings" id="LabelSettings_tipki"] @@ -132,7 +334,6 @@ size = Vector2i(1280, 720) render_target_update_mode = 4 [node name="Settings" type="ColorRect" parent="." unique_id=1393582030 node_paths=PackedStringArray("ImportNightlyDialog", "UserFolderDialog")] -visible = false z_index = 1 anchors_preset = 15 anchor_right = 1.0 @@ -161,8 +362,13 @@ layout_mode = 1 anchors_preset = -1 anchor_left = 0.25 anchor_top = 0.25 -anchor_right = 0.75 -anchor_bottom = 0.75 +anchor_right = 0.75000006 +anchor_bottom = 0.75000006 +offset_right = -6.1035156e-05 +offset_bottom = -6.1035156e-05 +grow_horizontal = 2 +grow_vertical = 2 +offset_transform_visual_only = false theme = ExtResource("3_tipki") theme_override_styles/panel = SubResource("StyleBoxFlat_1q06g") @@ -327,6 +533,58 @@ theme = ExtResource("3_tipki") theme_override_colors/font_color = Color(1, 1, 1, 1) text = "Button" +[node name="PickerHide" type="Button" parent="Settings/Holder/Categories/CategoryTemplate/Container/SettingTemplate" unique_id=787866892] +self_modulate = Color(1, 1, 1, 0) +top_level = true +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -3.0 +offset_right = 4.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +action_mode = 0 +button_mask = 3 + +[node name="ColorButton" type="Button" parent="Settings/Holder/Categories/CategoryTemplate/Container/SettingTemplate" unique_id=84045289] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.8 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 8.0 +offset_top = 4.0 +offset_bottom = -4.0 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 0.0 +theme_override_font_sizes/font_size = 12 +text = "Pick Color" +clip_text = true + +[node name="ColorPicker" type="ColorPicker" parent="Settings/Holder/Categories/CategoryTemplate/Container/SettingTemplate" unique_id=1549088178] +top_level = true +z_index = 1 +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.553 +anchor_top = 0.33 +anchor_right = 0.67 +anchor_bottom = 0.362 +offset_right = 70.0 +offset_bottom = 422.0 +grow_horizontal = 0 +grow_vertical = 2 +scale = Vector2(0.75, 0.75) +mouse_filter = 0 +edit_alpha = false +edit_intensity = false +deferred_mode = true +color_modes_visible = false +presets_visible = false + [node name="Sidebar" type="ScrollContainer" parent="Settings/Holder" unique_id=1655790017] layout_mode = 1 anchors_preset = -1 @@ -381,6 +639,30 @@ text = "SETTINGS" label_settings = SubResource("LabelSettings_osuri") vertical_alignment = 1 +[node name="RefreshSkinPreview" type="Button" parent="Settings/Holder/Header" unique_id=693048162] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.27800003 +anchor_top = 0.15 +anchor_right = 0.48600003 +anchor_bottom = 0.9250001 +offset_left = 0.07998657 +offset_right = -0.040008545 +theme = ExtResource("3_tipki") +text = "Refresh Preview" + +[node name="ShowSkinPreview" type="Button" parent="Settings/Holder/Header" unique_id=558443082] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.499 +anchor_top = 0.15 +anchor_right = 0.75500005 +anchor_bottom = 0.9250001 +offset_left = -0.1000061 +offset_right = -11.940033 +theme = ExtResource("3_tipki") +text = "Toggle Skin Preview" + [node name="Profiles" type="OptionButton" parent="Settings/Holder/Header" unique_id=716644348] layout_mode = 1 anchors_preset = -1 @@ -441,7 +723,7 @@ caret_blink = true [node name="Outline" type="Panel" parent="Settings/Holder" unique_id=1227163057] material = SubResource("ShaderMaterial_3poq1") layout_mode = 1 -anchors_preset = 15 +anchors_preset = -1 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 @@ -462,6 +744,413 @@ file_mode = 2 access = 2 use_native_dialog = true +[node name="SkinPreviewPanel" type="Panel" parent="Settings" unique_id=499692920] +visible = false +modulate = Color(1, 1, 1, 0) +light_mask = 512 +visibility_layer = 512 +z_index = 1 +z_as_relative = false +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.55200005 +anchor_top = 0.279 +anchor_right = 0.919 +anchor_bottom = 0.72400004 +offset_left = -0.5600586 +offset_top = 0.11999512 +offset_right = 0.34692383 +offset_bottom = -0.2800293 +offset_transform_enabled = true +offset_transform_pivot_ratio = Vector2(1, 1) +offset_transform_visual_only = false +focus_behavior_recursive = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_tel4y") + +[node name="Label" type="Label" parent="Settings/SkinPreviewPanel" unique_id=742694072] +z_index = 3 +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = -1.0 +offset_top = -12.0 +offset_right = -1.0 +offset_bottom = 11.0 +grow_horizontal = 2 +text = "SKIN PREVIEW" +horizontal_alignment = 1 + +[node name="SkinPreview" type="SubViewportContainer" parent="Settings/SkinPreviewPanel" unique_id=2122293191] +z_index = 2 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +stretch = true + +[node name="SubViewport" type="SubViewport" parent="Settings/SkinPreviewPanel/SkinPreview" unique_id=732895320] +own_world_3d = true +transparent_bg = true +handle_input_locally = false +msaa_3d = 1 +scaling_3d_scale = 1.5 +anisotropic_filtering_level = 1 +size = Vector2i(470, 320) +render_target_update_mode = 0 + +[node name="Combo" type="Node3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=385833504] + +[node name="Label" type="Label3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Combo" unique_id=372830576] +transform = Transform3D(7, 0, 0, 0, 6.89365, -1.21554, 0, 1.21554, 6.89365, 0, 3.5, -10) +pixel_size = 0.0025 +modulate = Color(1, 1, 1, 0) +outline_modulate = Color(1, 1, 1, 0.39215687) +text = "999" +font = ExtResource("5_choun") +font_size = 64 +outline_size = 4 + +[node name="Title" type="Node3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=840531691] +script = ExtResource("9_5q0nq") + +[node name="Label" type="Label3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Title" unique_id=2059982806] +transform = Transform3D(2, 0, 0, 0, 1.93185, -0.517638, 0, 0.517638, 1.93185, 0, 8.25, -10) +outline_modulate = Color(0, 0, 0, 0) +text = "N/A - N/A" +font = ExtResource("20_vchkt") +font_size = 64 +autowrap_mode = 3 +width = 2500.0 + +[node name="PanelLeft" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=1497917243] +transform = Transform3D(0.984808, 0, 0.173648, 0, 0.99999994, 0, -0.173648, 0, 0.98480797, -7.5, 9.536743e-07, -9.000001) +material_override = SubResource("StandardMaterial3D_r4e17") +mesh = SubResource("QuadMesh_tel4y") +script = ExtResource("10_qkpxi") + +[node name="PanelLeftViewport" type="SubViewport" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft" unique_id=1517733272] +disable_3d = true +transparent_bg = true +size = Vector2i(250, 625) + +[node name="Background" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport" unique_id=1252591779] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("18_chjal") + +[node name="MultiplierProgress" type="Panel" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport" unique_id=403597694] +clip_children = 2 +material = SubResource("ShaderMaterial_mlv25") +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.65 +anchor_right = 0.5 +anchor_bottom = 0.65 +offset_left = -128.0 +offset_top = -166.25 +offset_right = 128.0 +offset_bottom = 89.75128 +theme_override_styles/panel = SubResource("StyleBoxFlat_a82wo") + +[node name="Score" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport" unique_id=117882971] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.35 +anchor_right = 0.5 +anchor_bottom = 0.35 +offset_left = -30.0 +offset_top = -34.5 +offset_right = 30.0 +offset_bottom = 34.500122 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("3_tipki") +text = "0" +label_settings = SubResource("LabelSettings_gdvew") +horizontal_alignment = 1 + +[node name="Multiplier" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport" unique_id=1512976271] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.65 +anchor_right = 0.5 +anchor_bottom = 0.65 +offset_left = -28.5 +offset_top = -71.25 +offset_right = 28.5 +offset_bottom = -2.2499695 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("3_tipki") +text = "1x" +label_settings = SubResource("LabelSettings_kjtvk") +horizontal_alignment = 1 + +[node name="ComboCount" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelLeft/PanelLeftViewport" unique_id=132983092] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.86 +anchor_right = 0.5 +anchor_bottom = 0.86 +offset_left = -90.0 +offset_top = -34.5 +offset_right = 90.0 +offset_bottom = 34.5 +grow_horizontal = 2 +grow_vertical = 2 +text = "0" +label_settings = SubResource("LabelSettings_xrs0c") +horizontal_alignment = 1 + +[node name="PanelRight" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=1186413604] +transform = Transform3D(0.984808, 0, -0.173648, 0, 1, 0, 0.173648, 0, 0.984808, 7.5, 0, -9) +material_override = SubResource("StandardMaterial3D_j4bwh") +mesh = SubResource("QuadMesh_y57op") +script = ExtResource("15_dgi5k") + +[node name="PanelRightViewport" type="SubViewport" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight" unique_id=353250979] +process_mode = 3 +disable_3d = true +transparent_bg = true +canvas_item_default_texture_filter = 2 +size = Vector2i(250, 625) + +[node name="Background" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=519398642] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("23_nvyfr") + +[node name="Accuracy" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=1917390646] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.35 +anchor_right = 0.5 +anchor_bottom = 0.35 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("3_tipki") +text = "100.00%" +label_settings = SubResource("LabelSettings_gdvew") +horizontal_alignment = 1 + +[node name="Hits" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=163179924] +modulate = Color(1, 1, 1, 0.627451) +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.625 +anchor_right = 0.5 +anchor_bottom = 0.625 +offset_right = -25.0 +offset_bottom = -4.0 +grow_horizontal = 0 +grow_vertical = 2 +size_flags_horizontal = 4 +theme = ExtResource("3_tipki") +text = "0" +label_settings = SubResource("LabelSettings_ksmap") +horizontal_alignment = 2 + +[node name="Misses" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=1997376473] +modulate = Color(1, 1, 1, 0.627451) +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.625 +anchor_right = 0.5 +anchor_bottom = 0.625 +offset_left = 25.0 +offset_bottom = -4.0 +grow_vertical = 2 +size_flags_horizontal = 4 +theme = ExtResource("3_tipki") +text = "0" +label_settings = SubResource("LabelSettings_ygd8o") + +[node name="SimpleMisses" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=678419666] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +theme = ExtResource("3_tipki") +text = "0" +label_settings = SubResource("LabelSettings_2s0kr") + +[node name="Sum" type="Label" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=1801663974] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.7 +anchor_right = 0.5 +anchor_bottom = 0.7 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 4 +theme = ExtResource("3_tipki") +text = "0" +label_settings = SubResource("LabelSettings_xaipn") +horizontal_alignment = 1 + +[node name="HitsIcon" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=744614831] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.625 +anchor_right = 0.5 +anchor_bottom = 0.625 +offset_top = -12.0 +offset_right = -2.0 +offset_bottom = 7.0 +grow_horizontal = 0 +grow_vertical = 2 +theme = ExtResource("3_tipki") +texture = ExtResource("11_kmb1v") +expand_mode = 2 + +[node name="MissesIcon" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=350489808] +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 0.625 +anchor_right = 0.5 +anchor_bottom = 0.625 +offset_left = 2.0 +offset_top = -12.0 +offset_bottom = 7.0 +grow_vertical = 2 +theme = ExtResource("3_tipki") +texture = ExtResource("24_ty1g6") +expand_mode = 2 + +[node name="Line" type="ColorRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/PanelRight/PanelRightViewport" unique_id=282594885] +material = SubResource("ShaderMaterial_ndrjj") +anchors_preset = -1 +anchor_top = 0.65 +anchor_right = 1.0 +anchor_bottom = 0.65 +offset_left = 16.0 +offset_right = -16.0 +offset_bottom = 2.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="ProgressBar" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=2054063058] +transform = Transform3D(1, -3.7252903e-09, 0, 0, 0.965926, -0.258819, 1.4901161e-08, 0.258819, 0.965926, 4.7683716e-07, 6.3, -10) +cast_shadow = 0 +mesh = SubResource("QuadMesh_b6ruc") +script = ExtResource("20_j8jky") + +[node name="Progress" type="Node3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar" unique_id=734363712] +transform = Transform3D(1, 0, 0, 0, 0.96592563, 0.25881892, 0, -0.25881892, 0.96592563, 0, -3.4971423, 11.289815) + +[node name="Label" type="Label3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar/Progress" unique_id=72322109] +transform = Transform3D(3.5, 0, 0, 0, 3.38074, -0.905867, 0, 0.905867, 3.38074, 0, 7, -10) +pixel_size = 0.0025 +modulate = Color(1, 1, 1, 0.74509805) +outline_modulate = Color(0, 0, 0, 0) +text = "0:00 / 0:00" +font = ExtResource("21_txyw0") +font_size = 64 + +[node name="ProgressBarViewport" type="SubViewport" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar" unique_id=992979397] +disable_3d = true +transparent_bg = true +canvas_item_default_texture_filter = 2 +size = Vector2i(544, 40) +size_2d_override = Vector2i(1088, 80) +size_2d_override_stretch = true +render_target_update_mode = 4 + +[node name="Background" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar/ProgressBarViewport" unique_id=204557992] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("28_o7ddy") + +[node name="Main" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/ProgressBar/ProgressBarViewport" unique_id=242643232] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("29_0loja") +expand_mode = 1 +stretch_mode = 1 + +[node name="Health" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=1898914194] +transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, -6.3, -10) +cast_shadow = 0 +mesh = SubResource("QuadMesh_1epgm") +script = ExtResource("24_kmb1v") + +[node name="HealthViewport" type="SubViewport" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Health" unique_id=1286049907] +disable_3d = true +transparent_bg = true +canvas_item_default_texture_filter = 2 +size = Vector2i(544, 40) +size_2d_override = Vector2i(1088, 80) +size_2d_override_stretch = true +render_target_update_mode = 4 + +[node name="Background" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Health/HealthViewport" unique_id=1346647656] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("15_5he1u") + +[node name="Main" type="TextureRect" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Health/HealthViewport" unique_id=94707981] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("16_5poiv") +expand_mode = 1 +stretch_mode = 1 + +[node name="Camera3D" type="Camera3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=1275593072] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3.75) +environment = SubResource("Environment_gdxgs") +current = true +fov = 70.0 +size = 5.0 + +[node name="Grid" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport" unique_id=379266135] +mesh = SubResource("QuadMesh_augu2") +script = ExtResource("28_fuf3a") + +[node name="Cursor" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Grid" unique_id=1140205940] +mesh = SubResource("QuadMesh_tm6hj") +skeleton = NodePath("../..") + +[node name="CursorTrail" type="MultiMeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Grid" unique_id=1031907347] +material_override = SubResource("StandardMaterial3D_kf5aa") +multimesh = SubResource("MultiMesh_t5ykj") + +[node name="GridGuides" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Grid" unique_id=880461795] +transform = Transform3D(1.01, 0, 0, 0, 1.01, 0, 0, 0, 1.01, 0, 0, -0.2) +visible = false +mesh = SubResource("QuadMesh_e755i") +skeleton = NodePath("../..") + +[node name="VisibilityAssist" type="MeshInstance3D" parent="Settings/SkinPreviewPanel/SkinPreview/SubViewport/Grid" unique_id=2848380] +transform = Transform3D(300, 0, 0, 0, 300, 0, 0, 0, 300, 0, 0, -140) +transparency = 0.25 +mesh = SubResource("QuadMesh_ro3en") +skeleton = NodePath("") + [node name="Volume" type="Panel" parent="." unique_id=1219254705] modulate = Color(1, 1, 1, 0) z_index = 1 diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index cf30d5cd..c132aad3 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -54,7 +54,10 @@ [ext_resource type="Texture2D" uid="uid://cfl8us0rpkpqs" path="res://textures/ui/github_hovered.png" id="43_sgh51"] [ext_resource type="Script" uid="uid://c1235cyjfh4rl" path="res://scripts/ui/LinkPopupButton.cs" id="44_ybca7"] [ext_resource type="Script" uid="uid://dqi64p5jl23cv" path="res://scripts/ui/menu/VersionLabel.cs" id="45_mb34c"] +[ext_resource type="Texture2D" uid="uid://dyms3l4x385j" path="res://textures/ui/feedback.png" id="46_41a2d"] +[ext_resource type="Texture2D" uid="uid://c0gv3fh2rmlcy" path="res://textures/ui/feedback_pressed.png" id="47_f5cck"] [ext_resource type="Texture2D" uid="uid://8du82a5dxjdk" path="res://user/skins/default/ui/jukebox_play.png" id="48_q1l3m"] +[ext_resource type="Texture2D" uid="uid://cya1kdxwisvmc" path="res://textures/ui/feedback_hovered.png" id="48_s4ogs"] [ext_resource type="Texture2D" uid="uid://bpsvcunhigs6c" path="res://user/skins/default/ui/jukebox_skip.png" id="49_7u5pb"] [sub_resource type="SystemFont" id="SystemFont_lsskb"] @@ -754,9 +757,11 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_18lcc") [node name="HBoxContainer" type="HBoxContainer" parent="Menus/Play/SubTopBar" unique_id=613796792] layout_mode = 1 anchors_preset = -1 -anchor_top = 0.5 +anchor_top = 0.179 anchor_right = 1.0 -anchor_bottom = 0.5 +anchor_bottom = 0.82100004 +offset_top = 17.976 +offset_bottom = -17.976002 grow_horizontal = 2 grow_vertical = 2 alignment = 2 @@ -764,7 +769,7 @@ alignment = 2 [node name="Settings" type="Button" parent="Menus/Play/SubTopBar/HBoxContainer" unique_id=384311335] custom_minimum_size = Vector2(0, 36) layout_mode = 2 -tooltip_text = "CTRL + O" +tooltip_text = "Game settings, can be opened up at anytime using CTRL + O" focus_mode = 0 mouse_default_cursor_shape = 2 theme = ExtResource("6_engjn") @@ -776,6 +781,7 @@ script = ExtResource("8_yxnar") [node name="UserFolder" type="Button" parent="Menus/Play/SubTopBar/HBoxContainer" unique_id=1212420658] custom_minimum_size = Vector2(0, 36) layout_mode = 2 +tooltip_text = "Opens up the game's user folder, allows you to manually import or modify files." focus_mode = 0 mouse_default_cursor_shape = 2 theme = ExtResource("6_engjn") @@ -787,6 +793,7 @@ script = ExtResource("27_eku7s") [node name="Import" type="Button" parent="Menus/Play/SubTopBar/HBoxContainer" unique_id=554381373] custom_minimum_size = Vector2(0, 36) layout_mode = 2 +tooltip_text = "Import maps, you can mass import with this" focus_mode = 0 mouse_default_cursor_shape = 2 theme = ExtResource("6_engjn") @@ -1727,15 +1734,6 @@ text = "[font_size=20]nyarw" fit_content = true horizontal_alignment = 1 -[node name="lulusuki" type="RichTextLabel" parent="Menus/Extras/Contributors/ScrollContainer/VBoxContainer" unique_id=1649530311] -modulate = Color(1, 0.7411765, 1, 1) -layout_mode = 2 -mouse_filter = 1 -bbcode_enabled = true -text = "[font_size=20]lulusuki" -fit_content = true -horizontal_alignment = 1 - [node name="noobour" type="RichTextLabel" parent="Menus/Extras/Contributors/ScrollContainer/VBoxContainer" unique_id=1684835200] modulate = Color(0.05882353, 0.5058824, 0.7176471, 1) layout_mode = 2 @@ -1911,9 +1909,32 @@ grow_horizontal = 2 grow_vertical = 2 alignment = 2 +[node name="Feedback" type="TextureButton" parent="TopBar/LinkButtons" unique_id=169604797] +layout_mode = 2 +size_flags_vertical = 4 +tooltip_text = "Feedback form" +focus_mode = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("46_41a2d") +texture_pressed = ExtResource("47_f5cck") +texture_hover = ExtResource("48_s4ogs") + +[node name="Button" type="Button" parent="TopBar/LinkButtons/Feedback" unique_id=1650047982] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 +flat = true +script = ExtResource("44_ybca7") +Link = "https://forms.gle/eyGTBKJskSmAux8P8" + [node name="GitHub" type="TextureButton" parent="TopBar/LinkButtons" unique_id=1795081095] layout_mode = 2 size_flags_vertical = 4 +tooltip_text = "Our GitHub page" focus_mode = 0 mouse_default_cursor_shape = 2 texture_normal = ExtResource("41_akqfu") @@ -1935,6 +1956,7 @@ Link = "https://github.com/Rhythia" [node name="Discord" type="TextureButton" parent="TopBar/LinkButtons" unique_id=36147158] layout_mode = 2 size_flags_vertical = 4 +tooltip_text = "Our official Discord" focus_mode = 0 mouse_default_cursor_shape = 2 texture_normal = ExtResource("20_qw82i") diff --git a/scripts/KeybindsManager.cs b/scripts/KeybindsManager.cs index 6708caf1..45f6919d 100644 --- a/scripts/KeybindsManager.cs +++ b/scripts/KeybindsManager.cs @@ -42,9 +42,9 @@ public override void _Input(InputEvent @event) { if (eventKey.Keycode == Key.F11 || (eventKey.AltPressed && (eventKey.Keycode == Key.Enter || eventKey.Keycode == Key.KpEnter))) { - bool value = DisplayServer.WindowGetMode() == DisplayServer.WindowMode.Windowed; + bool windowed = DisplayServer.WindowGetMode() == DisplayServer.WindowMode.Windowed; - settings.Fullscreen.Value = value; + settings.WindowMode.Value = (windowed ? WindowDisplayMode.Fullscreen : WindowDisplayMode.Windowed).ToString(); } break; } diff --git a/scripts/SoundManager.cs b/scripts/SoundManager.cs index 0648e8f6..9476a370 100644 --- a/scripts/SoundManager.cs +++ b/scripts/SoundManager.cs @@ -261,7 +261,7 @@ public static void PlayJukebox(Map map, bool setRichPresence = true) JukeboxIndex = MapManager.Maps.FindIndex(x => x.Id == map.Id); - Song.Stream = Util.Audio.LoadFromFile($"{MapUtil.MapsFolder}/{map.Name}/audio.{map.AudioExt}"); + Song.Stream = util.Audio.LoadFromFile($"{MapUtil.MapsFolder}/{map.Name}/audio.{map.AudioExt}"); Song.Play(); Instance.JukeboxPlayed?.Invoke(map); @@ -320,7 +320,7 @@ public static void StartMapSelectionPlayback(Map map, bool setRichPresence = tru } } - Song.Stream = Util.Audio.LoadFromFile($"{MapUtil.MapsFolder}/{map.Name}/audio.{map.AudioExt}"); + Song.Stream = util.Audio.LoadFromFile($"{MapUtil.MapsFolder}/{map.Name}/audio.{map.AudioExt}"); Song.Play(0); Instance.JukeboxPlayed?.Invoke(map); @@ -469,10 +469,10 @@ public static void UpdateJukeboxQueue() public void UpdateSkin(SkinProfile skin) { - HitSound.Stream = Util.Audio.LoadStream(skin.HitSoundBuffer); - MissSound.Stream = Util.Audio.LoadStream(skin.MissSoundBuffer); - FailSound.Stream = Util.Audio.LoadStream(skin.FailSoundBuffer); - MenuMusic.Stream = Util.Audio.LoadStream(skin.MenuMusicBuffer); + HitSound.Stream = util.Audio.LoadStream(skin.HitSoundBuffer); + MissSound.Stream = util.Audio.LoadStream(skin.MissSoundBuffer); + FailSound.Stream = util.Audio.LoadStream(skin.FailSoundBuffer); + MenuMusic.Stream = util.Audio.LoadStream(skin.MenuMusicBuffer); RefreshMenuMusicPlayback(); } diff --git a/scripts/database/settings/SettingsProfile.cs b/scripts/database/settings/SettingsProfile.cs index d4a5eeb0..0f364d8c 100644 --- a/scripts/database/settings/SettingsProfile.cs +++ b/scripts/database/settings/SettingsProfile.cs @@ -8,6 +8,11 @@ public partial class SettingsProfile { #region Gameplay + /// + /// Selected skin for the game + /// + [Order] + public SettingsItem Skin { get; private set; } /// /// Adjusts cursor sensitivity @@ -93,15 +98,15 @@ public partial class SettingsProfile [Order] public SettingsItem FoV { get; private set; } - #endregion - - #region Visual - /// - /// Selected skin for the game + /// Auto restarts on death /// [Order] - public SettingsItem Skin { get; private set; } + public SettingsItem AutoRestartOnDeath { get; private set; } + + #endregion + + #region Space /// /// Overrides the skin's background space for the menu @@ -115,6 +120,18 @@ public partial class SettingsProfile [Order] public SettingsItem GameSpace { get; private set; } + /// + /// Sets the default color of the space + /// + [Order] + public SettingsItem SpaceColor { get; private set; } + + /// + /// Toggles the use of a custom color + /// + [Order] + public SettingsItem CustomSpaceColor { get; private set; } + /// /// Toggles note hit effects for the game space /// @@ -127,6 +144,16 @@ public partial class SettingsProfile [Order] public SettingsItem SpaceEffects { get; private set; } + /// + /// Enables a dark radial fade to help visibility + /// + [Order] + public SettingsItem VisibilityAssist { get; private set; } + + #endregion + + #region Notes + /// /// Overrides the skin's colorset /// @@ -134,28 +161,32 @@ public partial class SettingsProfile public SettingsItem NoteColors { get; private set; } /// - /// Sets the maximum opacity of the notes + /// Overrides the skin's note mesh /// [Order] - public SettingsItem NoteOpacity { get; private set; } + public SettingsItem NoteMesh { get; private set; } /// - /// Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly + /// Sets the size of the notes /// [Order] - public SettingsItem NoteOpacityExponent { get; private set; } + public SettingsItem NoteSize { get; private set; } /// - /// Overrides the skin's note mesh + /// Sets the maximum opacity of the notes /// [Order] - public SettingsItem NoteMesh { get; private set; } + public SettingsItem NoteOpacity { get; private set; } /// - /// Sets the size of the notes + /// Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly /// [Order] - public SettingsItem NoteSize { get; private set; } + public SettingsItem NoteOpacityExponent { get; private set; } + + #endregion + + #region Cursor /// /// Adjusts the cursor scale @@ -199,6 +230,9 @@ public partial class SettingsProfile [Order] public SettingsItem UseCursorInMenus { get; private set; } + #endregion + + #region HUD /// /// Adjusts the easing when the HP Bar is updated /// @@ -241,12 +275,6 @@ public partial class SettingsProfile [Order] public SettingsItem AltComboCounter { get; private set; } - /// - /// Enables a dark radial fade to help visibility - /// - [Order] - public SettingsItem VisibilityAssist { get; private set; } - /// /// Toggles a popup on a hit /// @@ -264,16 +292,10 @@ public partial class SettingsProfile #region Video /// - /// Toggles the window to Fullsceen - /// - [Order] - public SettingsItem Fullscreen { get; private set; } - - /// - /// Toggles Borderless Fullscreen mode if Fullscreen is enabled + /// Changes how the window is displayed /// [Order] - public SettingsItem BorderlessFullscreen { get; private set; } + public SettingsItem WindowMode { get; private set; } /// /// Locks maximum frames per second @@ -433,6 +455,12 @@ public partial class SettingsProfile /// public SettingsItem OptionalPlaytestParameters { get; private set; } + [Order] + /// + /// Hides Notifications, unless they're important + /// + public SettingsItem HideNotifications { get; private set; } + [Order] /// /// Restarts settings to the game's defaults @@ -448,6 +476,34 @@ public SettingsProfile() { #region Gameplay + Skin = new("default") + { + Id = "Skin", + Title = "Skin", + Description = "Selected skin for the game", + Section = SettingsSection.Gameplay, + UpdateAction = (_, init) => + { + if (!init) + { + SkinManager.Load(); + } + }, + Buttons = + [ + new() + { + Title = "Skin Folder", + Description = "Open the skin folder", + OnPressed = () => + { + OS.ShellOpen($"{Constants.USER_FOLDER}/skins/{SettingsManager.Instance.Settings.Skin}"); + }, + }, + ], + List = new("default") { Values = ["default"] }, + }; + Sensitivity = new(0.5f) { Id = "Sensitivity", @@ -618,44 +674,24 @@ public SettingsProfile() }, }; - #endregion - - #region Visual - - Skin = new("default") + AutoRestartOnDeath = new(false) { - Id = "Skin", - Title = "Skin", - Description = "Selected skin for the game", - Section = SettingsSection.Visual, - UpdateAction = (_, init) => - { - if (!init) - { - SkinManager.Load(); - } - }, - Buttons = - [ - new() - { - Title = "Skin Folder", - Description = "Open the skin folder", - OnPressed = () => - { - OS.ShellOpen($"{Constants.USER_FOLDER}/skins/{SettingsManager.Instance.Settings.Skin}"); - }, - }, - ], - List = new("default") { Values = ["default"] }, + Id = "AutoRestartOnDeath", + Title = "Auto Restart On Death", + Description = "On death, automatically restart the run instead of going to the results screen", + Section = SettingsSection.Gameplay, }; + #endregion + + #region Spaces + MenuSpace = new("skin") { Id = "MenuSpace", Title = "Menu Space", Description = "Overrides the skin's background space for the menu", - Section = SettingsSection.Visual, + Section = SettingsSection.Spaces, UpdateAction = (_, init) => { if (!init) @@ -689,7 +725,7 @@ public SettingsProfile() Id = "GameSpace", Title = "Game Space", Description = "Overrides the skin's background space for gameplay", - Section = SettingsSection.Visual, + Section = SettingsSection.Spaces, UpdateAction = (_, init) => { if (!init) @@ -718,12 +754,35 @@ public SettingsProfile() }, }; + SpaceColor = new(Color.Color8(0, 0, 0, 0)) + { + Id = "SpaceColor", + Title = "Space Color", + Description = "Changes the color of the space (only when space hit effects is off)", + Section = SettingsSection.Spaces, + }; + + CustomSpaceColor = new(false) + { + Id = "CustomSpaceColor", + Title = "Custom Space Color", + Description = "Toggles the use of a custom space color", + Section = SettingsSection.Spaces, + UpdateAction = (_, init) => + { + if ((bool)CustomSpaceColor.GetVariant()) + { + SpaceHitEffects.SetVariant(false); + } + }, + }; + SpaceHitEffects = new(true) { Id = "SpaceHitEffects", Title = "Space Hit Effects", Description = "Toggles note hit effects for the game space", - Section = SettingsSection.Visual, + Section = SettingsSection.Spaces, }; SpaceEffects = new(true) @@ -731,15 +790,27 @@ public SettingsProfile() Id = "SpaceEffects", Title = "Space Effects", Description = "Toggles non-hit effects for the game space", - Section = SettingsSection.Visual, + Section = SettingsSection.Spaces, }; + VisibilityAssist = new(false) + { + Id = "VisibilityAssist", + Title = "Visibility Assist", + Description = "Enables a dark radial fade to help with visibility (impacts performance significantly)", + Section = SettingsSection.Spaces, + }; + + #endregion + + #region Notes + NoteColors = new("skin") { Id = "Colors", Title = "Colors", Description = "Overrides the skin's colorset", - Section = SettingsSection.Visual, + Section = SettingsSection.Notes, UpdateAction = (_, init) => { if (!init) @@ -750,40 +821,12 @@ public SettingsProfile() List = new("skin") { Values = ["skin", "default"] }, }; - NoteOpacity = new(1) - { - Id = "NoteOpacity", - Title = "Note Opacity", - Description = "Sets the maximum opacity for the notes", - Section = SettingsSection.Visual, - Slider = new() - { - Step = 0.05f, - MinValue = 0, - MaxValue = 1, - }, - }; - - NoteOpacityExponent = new(1.25) - { - Id = "NoteOpacityExponent", - Title = "Note Opacity Exponent", - Description = "Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly", - Section = SettingsSection.Visual, - Slider = new() - { - Step = 0.05f, - MinValue = 1, - MaxValue = 2, - }, - }; - NoteMesh = new("skin") { Id = "NoteMesh", Title = "Note Mesh", Description = "Overrides the skin's note mesh", - Section = SettingsSection.Visual, + Section = SettingsSection.Notes, UpdateAction = (_, init) => { if (!init) @@ -799,7 +842,7 @@ public SettingsProfile() Id = "NoteSize", Title = "Note Size", Description = "Sets the size of the notes, does not change hitboxes", - Section = SettingsSection.Visual, + Section = SettingsSection.Notes, Slider = new() { Step = 0.025f, @@ -808,20 +851,44 @@ public SettingsProfile() }, }; - GridGuides = new(true) + NoteOpacity = new(1) { - Id = "GridGuides", - Title = "Grid Guides", - Description = "Enables grid guides", - Section = SettingsSection.Visual, + Id = "NoteOpacity", + Title = "Note Opacity", + Description = "Sets the maximum opacity for the notes", + Section = SettingsSection.Notes, + Slider = new() + { + Step = 0.05f, + MinValue = 0, + MaxValue = 1, + }, + }; + + NoteOpacityExponent = new(1.25) + { + Id = "NoteOpacityExponent", + Title = "Note Opacity Exponent", + Description = "Adjusts the note opacity curve, a higher value will make any sort of transparency appear more quickly", + Section = SettingsSection.Notes, + Slider = new() + { + Step = 0.05f, + MinValue = 1, + MaxValue = 2, + }, }; + #endregion + + #region Cursor + CursorScale = new(1) { Id = "CursorScale", Title = "Cursor Scale", Description = "Adjusts the cursor scale, does not change hitboxes", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, Slider = new() { Step = 0.025f, @@ -835,7 +902,7 @@ public SettingsProfile() Id = "CursorOpacity", Title = "Cursor Opacity", Description = "Adjusts the cursor opacity", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, Slider = new() { Step = 0.05f, @@ -849,7 +916,7 @@ public SettingsProfile() Id = "CursorRotation", Title = "Cursor Rotation", Description = "Degrees to rotate the cursor by every second", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, Slider = new() { Step = 1, @@ -863,7 +930,7 @@ public SettingsProfile() Id = "CursorTrail", Title = "Cursor Trail", Description = "Toggles a trail for your cursor", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, }; TrailTime = new(0.05f) @@ -871,7 +938,7 @@ public SettingsProfile() Id = "TrailTime", Title = "Cursor Trail Time", Description = "Adjusts trail visibility time", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, Slider = new() { Step = 0.01f, @@ -885,7 +952,7 @@ public SettingsProfile() Id = "TrailDetail", Title = "Cursor Trail Detail", Description = "Adjusts the detail for the trail, a high value may impact performance", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, Slider = new() { Step = 1f, @@ -899,7 +966,19 @@ public SettingsProfile() Id = "UseCursorInMenus", Title = "Use Cursor in Menus", Description = "Uses the skin's cursor instead of the native cursor", - Section = SettingsSection.Visual, + Section = SettingsSection.Cursor, + }; + + #endregion + + #region HUD + + GridGuides = new(true) + { + Id = "GridGuides", + Title = "Grid Guides", + Description = "Enables grid guides", + Section = SettingsSection.HUD, }; HPLerpValue = new(60f) @@ -907,7 +986,7 @@ public SettingsProfile() Id = "HPLerpValue", Title = "HP Bar Easing Value", Description = "Adjusts how smooth, or harsh, the HP Bar eases in while it updates", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, Slider = new() { Step = 1f, @@ -953,7 +1032,7 @@ public SettingsProfile() Id = "SimpleHUD", Title = "Simple HUD", Description = "Hides the regular left and right panels, and instead displays a simple miss counter on the right", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, }; SuperSimpleHUD = new(false) @@ -961,7 +1040,7 @@ public SettingsProfile() Id = "SuperSimpleHUD", Title = "Super Simple HUD", Description = "Hides health bar, song duration, and song name", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, }; AltComboCounter = new(false) @@ -969,15 +1048,7 @@ public SettingsProfile() Id = "AltComboCounter", Title = "Alt. Combo Counter", Description = "Moves the Combo Counter to the HUD", - Section = SettingsSection.Visual, - }; - - VisibilityAssist = new(false) - { - Id = "VisibilityAssist", - Title = "Visibility Assist", - Description = "Enables a dark radial fade to help with visibility (impacts performance significantly)", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, }; HitPopups = new(true) @@ -985,7 +1056,7 @@ public SettingsProfile() Id = "HitPopups", Title = "Hit Score Popups", Description = "Toggles a popup on a hit", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, }; MissPopups = new(true) @@ -993,25 +1064,21 @@ public SettingsProfile() Id = "MissPopups", Title = "Miss Popups", Description = "Toggles a popup on a miss", - Section = SettingsSection.Visual, + Section = SettingsSection.HUD, }; - Fullscreen = new(true) - { - Id = "Fullscreen", - Title = "Fullscreen", - Description = "Toggles the window to fullscreen", - Section = SettingsSection.Video, - UpdateAction = (_, _) => updateWindowMode(), - }; + #endregion + + #region Video - BorderlessFullscreen = new(false) + WindowMode = new(nameof(WindowDisplayMode.Fullscreen)) { - Id = "BorderlessFullscreen", - Title = "Borderless Fullscreen", - Description = "Alters the Fullscreen toggle to use Borderless fullscreen instead of Exclusive, may fix some issues with drawing tablets", + Id = "WindowMode", + Title = "Window Mode", + Description = "Changes how the window is displayed, Borderless may fix some issues with drawing tablets", Section = SettingsSection.Video, UpdateAction = (_, _) => updateWindowMode(), + List = new(nameof(WindowDisplayMode.Fullscreen)) { Values = [.. Enum.GetNames()] }, }; LockFPS = new(false) @@ -1448,6 +1515,14 @@ public SettingsProfile() Section = SettingsSection.Other, }; + HideNotifications = new(false) + { + Id = "HideNotifications", + Title = "Hide Notifications", + Description = "Hides notifications, important ones will still display", + Section = SettingsSection.Other, + }; + ResetToDefaults = new(default) { Id = "ResetToDefaults", @@ -1512,11 +1587,14 @@ private void updateApproachTime() private void updateWindowMode() { - var windowMode = Fullscreen - ? (!BorderlessFullscreen ? DisplayServer.WindowMode.ExclusiveFullscreen : DisplayServer.WindowMode.Fullscreen) - : DisplayServer.WindowMode.Windowed; - - DisplayServer.WindowSetMode(windowMode); + DisplayServer.WindowSetMode( + Enum.Parse(WindowMode.Value) switch + { + WindowDisplayMode.Fullscreen => DisplayServer.WindowMode.ExclusiveFullscreen, + WindowDisplayMode.Borderless => DisplayServer.WindowMode.Fullscreen, + _ => DisplayServer.WindowMode.Windowed, + } + ); } private static List getAvailableMeshes() @@ -1536,6 +1614,38 @@ private static List getAvailableMeshes() return meshes; } + private static List getAvailableSpaces() + { + List spaces = + [ + "skin", + "circulartunnel", + "conspiracy", + "galaxy", + "grid", + "relic", + "solid", + "squircles", + "tritunnel", + "tunnel", + "void", + "vortex", + "waves", + ]; + string spaceDir = $"{Constants.USER_FOLDER}/spaces"; + + if (Directory.Exists(spaceDir)) + { + string[] objFiles = Directory.GetFiles(spaceDir, "*.tscn"); + foreach (string file in objFiles) + { + spaces.Add(Path.GetFileNameWithoutExtension(file)); + } + } + + return spaces; + } + public static void ImportFromNightlySettings(string settingsPath) { string nightlySettings = File.Exists(settingsPath) ? File.ReadAllText(settingsPath) : null; @@ -1613,7 +1723,10 @@ double importVolume(string nightlyKey, double range) ["SimpleHUD"] = () => getSetting("simple_hud") ?? nightlyProfile.SimpleHUD, ["HitPopups"] = () => getSetting("score_popup") ?? nightlyProfile.HitPopups, ["MissPopups"] = () => getSetting("show_miss_effect") ?? nightlyProfile.MissPopups, - ["Fullscreen"] = () => getSetting("window_fullscreen") ?? nightlyProfile.Fullscreen, + ["WindowMode"] = () => + getSetting("window_fullscreen") is bool fullscreen + ? (fullscreen ? nameof(WindowDisplayMode.Fullscreen) : nameof(WindowDisplayMode.Windowed)) + : nightlyProfile.WindowMode, ["FPS"] = () => getSetting("target_fps") ?? nightlyProfile.FPS, ["VolumeMaster"] = () => 100, ["VolumeMusic"] = () => importVolume("music_volume", 70), diff --git a/scripts/database/settings/SettingsProfileConverter.cs b/scripts/database/settings/SettingsProfileConverter.cs index 3452a972..755e9382 100644 --- a/scripts/database/settings/SettingsProfileConverter.cs +++ b/scripts/database/settings/SettingsProfileConverter.cs @@ -29,6 +29,9 @@ public static string Serialize(SettingsProfile profile) case Variant.Type.Float: data[property.Name] = Math.Round((float)value, 4); break; + case Variant.Type.Color: + data[property.Name] = value.AsColor().ToHtml(); + break; default: data[property.Name] = value; break; diff --git a/scripts/database/settings/SettingsSection.cs b/scripts/database/settings/SettingsSection.cs index 58d4f2d8..2e2bbf0a 100644 --- a/scripts/database/settings/SettingsSection.cs +++ b/scripts/database/settings/SettingsSection.cs @@ -2,7 +2,10 @@ public enum SettingsSection { None, Gameplay, - Visual, + Spaces, + Notes, + Cursor, + HUD, Audio, Video, Other, diff --git a/scripts/database/settings/WindowDisplayMode.cs b/scripts/database/settings/WindowDisplayMode.cs new file mode 100644 index 00000000..9ad5af00 --- /dev/null +++ b/scripts/database/settings/WindowDisplayMode.cs @@ -0,0 +1,6 @@ +public enum WindowDisplayMode +{ + Windowed, + Fullscreen, + Borderless, +} diff --git a/scripts/database/settings/WindowDisplayMode.cs.uid b/scripts/database/settings/WindowDisplayMode.cs.uid new file mode 100644 index 00000000..946b3de1 --- /dev/null +++ b/scripts/database/settings/WindowDisplayMode.cs.uid @@ -0,0 +1 @@ +uid://drhcijc4ymcuf diff --git a/scripts/game/Attempt.cs b/scripts/game/Attempt.cs index 7aa32df0..3bea801e 100644 --- a/scripts/game/Attempt.cs +++ b/scripts/game/Attempt.cs @@ -51,6 +51,7 @@ public partial class Attempt : RefCounted public Vector2 CursorPosition = Vector2.Zero; public Vector2 RawCursorPosition = Vector2.Zero; + public Vector2 BufferCursorPosition = Vector2.Zero; public double DistanceMM = 0; public ulong FirstNote = 0; @@ -119,6 +120,14 @@ public Attempt( var skin = SkinManager.Instance.Skin; int index = (int)(FirstNote - 1) % skin.NoteColors.Length; - LastHitColour = skin.NoteColors[index >= 0 ? index : ^Math.Abs(index)]; + if (Settings.CustomSpaceColor) + { + LastHitColour = Settings.SpaceColor; + } + else + { + LastHitColour = skin.NoteColors[^1]; + } + LastHitColour = skin.NoteColors[^1]; } } diff --git a/scripts/game/Runner.cs b/scripts/game/Runner.cs index 58eb0a8f..1fde3d1e 100644 --- a/scripts/game/Runner.cs +++ b/scripts/game/Runner.cs @@ -349,7 +349,7 @@ public void Play() if (Attempt.Map.AudioBuffer != null) { - SoundManager.Song.Stream = Util.Audio.LoadStream(Attempt.Map.AudioBuffer); + SoundManager.Song.Stream = util.Audio.LoadStream(Attempt.Map.AudioBuffer); SoundManager.Song.PitchScale = (float)Speed; } @@ -405,7 +405,7 @@ public void Seek(double ms) foreach (var entry in Attempt.Objects) { - ObjectIndicesStart[entry.Key] = Util.Misc.BinarySearch(noteTimestamps, ms) + 1; + ObjectIndicesStart[entry.Key] = util.Misc.BinarySearch(noteTimestamps, ms) + 1; ObjectIndicesEnd[entry.Key] = entry.Value.Count; } @@ -484,7 +484,7 @@ public void Stop(bool results = true) Stats.Instance.GamePlaytime += (Time.GetTicksUsec() - Attempt.TimeStarted) / 1000000; Stats.Instance.TotalDistance += (ulong)Attempt.DistanceMM; - if (Attempt.StartFrom == 0) + if (Attempt.StartFrom == 0 && !autoplayEnabled) { if (!File.Exists($"{Constants.USER_FOLDER}/pbs/{Attempt.Map.Name}")) { @@ -612,10 +612,22 @@ private void onHitResultChanged(int noteIndex, HitResult hitResult) if (!Attempt.IsReplay && Attempt.Health <= 0 && Attempt.Alive) { - Fail(); + if (Attempt.Settings.AutoRestartOnDeath && checkFail(hit, Attempt.Health)) + { + SoundManager.FailSound.Play(); + + Attempt.Alive = false; + Attempt.Qualifies = false; + + Results.Replay(); + } + else + { + Fail(); + } } - if (checkFail(hit, Attempt.Health)) + if (!Attempt.Settings.AutoRestartOnDeath && checkFail(hit, Attempt.Health)) { QueueStop(); } diff --git a/scripts/game/camera/CameraLock.cs b/scripts/game/camera/CameraLock.cs index 8db9f854..6dcbf5d6 100644 --- a/scripts/game/camera/CameraLock.cs +++ b/scripts/game/camera/CameraLock.cs @@ -12,6 +12,7 @@ public override void Process( ReplayManager replayManager, Camera3D camera, MeshInstance3D cursor, + MeshInstance3D bufferCursor, Vector2 mouseDelta, float sensitivity ) @@ -29,6 +30,7 @@ float sensitivity { attempt.RawCursorPosition = attempt.IsReplay ? replayManager.CursorPosition : attempt.RawCursorPosition + delta; attempt.CursorPosition = attempt.RawCursorPosition.Clamp(-Constants.BOUNDS, Constants.BOUNDS); + attempt.BufferCursorPosition = attempt.IsReplay ? replayManager.CursorPosition : attempt.BufferCursorPosition + delta; } var origin = new Vector3(0, 0, 3.75f); @@ -45,10 +47,12 @@ float sensitivity camera.Rotation = Vector3.Zero; Vector3 cursorPos = new(attempt.CursorPosition.X, attempt.CursorPosition.Y, 0); + Vector3 bufferCursorPos = new(attempt.BufferCursorPosition.X, attempt.BufferCursorPosition.Y, 0); if (cursorPos.IsFinite()) { cursor.Position = cursorPos; + bufferCursor.Position = bufferCursorPos; } } } diff --git a/scripts/game/camera/CameraMode.cs b/scripts/game/camera/CameraMode.cs index 4826b87b..54bb012e 100644 --- a/scripts/game/camera/CameraMode.cs +++ b/scripts/game/camera/CameraMode.cs @@ -12,6 +12,7 @@ public abstract void Process( ReplayManager replayManager, Camera3D camera, MeshInstance3D cursor, + MeshInstance3D bufferCursor, Vector2 mouseDelta, float sensitivity ); diff --git a/scripts/game/camera/CameraSpin.cs b/scripts/game/camera/CameraSpin.cs index e031761a..bf814465 100644 --- a/scripts/game/camera/CameraSpin.cs +++ b/scripts/game/camera/CameraSpin.cs @@ -1,4 +1,4 @@ -using System; +using System; using Godot; public class CameraSpin : CameraMode @@ -12,6 +12,7 @@ public override void Process( ReplayManager replayManager, Camera3D camera, MeshInstance3D cursor, + MeshInstance3D bufferCursor, Vector2 mouseDelta, float sensitivity ) @@ -48,13 +49,16 @@ float sensitivity // Project Cursor from Camera's "ray cast" attempt.RawCursorPosition = cameraVector2 - lookVector2 * Mathf.Abs(camera.Position.Z / lookVector.Z); + attempt.BufferCursorPosition = attempt.RawCursorPosition; attempt.CursorPosition = attempt.RawCursorPosition.Clamp(-Constants.BOUNDS, Constants.BOUNDS); Vector3 cursorPos = new(attempt.CursorPosition.X, attempt.CursorPosition.Y, 0); + Vector3 bufferCursorPos = new(attempt.BufferCursorPosition.X, attempt.BufferCursorPosition.Y, 0); if (cursorPos.IsFinite()) { cursor.Position = cursorPos; + bufferCursor.Position = bufferCursorPos; } } } diff --git a/scripts/game/managers/CursorManager.cs b/scripts/game/managers/CursorManager.cs index be41756c..dde3d263 100644 --- a/scripts/game/managers/CursorManager.cs +++ b/scripts/game/managers/CursorManager.cs @@ -19,6 +19,9 @@ public partial class CursorManager : Node [Export] private MeshInstance3D cursorMesh; + [Export] + private MeshInstance3D bufferCursor; + [Export] private Camera3D camera; @@ -35,6 +38,7 @@ public override void _Ready() defaultCameraTransform = camera.Transform; cursorMesh ??= GetNode("Cursor"); + bufferCursor ??= GetNode("BufferCursor"); playerInputController ??= GetNode("/PlayerInputController"); replayManager ??= GetNode("ReplayManager"); } @@ -120,32 +124,46 @@ public void UpdateCursor(Vector2 inputDelta, int cursorIndex = 0) var attempt = runner.Attempt; - attempt.CameraMode.Process(attempt, replayManager, camera, cursors[cursorIndex], inputDelta, sensitivity); + attempt.CameraMode.Process(attempt, replayManager, camera, cursors[cursorIndex], bufferCursor, inputDelta, sensitivity); } public void UpdateAutoplayCursor(Vector2 position) { + if (!position.IsFinite()) + return; + EmitSignalOnCursorUpdated(position); var attempt = runner.Attempt; - attempt.RawCursorPosition = position; - attempt.CursorPosition = position.Clamp(-Constants.BOUNDS, Constants.BOUNDS); - - var origin = new Vector3(0, 0, attempt.CameraMode.Name == "Spin" ? 4f : 3.75f); - float parallax = (float)settings.CameraParallax; - camera.Position = origin + new Vector3(attempt.CursorPosition.X, attempt.CursorPosition.Y, 0) * parallax; + position = position.Clamp(-Constants.BOUNDS, Constants.BOUNDS); - if (attempt.CameraMode.Name != "Spin") + if (attempt.CameraMode is CameraSpin) { - camera.Rotation = Vector3.Zero; - } + Vector3 target = new(position.X, position.Y, 0); + Vector3 previousCursor = new(attempt.CursorPosition.X, attempt.CursorPosition.Y, 0); + var origin = new Vector3(0, 0, 3.5f) + previousCursor * (float)attempt.Settings.CameraParallax; - Vector3 cursorPos = new(attempt.CursorPosition.X, attempt.CursorPosition.Y, 0); + var targetRotation = Basis.LookingAt(target - origin, Vector3.Up); + var targetEuler = targetRotation.GetEuler(); + float pitch = targetEuler.X - camera.Rotation.X; + float yaw = Mathf.AngleDifference(camera.Rotation.Y, targetEuler.Y); - if (cursorPos.IsFinite()) - { - cursors[0].Position = cursorPos; + var mouseDelta = new Vector2(-yaw, -pitch) * (120f * Mathf.Pi); + + attempt.CameraMode.Process(attempt, replayManager, camera, cursors[0], bufferCursor, mouseDelta, 1f); + return; } + + attempt.RawCursorPosition = position; + attempt.CursorPosition = position; + attempt.BufferCursorPosition = position; + + Vector3 cursorPosition = new(position.X, position.Y, 0); + camera.Position = new Vector3(0, 0, 3.76f) + cursorPosition * (float)settings.CameraParallax; + camera.Rotation = Vector3.Zero; + + cursors[0].Position = cursorPosition; + bufferCursor.Position = cursorPosition; } // Reset everything to zero so it doesn't have infinite sensitivity @@ -154,6 +172,7 @@ private void repositionAbsolute() camera.Rotation = Vector3.Zero; runner.Attempt.RawCursorPosition = Vector2.Zero; runner.Attempt.CursorPosition = Vector2.Zero; + runner.Attempt.BufferCursorPosition = Vector2.Zero; } private void updateCursorRotation(double delta) => diff --git a/scripts/game/managers/HudManager.cs b/scripts/game/managers/HudManager.cs index eed54b4e..901d2e6a 100644 --- a/scripts/game/managers/HudManager.cs +++ b/scripts/game/managers/HudManager.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using Godot; -using Util; +using util; public partial class HudManager : Node { diff --git a/scripts/game/managers/ReplayManager.cs b/scripts/game/managers/ReplayManager.cs index 972c86ef..1c2010d0 100644 --- a/scripts/game/managers/ReplayManager.cs +++ b/scripts/game/managers/ReplayManager.cs @@ -177,8 +177,8 @@ public override void _Ready() seekerTimeline.ValueChanged += value => { - string current = $"{Util.String.FormatTime(value * ReplayLength / 1000)}"; - string end = $"{Util.String.FormatTime(ReplayLength / 1000)}"; + string current = $"{util.String.FormatTime(value * ReplayLength / 1000)}"; + string end = $"{util.String.FormatTime(ReplayLength / 1000)}"; seekerTime.Text = $"{current} / {end}"; }; diff --git a/scripts/game/ui/Grid.cs b/scripts/game/ui/Grid.cs index 19536c72..620eb038 100644 --- a/scripts/game/ui/Grid.cs +++ b/scripts/game/ui/Grid.cs @@ -7,6 +7,7 @@ public partial class Grid : MeshInstance3D, IUIComponent [Export] public Runner Runner { get; set; } public MeshInstance3D Cursor { get; set; } + public MeshInstance3D BufferCursor { get; set; } public MultiMeshInstance3D CursorTrail { get; set; } public MeshInstance3D GridGuides { get; set; } public MeshInstance3D VisibilityAssist { get; set; } @@ -42,12 +43,22 @@ public void Init() (float)(Constants.CURSOR_SIZE * Runner.Attempt.Settings.CursorScale) ); + BufferCursor ??= GetNode("BufferCursor"); + (BufferCursor.Mesh as QuadMesh).Size = new Vector2( + (float)(Constants.CURSOR_SIZE * Runner.Attempt.Settings.CursorScale), + (float)(Constants.CURSOR_SIZE * Runner.Attempt.Settings.CursorScale) + ); + (Cursor.GetActiveMaterial(0) as StandardMaterial3D).AlbedoTexture = SkinManager.Instance.Skin.CursorImage; + (BufferCursor.GetActiveMaterial(0) as StandardMaterial3D).AlbedoTexture = SkinManager.Instance.Skin.CursorImage; // Cursor Transparency float alpha = Math.Clamp((float)(double)Runner.Attempt.Settings.CursorOpacity, 0, 1); Cursor.Transparency = 1f - alpha; + BufferCursor.Visible = !Runner.Attempt.Settings.CursorDrift && !Runner.Attempt.IsReplay; + BufferCursor.Transparency = 1f - alpha / 4; + CursorTrail ??= GetNode("CursorTrail"); (CursorTrail.MaterialOverride as StandardMaterial3D).AlbedoTexture = SkinManager.Instance.Skin.CursorImage; diff --git a/scripts/game/ui/PanelLeft.cs b/scripts/game/ui/PanelLeft.cs index 0a6a2f2d..e7c229a9 100644 --- a/scripts/game/ui/PanelLeft.cs +++ b/scripts/game/ui/PanelLeft.cs @@ -58,7 +58,7 @@ public override void _PhysicsProcess(double delta) public void OnStatsUpdated(Attempt attempt) { - score.Text = Util.String.PadMagnitude(attempt.Score); + score.Text = util.String.PadMagnitude(attempt.Score); multiplier.Text = $"{attempt.ComboMultiplier}x"; altCombo.Text = $"{attempt.Combo}"; diff --git a/scripts/game/ui/PanelRight.cs b/scripts/game/ui/PanelRight.cs index 0607eb6d..25f9e637 100644 --- a/scripts/game/ui/PanelRight.cs +++ b/scripts/game/ui/PanelRight.cs @@ -88,6 +88,6 @@ public void OnStatsUpdated(Attempt attempt) hits.Text = $"{attempt.Hits}"; misses.Text = $"{attempt.Misses}"; simpleMisses.Text = $"{attempt.Misses}"; - sum.Text = Util.String.PadMagnitude(attempt.Sum); + sum.Text = util.String.PadMagnitude(attempt.Sum); } } diff --git a/scripts/game/ui/PlaytestOverlay.cs b/scripts/game/ui/PlaytestOverlay.cs index 78089405..e744179a 100644 --- a/scripts/game/ui/PlaytestOverlay.cs +++ b/scripts/game/ui/PlaytestOverlay.cs @@ -56,13 +56,13 @@ public void UpdatePlaytestOverlay(bool show) if (!PlaytestInit && SettingsManager.Instance.Settings.OptionalPlaytestParameters) { // start from init - double.TryParse(Rhythia.StartFromParameter, CultureInfo.InvariantCulture, out double sfInit); + double sfInit = util.Misc.ParseDoubleInput(Rhythia.StartFromParameter); string sfSeconds = (sfInit /= 1000).ToString(CultureInfo.InvariantCulture); ApplyStartFrom(sfSeconds, Attempt.Map, startFromEdit); // speed init - double.TryParse(Rhythia.SpeedParameter, CultureInfo.InvariantCulture, out double spInit); - speedEdit.Text = spInit.ToString(CultureInfo.CurrentCulture); + double spInit = util.Misc.ParseDoubleInput(Rhythia.SpeedParameter, 1.0); + speedEdit.Text = spInit.ToString(CultureInfo.InvariantCulture); } if (!show) @@ -70,12 +70,7 @@ public void UpdatePlaytestOverlay(bool show) var oldAttempt = Attempt; Runner.Stop(false); - double speedValue = 1.0; - - if (double.TryParse(speedEdit.Text, out double speedDouble)) - { - speedValue = speedDouble; - } + double speedValue = util.Misc.ParseDoubleInput(speedEdit.Text, 1.0); var map = MapParser.Decode(oldAttempt.Map.FolderPath, Rhythia.AudioFilePath); @@ -92,20 +87,20 @@ public static void ApplyStartFrom(string input, Map map, LineEdit valueEdit) if (input.Contains(':')) // time conversion (ex. 1:25) { - if (!input.IsValidFloat()) + if (!util.Misc.TryParseDoubleInput(input.Replace(":", ""), out _)) { - valueEdit.Text = Util.String.FormatTime(1.0); + valueEdit.Text = util.String.FormatTime(1.0); } double value = 0; string[] split = input.Split(":"); split.Reverse(); - if (split.Length > 1 && split[1].IsValidFloat()) + if (split.Length > 1 && util.Misc.TryParseDoubleInput(split[1], out double minutes)) { - value += 60 * split[1].ToFloat(); + value += 60 * minutes; } - if (double.TryParse(split[0], CultureInfo.InvariantCulture, out double inputValue)) + if (util.Misc.TryParseDoubleInput(split[0], out double inputValue)) { if (inputValue < 1) inputValue *= map.Length / 1000; @@ -114,22 +109,19 @@ public static void ApplyStartFrom(string input, Map map, LineEdit valueEdit) value = Math.Clamp(value * 1000, 0, map.Length); - valueEdit.Text = Util.String.FormatTime(value / 1000); + valueEdit.Text = util.String.FormatTime(value / 1000); } else if (!input.Contains(':')) { - if (!input.IsValidFloat()) + if (!util.Misc.TryParseDoubleInput(input, out _)) { - valueEdit.Text = Util.String.FormatTime(1.0); + valueEdit.Text = util.String.FormatTime(1.0); } - double value = 0.0; - - if (double.TryParse(input, out double inputValue)) - value = inputValue; + double value = util.Misc.ParseDoubleInput(input); value = Math.Clamp(value, 0, map.Length); - valueEdit.Text = Util.String.FormatTime(value); + valueEdit.Text = util.String.FormatTime(value); } } @@ -142,19 +134,18 @@ public static double GetStartFrom(LineEdit valueEdit) if (split.Length == 1) { - if (split[0].IsValidFloat()) - value = split[0].ToFloat(); + value = util.Misc.ParseDoubleInput(split[0]); } else { - if (split[0].IsValidFloat()) + if (util.Misc.TryParseDoubleInput(split[0], out double minutes)) { - value += split[0].ToFloat() * 60; // minutes + value += minutes * 60; } - if (split[1].IsValidFloat()) + if (util.Misc.TryParseDoubleInput(split[1], out double seconds)) { - value += split[1].ToFloat(); // seconds + value += seconds; } } diff --git a/scripts/game/ui/Progress.cs b/scripts/game/ui/Progress.cs index b8f28852..8eaff04a 100644 --- a/scripts/game/ui/Progress.cs +++ b/scripts/game/ui/Progress.cs @@ -13,6 +13,6 @@ public override void Init() public override void Process(double delta, Attempt attempt) { - label.Text = $"{Util.String.FormatTime(Math.Max(0, attempt.Progress) / 1000)} / {Util.String.FormatTime(attempt.Length / 1000)}"; + label.Text = $"{util.String.FormatTime(Math.Max(0, attempt.Progress) / 1000)} / {util.String.FormatTime(attempt.Map.Length / 1000)}"; } } diff --git a/scripts/game/ui/ProgressBar.cs b/scripts/game/ui/ProgressBar.cs index 55eb74df..59e85530 100644 --- a/scripts/game/ui/ProgressBar.cs +++ b/scripts/game/ui/ProgressBar.cs @@ -24,7 +24,7 @@ public override void Process(double delta, Attempt attempt) lastProgress = (float)attempt.Progress; - Vector2 progressSize = new Vector2(32 + (float)(Runner.Attempt.Progress / Runner.Attempt.Length) * 1024, 80); + Vector2 progressSize = new Vector2(32 + (float)(Runner.Attempt.Progress / Runner.Attempt.Map.Length) * 1024, 80); if ((int)progressSize.X != (int)progressBarTexture.Size.X) { diff --git a/scripts/game/ui/Skip.cs b/scripts/game/ui/Skip.cs index 21252179..7edaa0e0 100644 --- a/scripts/game/ui/Skip.cs +++ b/scripts/game/ui/Skip.cs @@ -32,7 +32,7 @@ public override void Process(double delta, Attempt attempt) public void OnSkipAvailable(Attempt attempt) { - if (Runner.ObjectIndicesStart[typeof(Note)] >= attempt.Map.Notes.Length) + if (Runner.ObjectIndicesStart[typeof(Note)] >= attempt.Map.Notes.Length && !Runner.Attempt.IsReplay) { label.Text = "Press Space to complete"; } @@ -40,6 +40,11 @@ public void OnSkipAvailable(Attempt attempt) if (tween != null) return; + if (Runner.Attempt.IsReplay) + { + label.Text = "Seek forward to skip"; + } + tween = CreateTween().SetLoops().SetTrans(Tween.TransitionType.Sine); tween.TweenProperty(label, "modulate", new Color(label.Modulate, 0.25f), 0.75f); tween.TweenProperty(label, "modulate", new Color(label.Modulate, 0.75f), 0.75f); diff --git a/scripts/map/Map.cs b/scripts/map/Map.cs index 2d01a213..ac149eba 100644 --- a/scripts/map/Map.cs +++ b/scripts/map/Map.cs @@ -107,6 +107,17 @@ public Note[] TryParseNotes() } } + public void UnloadCover() + { + if (cover == DefaultCover) + { + return; + } + + cover.Dispose(); + cover = DefaultCover; + } + private Texture2D getCover() { string path = $"{MapUtil.MapsFolder}/{Name}"; @@ -114,7 +125,7 @@ private Texture2D getCover() if (cover == DefaultCover && File.Exists($"{path}/cover.png")) { byte[] coverBuffer = File.ReadAllBytes($"{path}/cover.png"); - var image = Util.Misc.LoadImageFromBuffer(coverBuffer); + var image = util.Misc.LoadImageFromBuffer(coverBuffer); if (image != null) { diff --git a/scripts/map/MapCache.cs b/scripts/map/MapCache.cs index c05ff403..43cf10aa 100644 --- a/scripts/map/MapCache.cs +++ b/scripts/map/MapCache.cs @@ -3,9 +3,8 @@ using System.Globalization; using System.IO; using System.Linq; -using System.Threading.Tasks; using Godot; -using Util; +using util; public static class MapCache { @@ -321,38 +320,7 @@ public static void OrderAndSetMaps() { var maps = FetchAll(); - //TODO: not make this terrible - Task.Run(() => - { - foreach (var map in maps) - { - string path = $"{MapUtil.MapsFolder}/{map.Name}"; - - if (map.Cover == Map.DefaultCover && File.Exists($"{path}/cover.png")) - { - byte[] coverBuffer = File.ReadAllBytes($"{path}/cover.png"); - if (coverBuffer == null || coverBuffer.Length == 0) - { - continue; - } - - Image image = Misc.LoadImageFromBuffer(coverBuffer); - - if (image != null) - { - Callable - .From(() => - { - if (MapManager.Maps.Contains(map)) - { - map.Cover = ImageTexture.CreateFromImage(image); - } - }) - .CallDeferred(); - } - } - } - }); + // only covers on screen are loaded to prevent excessive VRAM usage if (maps.Count < 1) { diff --git a/scripts/map/MapManager.cs b/scripts/map/MapManager.cs index ca8f83a1..90b6947e 100644 --- a/scripts/map/MapManager.cs +++ b/scripts/map/MapManager.cs @@ -131,9 +131,9 @@ public static void Delete(Map map) public static void Sanitize(Map map) { - string sanitizedTitle = Util.String.SanitizeZalgo(map.PrettyTitle); - string sanitizedMappers = Util.String.SanitizeZalgo(map.PrettyMappers); - string sanitizedDiffName = Util.String.SanitizeZalgo(map.DifficultyName); + string sanitizedTitle = util.String.SanitizeZalgo(map.PrettyTitle); + string sanitizedMappers = util.String.SanitizeZalgo(map.PrettyMappers); + string sanitizedDiffName = util.String.SanitizeZalgo(map.DifficultyName); bool updated = sanitizedTitle != map.PrettyTitle || sanitizedMappers != map.PrettyMappers || sanitizedDiffName != map.DifficultyName; diff --git a/scripts/map/MapParser.cs b/scripts/map/MapParser.cs index 420ff1eb..f17ac837 100644 --- a/scripts/map/MapParser.cs +++ b/scripts/map/MapParser.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Godot; using Godot.Collections; -using Util; +using util; public partial class MapParser : Node { diff --git a/scripts/scenes/Game.cs b/scripts/scenes/Game.cs index c8765e0b..4a924949 100644 --- a/scripts/scenes/Game.cs +++ b/scripts/scenes/Game.cs @@ -46,7 +46,7 @@ public override void _Ready() PlayerInputController.OnMouseMove += (relative, absolute) => { - if (!Runner.Playing || Attempt.IsReplay) + if (!Runner.Playing || Attempt.IsReplay || Attempt.Modifiers.Exists(mod => mod is AutoplayModifier)) return; if (Attempt.Settings.AbsoluteInput) diff --git a/scripts/scenes/MainMenu.cs b/scripts/scenes/MainMenu.cs index 91309ee9..dbef644b 100644 --- a/scripts/scenes/MainMenu.cs +++ b/scripts/scenes/MainMenu.cs @@ -122,7 +122,7 @@ public override void _Process(double delta) } } - public void Transition(Panel menu, bool instant = false) + public new void Transition(Panel menu, bool instant = false) { if (CurrentMenu == menu) { diff --git a/scripts/scenes/Results.cs b/scripts/scenes/Results.cs index eec5d68f..f8d9e82d 100644 --- a/scripts/scenes/Results.cs +++ b/scripts/scenes/Results.cs @@ -35,8 +35,8 @@ public override void _Ready() holder.GetNode