@@ -20,7 +20,7 @@ namespace Ichni.UI
|
||||
public Button expandButton;
|
||||
public Button enterStorylineButton;
|
||||
public Button enterSongSelectionButton;
|
||||
|
||||
|
||||
public ChapterSelectionUnit connectedChapter;
|
||||
|
||||
public string chapterName;
|
||||
@@ -32,7 +32,7 @@ namespace Ichni.UI
|
||||
public bool isExpanded;
|
||||
public bool isDuringAnimation;
|
||||
|
||||
[Title("闭合内容")]
|
||||
[Title("闭合内容")]
|
||||
public Image bottomTip;
|
||||
public Image upperTip;
|
||||
public Image leftProgressBarBase;
|
||||
@@ -45,34 +45,34 @@ namespace Ichni.UI
|
||||
public RectTransform titleRect;
|
||||
public TMP_Text titleText;
|
||||
|
||||
[Title("展开内容")]
|
||||
[Title("展开内容")]
|
||||
public RectTransform expansionBackground;
|
||||
public Image expansionRipple;
|
||||
public Material rippleMaterial;
|
||||
public Sequence rippleSequence;
|
||||
|
||||
|
||||
public RectTransform expansionFunctions;
|
||||
|
||||
|
||||
public RectTransform expansionInfos;
|
||||
public TMP_Text innerSongProgressText;
|
||||
public TMP_Text fullComboText;
|
||||
public TMP_Text allPerfectText;
|
||||
public TMP_Text beatmapProgressText;
|
||||
|
||||
|
||||
|
||||
|
||||
public void Initialize(ChapterSelectionUnit chapter)
|
||||
{
|
||||
connectedChapter = chapter;
|
||||
expansionRipple.material = new Material(rippleMaterial);
|
||||
RefreshUnlockState();
|
||||
|
||||
|
||||
expandButton.onClick.AddListener(() =>
|
||||
{
|
||||
if (isDuringAnimation)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (isExpanded)
|
||||
{
|
||||
Shrink();
|
||||
@@ -82,7 +82,7 @@ namespace Ichni.UI
|
||||
Expand();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
enterStorylineButton.onClick.AddListener(() =>
|
||||
{
|
||||
if (isDuringAnimation)
|
||||
@@ -94,14 +94,14 @@ namespace Ichni.UI
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ChapterSelectionManager.instance.currentChapter = connectedChapter;
|
||||
AudioManager.SetSwitch(connectedChapter.chapterSwitch);
|
||||
ChapterSelectionManager.instance.chapterSelectionUIPage.FadeOut();
|
||||
StoryManager.instance.OpenChapter(connectedChapter.chapterIndex);
|
||||
StoryManager.instance.storyUIPage.FadeIn();
|
||||
});
|
||||
|
||||
|
||||
enterSongSelectionButton.onClick.AddListener(() =>
|
||||
{
|
||||
if (isDuringAnimation)
|
||||
@@ -113,7 +113,7 @@ namespace Ichni.UI
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ChapterSelectionManager.instance.currentChapter = connectedChapter;
|
||||
AudioManager.SetSwitch(connectedChapter.chapterSwitch);
|
||||
ChapterSelectionManager.instance.chapterSelectionUIPage.FadeOut();
|
||||
@@ -158,24 +158,24 @@ namespace Ichni.UI
|
||||
RefreshUnlockState();
|
||||
return !isLocked;
|
||||
}
|
||||
|
||||
|
||||
private void Expand()
|
||||
{
|
||||
isExpanded = true;
|
||||
|
||||
|
||||
Sequence expandSequence = DOTween.Sequence();
|
||||
|
||||
expandSequence.Append(expansionBackground.DOSizeDelta(new Vector2(1147, 826), 0.3f)
|
||||
|
||||
expandSequence.Append(expansionBackground.DOSizeDelta(new Vector2(1147, 826), 0.3f).SetEase(Ease.OutExpo)
|
||||
.OnStart(() =>
|
||||
{
|
||||
expansionBackground.gameObject.SetActive(true);
|
||||
}));
|
||||
expandSequence.Join(DOTween.To(() => layoutElement.preferredWidth,
|
||||
expandSequence.Join(DOTween.To(() => layoutElement.preferredWidth,
|
||||
x => layoutElement.preferredWidth = x, 1147, 0.3f));
|
||||
expandSequence.Join(avatarMask.rectTransform.DOSizeDelta(new Vector2(1147, 826), 0.3f));
|
||||
expandSequence.Join(titleRect.DOSizeDelta(new Vector2(0, 100), 0.3f));
|
||||
expandSequence.Append(expansionInfos.GetComponent<CanvasGroup>().DOFade(1, 0.3f)
|
||||
.OnStart(()=>
|
||||
.OnStart(() =>
|
||||
{
|
||||
expansionInfos.gameObject.SetActive(true);
|
||||
}));
|
||||
@@ -199,23 +199,23 @@ namespace Ichni.UI
|
||||
rippleSequence.SetLoops(-1);
|
||||
rippleSequence.Play();
|
||||
});
|
||||
|
||||
|
||||
expandSequence.Play();
|
||||
}
|
||||
|
||||
private void Shrink()
|
||||
{
|
||||
isExpanded = false;
|
||||
|
||||
|
||||
rippleSequence?.Kill(true);
|
||||
|
||||
|
||||
Sequence shrinkSequence = DOTween.Sequence();
|
||||
|
||||
|
||||
shrinkSequence.Append(bottomTip.DOFade(0f, 0.3f));
|
||||
shrinkSequence.Join(upperTip.DOFade(0f, 0.3f));
|
||||
|
||||
|
||||
shrinkSequence.Join(expansionInfos.GetComponent<CanvasGroup>().DOFade(0, 0.3f)
|
||||
.OnComplete(()=>
|
||||
.OnComplete(() =>
|
||||
{
|
||||
expansionInfos.gameObject.SetActive(false);
|
||||
}));
|
||||
@@ -224,22 +224,22 @@ namespace Ichni.UI
|
||||
{
|
||||
expansionFunctions.gameObject.SetActive(false);
|
||||
}));
|
||||
|
||||
|
||||
shrinkSequence.Join(titleRect.DOSizeDelta(new Vector2(322, 100), 0.3f));
|
||||
|
||||
|
||||
shrinkSequence.Append(expansionBackground.DOSizeDelta(new Vector2(322, 826), 0.3f)
|
||||
.OnComplete(() =>
|
||||
{
|
||||
expansionBackground.gameObject.SetActive(false);
|
||||
}));
|
||||
|
||||
shrinkSequence.Join(DOTween.To(() => layoutElement.preferredWidth,
|
||||
|
||||
shrinkSequence.Join(DOTween.To(() => layoutElement.preferredWidth,
|
||||
x => layoutElement.preferredWidth = x, 322, 0.3f));
|
||||
shrinkSequence.Join(avatarMask.rectTransform.DOSizeDelta(new Vector2(322, 826), 0.3f));
|
||||
|
||||
|
||||
shrinkSequence.OnStart(() => isDuringAnimation = true);
|
||||
shrinkSequence.OnComplete(() => isDuringAnimation = false);
|
||||
|
||||
|
||||
shrinkSequence.Play();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Ichni.Menu
|
||||
public Switch vSyncSwitch;
|
||||
public Dropdown displayModeDropdown;
|
||||
public Dropdown displayResolutionDropdown;
|
||||
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
qualityPresetDropdown.SetUp((int)gameSettings.graphicsQualityPreset, QualityPresetOptions,
|
||||
@@ -67,7 +67,7 @@ namespace Ichni.Menu
|
||||
gameSettings.renderScaleLevel = renderScaleModifier.GetValue();
|
||||
SettingsManager.instance.ApplyGraphicSettings();
|
||||
};
|
||||
|
||||
|
||||
targetFrameModifier.SetUp(gameSettings.targetFrame, 30, "Menu UI/Settings_Target_Frame");
|
||||
targetFrameModifier.SetMinMax(30, 120);
|
||||
targetFrameModifier.updateValueAction = () =>
|
||||
|
||||
Reference in New Issue
Block a user