设置页面

This commit is contained in:
SoulliesOfficial
2025-03-08 23:11:55 -05:00
parent 076f1a637f
commit c326f3ef90
41 changed files with 2287 additions and 6174 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
Assets/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -18,9 +18,7 @@ MonoBehaviour:
- {fileID: 1919712600670392048, guid: 1eef181acaca89841a32060c68923043, type: 3}
- {fileID: 2800000, guid: a7ec9e7ad8b847b7ae4510af83c5d868, type: 3}
- {fileID: 6297248396536211320, guid: 1eef181acaca89841a32060c68923043, type: 3}
- {fileID: 2800000, guid: f87b5805002ec9649bcb1b96d8a16ba9, type: 3}
- {fileID: 8575234652331120996, guid: 1eef181acaca89841a32060c68923043, type: 3}
- {fileID: 2800000, guid: ee148e281f3c41c5b4ff5f8a5afe5a6c, type: 3}
- {fileID: 2800000, guid: 02f78a9ec76d40f49bfac78c64a754d1, type: 3}
- {fileID: 2100000, guid: 465ba4a268f5c4589a58ed35a13a75c4, type: 2}
- {fileID: 7171625729032381852, guid: 1eef181acaca89841a32060c68923043, type: 3}
@@ -31,6 +29,18 @@ MonoBehaviour:
- {fileID: 2810288035678671647, guid: d00706ed05d0c4a55943214fad99b6cd, type: 3}
- {fileID: 8147460192610872400, guid: 7440905e187024cd9ad8923844776f82, type: 3}
- {fileID: 2800000, guid: 3028dc075ba8c584d9bc7d1e0255e038, type: 3}
- {fileID: 2800000, guid: 93f09189124b21e479fc891dbc1b93bf, type: 3}
- {fileID: 2800000, guid: dcc0ed9263c0d524aabeb5f4bd75ecee, type: 3}
_Values: f2730aff09f37c37febc7fe765b0407bac90167906740a2a8c8e90345544ac395f635fa98c631b3c4753b1a281922a4e02088982d84a09677e358b9883b18c46114589015196ee4776dac15926adab1e4620c9a232d1ed566ec628c1efb3c0693a954d39e3d36066f7d0f7b20b638d2be0a95163e7ea141dcc1f6b7591d3a73ee5a8df6ea08ec51a802fab61da3b4b2f5553a29805235123
- {fileID: 2800000, guid: f20112bdeec2e8d4d9f80e8390e37263, type: 3}
- {fileID: 2800000, guid: b0f85f7da5042c0448a526d5ecacbfa9, type: 3}
- {fileID: 1956055908472055274, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 7531565761125080649, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 7337487027446299713, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 4014858002648010448, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 7514063642240146500, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 313545292169728412, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 5441114934487715633, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 6147830641589726352, guid: c6a552686f72142bb8708e162c31d3ff, type: 3}
- {fileID: 21300000, guid: 80694812942b91b42bc4aad99071ba7e, type: 3}
- {fileID: 2800000, guid: 80694812942b91b42bc4aad99071ba7e, type: 3}
- {fileID: 2800000, guid: 0b9510d2790829140953392aae2b6679, type: 3}
- {fileID: 21300000, guid: 0b9510d2790829140953392aae2b6679, type: 3}
_Values: f2730aff09f37c37febc7fe765b0407bac90167906740a2a8c8e90345544ac394753b1a281922a4e7e358b9883b18c46114589015196ee4776dac15926adab1e4620c9a232d1ed566ec628c1efb3c0693a954d39e3d36066f7d0f7b20b638d2be0a95163e7ea141dcc1f6b7591d3a73ee5a8df6ea08ec51a2f7b5ab115bf731b799b52d05b53bb1a949134651819880de72e3b2ecf0dbc66f70629b01243766dcd4f9bcf7dee1e4185b3b64b611e3b6ddb9f15d3e773b400f9c3036d9fa280501bc798c97db9902b9e9549f346d5832eb56db8a23f89a7640733ce3e6d52283bf75ba0ec3738db26

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
@@ -11,16 +12,26 @@ namespace Ichni.Editor
{
public GameObject hierarchyTabPrefab;
public RectTransform tabContainer;
public Button addFolderButton;
public List<HierarchyTab> tabList;
private void Awake()
{
tabList = new List<HierarchyTab>();
addFolderButton.onClick.AddListener(() =>
{
ElementFolder.GenerateElement("New Folder", Guid.NewGuid(), new List<string>(), true, null);
});
}
public HierarchyTab GenerateTab(GameElement targetElement, GameElement parentElement)
{
HierarchyTab tab = Instantiate(hierarchyTabPrefab, tabContainer).GetComponent<HierarchyTab>();
//if(parentElement.connectedTab!=null)tab.transform.SetSiblingIndex(parentElement.connectedTab.transform.GetSiblingIndex());
tab.SetTab(targetElement, parentElement);
tabList.Add(tab);
return tab;
}
public void FindTab(GameElement targetElement, bool findparent = false)
{
if (targetElement.connectedTab != null)

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using UnityEditor;
using UnityEngine;
namespace Ichni.RhythmGame
@@ -38,7 +39,7 @@ namespace Ichni.RhythmGame
public void SaveBM()
{
matchedBM = new ProjectInformation_BM(projectName, creatorName, editorVersion,
matchedBM = new ProjectInformation_BM(projectName, creatorName, PlayerSettings.bundleVersion,
createTime, lastSaveTime, selectedThemeBundleList);
}

Binary file not shown.

View File

@@ -51,6 +51,7 @@ namespace Ichni
public void LoadThemeBundles(List<string> list)
{
waitingBundleAmount = new IntReactiveProperty(list.Count);
Debug.Log("Waiting for " + list.Count + " AssetBundles to load.");
foreach (var bundle in list)
{
LoadThemeBundle(bundle);
@@ -127,8 +128,8 @@ namespace Ichni
}
yield return new WaitForEndOfFrame();
waitingBundleAmount.Value--;
print(themeBundleName + " Done!");
waitingBundleAmount.Value--;
}
}

View File

@@ -13,6 +13,7 @@ namespace Ichni.Editor
public int musicVolume = 100;
public int soundFXVolume = 100;
public EditorSettings(int autoSaveInterval, int maximumAutoSaveCount, int musicVolume, int soundFXVolume)
{
this.autoSaveInterval = autoSaveInterval;
@@ -23,12 +24,13 @@ namespace Ichni.Editor
public static void SaveSettings(EditorSettings settings)
{
ES3.Save("EditorSettings", settings, Application.streamingAssetsPath + "/EditorSettings.es3");
ES3.Save("EditorSettings", settings, Application.persistentDataPath + "/EditorSettings.es3");
}
public static void LoadSettings(ref EditorSettings settings)
{
settings = ES3.Load<EditorSettings>("EditorSettings", Application.streamingAssetsPath + "/EditorSettings.es3");
settings = ES3.Load("EditorSettings", Application.persistentDataPath + "/EditorSettings.es3",
new EditorSettings(300, 3, 100, 100));
}
}
}

View File

@@ -16,11 +16,8 @@ using UnityEngine.UI;
namespace Ichni.StartMenu
{
public partial class CreateEmptyProjectPage : MonoBehaviour
public partial class CreateEmptyProjectPage : StartMenuPage
{
public CanvasGroup canvasGroup;
public Tweener fadeIn, fadeOut;
public TMP_InputField projectNameInputField, creatorNameInputField, bpmInputField, songLocationInputField, delayInputField;
public Button selectSongButton, autoFillSongPathButton;
public Button createEmptyProjectButton;
@@ -29,16 +26,10 @@ namespace Ichni.StartMenu
public string songName;
public ThemeBundleSelector themeBundleSelector;
private void Awake()
{
InitializeAnimations();
InitializeInfoUI();
}
private void Update()
{
if (Keyboard.current.escapeKey.wasPressedThisFrame)
if (canvasGroup.interactable && Keyboard.current.escapeKey.wasPressedThisFrame)
{
fadeOut.Restart();
}
@@ -87,9 +78,12 @@ namespace Ichni.StartMenu
public partial class CreateEmptyProjectPage
{
private void InitializeAnimations()
protected override void InitializeAnimations()
{
fadeIn = canvasGroup.DOFade(1f, 0.5f)
fadeIn = DOTween.Sequence();
fadeOut = DOTween.Sequence();
fadeIn.Join(canvasGroup.DOFade(1f, 0.5f))
.SetEase(Ease.InOutQuad)
.SetAutoKill(false)
.OnComplete(() =>
@@ -98,7 +92,7 @@ namespace Ichni.StartMenu
canvasGroup.blocksRaycasts = true;
}).Pause();
fadeOut = canvasGroup.DOFade(0f, 0.5f)
fadeOut.Join(canvasGroup.DOFade(0f, 0.5f))
.SetEase(Ease.InOutQuad)
.SetAutoKill(false)
.OnPlay(() =>
@@ -113,7 +107,7 @@ namespace Ichni.StartMenu
.Pause();
}
private void InitializeInfoUI()
protected override void InitializeUI()
{
songLocationInputField.onEndEdit.AddListener((str) =>
{
@@ -126,13 +120,13 @@ namespace Ichni.StartMenu
createEmptyProjectButton.onClick.AddListener(CreateEmptyProject);
}
public void AutoFillSongPath()
private void AutoFillSongPath()
{
string path = Application.streamingAssetsPath + "/Songs/";
songLocationInputField.text = path;
}
public void SelectSong()
private void SelectSong()
{
songFile = new OpenFileName();
songFile.structSize = Marshal.SizeOf(songFile);

View File

@@ -0,0 +1,81 @@
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Ichni.Editor;
using Michsky.MUIP;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
namespace Ichni.StartMenu
{
public partial class EditorSettingsPage : StartMenuPage
{
public EditorSettings editorSettings;
public TMP_InputField autoSaveIntervalInputField, autoSaveCountInputField;
public SliderManager musicVolumeSlider, sfxVolumeSlider;
public Button exitButton;
private void InitializePage()
{
EditorSettings.LoadSettings(ref editorSettings);
autoSaveIntervalInputField.text = editorSettings.autoSaveInterval.ToString();
autoSaveCountInputField.text = editorSettings.maximumAutoSaveCount.ToString();
musicVolumeSlider.mainSlider.value = editorSettings.musicVolume;
sfxVolumeSlider.mainSlider.value = editorSettings.soundFXVolume;
}
}
public partial class EditorSettingsPage
{
protected override void InitializeAnimations()
{
fadeIn = DOTween.Sequence();
fadeOut = DOTween.Sequence();
fadeIn.Join(canvasGroup.DOFade(1f, 0.5f))
.SetEase(Ease.InOutQuad)
.SetAutoKill(false)
.OnStart(InitializePage)
.OnComplete(() =>
{
canvasGroup.interactable = true;
canvasGroup.blocksRaycasts = true;
}).Pause();
fadeOut.Join(canvasGroup.DOFade(0f, 0.5f))
.SetEase(Ease.InOutQuad)
.SetAutoKill(false)
.OnPlay(() =>
{
canvasGroup.interactable = false;
canvasGroup.blocksRaycasts = false;
})
.OnComplete(() =>
{
StartMenuManager.instance.startPage.fadeIn.Restart();
})
.Pause();
}
protected override void InitializeUI()
{
exitButton.onClick.AddListener(() =>
{
SetSettings();
fadeOut.Restart();
});
}
private void SetSettings()
{
editorSettings.autoSaveInterval = int.Parse(autoSaveIntervalInputField.text);
editorSettings.maximumAutoSaveCount = int.Parse(autoSaveCountInputField.text);
editorSettings.musicVolume = (int)musicVolumeSlider.mainSlider.value;
editorSettings.soundFXVolume = (int)sfxVolumeSlider.mainSlider.value;
EditorSettings.SaveSettings(editorSettings);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1856d2da4fa454bc39c934451ba255f5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,6 +9,7 @@ namespace Ichni.StartMenu
public static StartMenuManager instance;
public StartPage startPage;
public CreateEmptyProjectPage createEmptyProjectPage;
public EditorSettingsPage editorSettingsPage;
private void Awake()
{

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
namespace Ichni.StartMenu
{
public abstract class StartMenuPage : MonoBehaviour
{
public CanvasGroup canvasGroup;
public Sequence fadeIn, fadeOut;
protected virtual void Awake()
{
InitializeAnimations();
InitializeUI();
}
protected abstract void InitializeAnimations();
protected abstract void InitializeUI();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bba8df6a5e67645e6a3abe5a21284437
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5,33 +5,21 @@ using DG.Tweening;
using Michsky.MUIP;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
namespace Ichni.StartMenu
{
public partial class StartPage : MonoBehaviour
public partial class StartPage : StartMenuPage
{
public RectTransform background;
public CanvasGroup canvasGroup;
public ButtonManager createEmptyProjectButton;
public Sequence fadeIn, fadeOut;
private void Awake()
{
InitializeAnimations();
createEmptyProjectButton.onClick.AddListener(GoToNewProjectPage);
}
public void GoToNewProjectPage()
{
fadeOut.Restart();
}
public Button editorSettingsButton;
}
public partial class StartPage
{
private void InitializeAnimations()
protected override void InitializeAnimations()
{
fadeIn = DOTween.Sequence();
fadeOut = DOTween.Sequence();
@@ -55,11 +43,31 @@ namespace Ichni.StartMenu
canvasGroup.interactable = false;
canvasGroup.blocksRaycasts = false;
})
.OnComplete(() =>
{
StartMenuManager.instance.createEmptyProjectPage.fadeIn.Restart();
})
.Pause();
}
protected override void InitializeUI()
{
createEmptyProjectButton.onClick.AddListener(GoToNewProjectPage);
editorSettingsButton.onClick.AddListener(GoToEditorSettingsPage);
}
private void GoToNewProjectPage()
{
fadeOut.onComplete = () =>
{
StartMenuManager.instance.createEmptyProjectPage.fadeIn.Restart();
};
fadeOut.Restart();
}
private void GoToEditorSettingsPage()
{
fadeOut.onComplete = () =>
{
StartMenuManager.instance.editorSettingsPage.fadeIn.Restart();
};
fadeOut.Restart();
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c04a091fb8e1643f2b44023f104565a6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 62346f0a0dfb6441d96da14d238f7070
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f2a232b4d03c145e092750bfd047f272
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f61d7eb74ed1142ceafd798394cf718d
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a47e8d3ae25f4422a983da72aea0c12c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ce71b9504d4854a9f901bcbbda9a0629
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b0d7b136796af46c0b1341389e65919c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
Assets/ThemeBundles/.DS_Store vendored Normal file

Binary file not shown.