Repair unity packet
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using OnlyScove.Scripts;
|
||||
using Hallucinate.Audio;
|
||||
using PrimeTween;
|
||||
@@ -51,7 +52,7 @@ namespace Hallucinate.UI
|
||||
private float _masterVol = 80f;
|
||||
private int _overlayActiveCount = 0;
|
||||
|
||||
public override void Initialize(VisualElement uxmlRoot, UIManager manager)
|
||||
/*public override void Initialize(VisualElement uxmlRoot, UIManager manager)
|
||||
{
|
||||
base.Initialize(uxmlRoot, manager);
|
||||
|
||||
@@ -96,7 +97,7 @@ namespace Hallucinate.UI
|
||||
// Render ban đầu
|
||||
RefreshUI();
|
||||
ApplyVideoSettings();
|
||||
}
|
||||
}*/
|
||||
|
||||
private void OnLanguageChanged()
|
||||
{
|
||||
@@ -127,31 +128,31 @@ namespace Hallucinate.UI
|
||||
|
||||
private void OnSidebarPointerEnter(PointerEnterEvent evt)
|
||||
{
|
||||
_hoverTimer.Stop();
|
||||
ExpandSidebar();
|
||||
/*_hoverTimer.Stop();
|
||||
ExpandSidebar();*/
|
||||
}
|
||||
|
||||
private void OnSidebarPointerLeave(PointerLeaveEvent evt)
|
||||
{
|
||||
_hoverTimer.Stop();
|
||||
CollapseSidebar();
|
||||
/*_hoverTimer.Stop();
|
||||
CollapseSidebar();*/
|
||||
}
|
||||
|
||||
private void ExpandSidebar()
|
||||
/*private void ExpandSidebar()
|
||||
{
|
||||
if (_isExpanded) return;
|
||||
_isExpanded = true;
|
||||
_tabsColumn.AddToClassList("sidebar-expanded");
|
||||
Tween.Custom(_tabsColumn.resolvedStyle.width, 240f, duration: 0.5f, ease: Ease.OutQuart, onValueChange: val => _tabsColumn.style.width = val);
|
||||
}
|
||||
}*/
|
||||
|
||||
private void CollapseSidebar()
|
||||
/*rivate void CollapseSidebar()
|
||||
{
|
||||
if (!_isExpanded) return;
|
||||
_isExpanded = false;
|
||||
_tabsColumn.RemoveFromClassList("sidebar-expanded");
|
||||
Tween.Custom(_tabsColumn.resolvedStyle.width, 80f, duration: 0.45f, ease: Ease.OutQuart, onValueChange: val => _tabsColumn.style.width = val);
|
||||
}
|
||||
}*/
|
||||
|
||||
private void RenderAllSettings()
|
||||
{
|
||||
@@ -186,9 +187,9 @@ namespace Hallucinate.UI
|
||||
HighlightTab(tabId);
|
||||
|
||||
float targetY = header.layout.y;
|
||||
Tween.Custom(_content.scrollOffset.y, targetY, duration: 0.5f, ease: Ease.OutQuart, onValueChange: val => {
|
||||
/*Tween.Custom(_content.scrollOffset.y, targetY, duration: 0.5f, ease: Ease.OutQuart, onValueChange: val => {
|
||||
_content.scrollOffset = new Vector2(0, val);
|
||||
}).OnComplete(() => _isManualScrolling = false);
|
||||
}).OnComplete(() => _isManualScrolling = false);*/
|
||||
}
|
||||
|
||||
private void OnScrollValueChanged(float val)
|
||||
@@ -497,11 +498,11 @@ namespace Hallucinate.UI
|
||||
_masterVolLabel.text = $"{Mathf.RoundToInt(_masterVol)}%";
|
||||
int currentId = _overlayActiveCount;
|
||||
await Task.Delay(3000);
|
||||
if (currentId == _overlayActiveCount && _hoveredSubVolume == null)
|
||||
/*if (currentId == _overlayActiveCount && _hoveredSubVolume == null)
|
||||
{
|
||||
Tween.Custom(1f, 0f, duration: 0.5f, onValueChange: val => _volumeContainer.style.opacity = val)
|
||||
.OnComplete(() => { if (_volumeContainer.style.opacity == 0f) _volumeContainer.style.display = DisplayStyle.None; });
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private VisualElement CreateSection(string title)
|
||||
@@ -585,7 +586,7 @@ namespace Hallucinate.UI
|
||||
}
|
||||
}
|
||||
|
||||
public override async Task PlayTransitionIn()
|
||||
/*public override async Task PlayTransitionIn()
|
||||
{
|
||||
root.style.display = DisplayStyle.Flex;
|
||||
_sidebar.style.translate = new StyleTranslate(new Translate(Length.Percent(-100), 0));
|
||||
@@ -596,7 +597,7 @@ namespace Hallucinate.UI
|
||||
{
|
||||
await Tween.Custom(0f, -100f, duration: 0.3f, ease: Ease.InQuad, onValueChange: val => _sidebar.style.translate = new StyleTranslate(new Translate(Length.Percent(val), 0)));
|
||||
Hide();
|
||||
}
|
||||
}*/
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user