修改ui样式
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
@@ -38,7 +38,7 @@ namespace NBF
|
||||
break;
|
||||
}
|
||||
}
|
||||
Log.Error($"showCursor={showCursor}");
|
||||
Log.Info($"showCursor={showCursor}");
|
||||
InputManager.IsUIStopInput = showCursor;
|
||||
InputManager.SetMouseCursor(showCursor);
|
||||
}
|
||||
|
||||
@@ -153,13 +153,14 @@ namespace NBF
|
||||
|
||||
private void InitUI()
|
||||
{
|
||||
UI.Inst.SetUITween<UITweenConfig>();
|
||||
Binder.BindAll();
|
||||
UIObjectFactory.SetLoaderExtension(typeof(XGLoader));
|
||||
UIConst.UIPackRootUrl = UIDef.UIRoot;
|
||||
UIConfig.verticalScrollBar = "ui://6hgkvlauoomej";
|
||||
UIConfig.defaultFont = "AlibabaPuHuiTi-3-Medium";
|
||||
UI.Inst.SetUILanguage<UILangeageConfig>();
|
||||
UIConfig.modalLayerColor = new Color(0, 0, 0, 0.99f);
|
||||
UIConfig.modalLayerColor = new Color(1, 1, 1, 0.2f);
|
||||
AddUIPackages();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@ namespace NBF
|
||||
// await Task.Delay(100);
|
||||
CommonTopPanel.Show();
|
||||
// SettingPanel.Show();
|
||||
LoginPanel.Show();
|
||||
// LoginPanel.Show();
|
||||
// MessageBox.Show();
|
||||
FishingShopPanel.Show();
|
||||
// PreviewPanel.Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// </summary>
|
||||
/// <param name="task">任务对象</param>
|
||||
void Run(ITask task);
|
||||
|
||||
|
||||
void Process();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace NBC
|
||||
{
|
||||
ReadyTask.Enqueue(task);
|
||||
}
|
||||
|
||||
|
||||
public virtual void Process()
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace NBC
|
||||
public virtual bool IsCanVisible => ContentPane != null && ContentPane.parent != null && ContentPane.visible;
|
||||
|
||||
public bool IsDotDel { get; protected set; }
|
||||
public bool IsDontBack { get; protected set; }
|
||||
public virtual string UIPackRootUrl => string.Empty;
|
||||
|
||||
public virtual string UIPackName { get; set; }
|
||||
@@ -43,12 +42,12 @@ namespace NBC
|
||||
/// <summary>
|
||||
/// 面板打开动画
|
||||
/// </summary>
|
||||
public NTask ShowAnim = null;
|
||||
public UIAnimTask ShowAnim = null;
|
||||
|
||||
/// <summary>
|
||||
/// 面板关闭动画
|
||||
/// </summary>
|
||||
public NTask HideAnim = null;
|
||||
public UIAnimTask HideAnim = null;
|
||||
|
||||
private object _paramData;
|
||||
private bool _isInited;
|
||||
@@ -141,16 +140,23 @@ namespace NBC
|
||||
if (!IsShowing)
|
||||
{
|
||||
GRoot.inst.AddChild(ContentPane);
|
||||
ContentPane.visible = true;
|
||||
_ui.AdjustModalLayer();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IsTop) _ui.BringToFront(this);
|
||||
if (IsModal)
|
||||
{
|
||||
_ui.AdjustModalLayer();
|
||||
}
|
||||
}
|
||||
|
||||
_ui.TryPlayPanelTween(ContentPane);
|
||||
OpenAnimBegin();
|
||||
if (ShowAnim != null)
|
||||
{
|
||||
ShowAnim.SetDefaultInfo();
|
||||
ShowAnim.OnCompleted(OpenAnimFinished, true);
|
||||
ShowAnim.Run(UIRunner.Def);
|
||||
}
|
||||
@@ -171,6 +177,7 @@ namespace NBC
|
||||
if (!IsShowing) return;
|
||||
if (HideAnim != null)
|
||||
{
|
||||
HideAnim.SetDefaultInfo();
|
||||
HideAnim.OnCompleted(HideAnimFinished);
|
||||
HideAnim.Run(UIRunner.Def);
|
||||
}
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// ui界面默认动画
|
||||
/// </summary>
|
||||
public class PanelAnimationDef : NTask
|
||||
{
|
||||
public enum AnimType
|
||||
{
|
||||
CenterScaleBig = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 上往中滑动--
|
||||
/// </summary>
|
||||
UpToSlide = 1,
|
||||
|
||||
/// <summary>
|
||||
/// //下往中滑动
|
||||
/// </summary>
|
||||
DownToSlide = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 左往中--
|
||||
/// </summary>
|
||||
LeftToSlide = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 右往中--
|
||||
/// </summary>
|
||||
RightToSlide = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 透明度
|
||||
/// </summary>
|
||||
Fade = 5
|
||||
}
|
||||
|
||||
private bool _isClose;
|
||||
private GComponent _node;
|
||||
private AnimType _animType;
|
||||
|
||||
|
||||
public PanelAnimationDef(GComponent node, AnimType animType = AnimType.CenterScaleBig, bool close = false)
|
||||
{
|
||||
_node = node;
|
||||
_isClose = close;
|
||||
_animType = animType;
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
{
|
||||
if (_animType == AnimType.CenterScaleBig)
|
||||
{
|
||||
var strat = _isClose ? Vector3.one : Vector3.zero;
|
||||
var end = _isClose ? Vector3.zero : Vector3.one;
|
||||
var easeType = _isClose ? EaseType.BackIn : EaseType.BackOut;
|
||||
|
||||
GTween.To(strat, end, 0.5f)
|
||||
.SetEase(easeType)
|
||||
.SetTarget(_node, TweenPropType.Scale)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.UpToSlide || _animType == AnimType.DownToSlide)
|
||||
{
|
||||
var hight = GRoot.inst.viewHeight;
|
||||
var y = _animType == AnimType.UpToSlide ? -hight : hight;
|
||||
var strat = _isClose ? 0 : y;
|
||||
var end = _isClose ? y : 0;
|
||||
|
||||
GTween.To(strat, end, 0.5f)
|
||||
.SetEase(EaseType.CubicOut)
|
||||
.SetTarget(_node, TweenPropType.Y)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.LeftToSlide || _animType == AnimType.RightToSlide)
|
||||
{
|
||||
var width = GRoot.inst.viewWidth;
|
||||
|
||||
var x = _animType == AnimType.LeftToSlide ? -width : width;
|
||||
|
||||
var strat = _isClose ? 0 : x;
|
||||
var end = _isClose ? x : 0;
|
||||
|
||||
GTween.To(strat, end, 0.5f)
|
||||
.SetEase(EaseType.CubicOut)
|
||||
.SetTarget(_node, TweenPropType.X)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.Fade)
|
||||
{
|
||||
var s = _isClose ? 1 : 0;
|
||||
var end = _isClose ? 0 : 1;
|
||||
_node.alpha = s;
|
||||
GTween.To(s, end, 0.5f)
|
||||
.SetEase(EaseType.Linear)
|
||||
.SetTarget(_node, TweenPropType.Alpha)
|
||||
.OnStart(() => { })
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class UIPanelAnimation
|
||||
{
|
||||
public static NTask GetCenterScaleBig(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.CenterScaleBig, close);
|
||||
}
|
||||
|
||||
public static NTask GetUpToSlide(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.UpToSlide, close);
|
||||
}
|
||||
|
||||
public static NTask GetDownToSlide(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.DownToSlide, close);
|
||||
}
|
||||
|
||||
public static NTask GetLeftToSlide(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.LeftToSlide, close);
|
||||
}
|
||||
|
||||
public static NTask GetRightToSlide(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.RightToSlide, close);
|
||||
}
|
||||
|
||||
public static NTask GetFade(IUIPanel panel, bool close = false)
|
||||
{
|
||||
return new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.Fade, close);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,12 @@ namespace NBC
|
||||
|
||||
private GGraph _modalLayer;
|
||||
private GRoot _uiRoot;
|
||||
|
||||
private UIComponentLanguagePack _uiLanguageConfig;
|
||||
|
||||
// 新增 Tween 配置
|
||||
private UIComponentTweenPack _uiTweenConfig;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Log.Info("UI 模块初始化");
|
||||
@@ -55,6 +59,7 @@ namespace NBC
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplyPanelRootTween(panel); // 根动效设置为 ShowAnim
|
||||
panel.Show();
|
||||
}
|
||||
}
|
||||
@@ -94,6 +99,51 @@ namespace NBC
|
||||
|
||||
#endregion
|
||||
|
||||
#region 动画
|
||||
|
||||
public void SetUITween<T>() where T : UIComponentTweenPack
|
||||
{
|
||||
_uiTweenConfig = Activator.CreateInstance<T>();
|
||||
}
|
||||
|
||||
public void TryPlayComponentTween(GComponent component)
|
||||
{
|
||||
_uiTweenConfig?.TryPlayComponentTween(component);
|
||||
}
|
||||
|
||||
public void TryPlayPanelTween(GComponent component)
|
||||
{
|
||||
_uiTweenConfig?.TryPlayPanelTween(component);
|
||||
}
|
||||
|
||||
private void ApplyPanelRootTween(IUIPanel panel)
|
||||
{
|
||||
if (panel?.ContentPane == null || _uiTweenConfig == null) return;
|
||||
var url = panel.ContentPane.resourceURL;
|
||||
if (string.IsNullOrEmpty(url)) return;
|
||||
var tweenName = _uiTweenConfig.GetRootTween(url);
|
||||
if (string.IsNullOrEmpty(tweenName)) return;
|
||||
if (panel is not UIPanel upPanel) return; // 需要具体 UIPanel 才能设置 ShowAnim
|
||||
|
||||
if (upPanel.ShowAnim != null) return;
|
||||
switch (tweenName)
|
||||
{
|
||||
case "Fade": upPanel.ShowAnim = UIPanelAnimation.GetFade(upPanel); break;
|
||||
case "Scale": upPanel.ShowAnim = UIPanelAnimation.GetCenterScaleBig(upPanel); break;
|
||||
case "Pop": upPanel.ShowAnim = UIPanelAnimation.GetCenterPopScaleFade(upPanel); break;
|
||||
case "SlideInL": upPanel.ShowAnim = UIPanelAnimation.GetLeftToSlideFade(upPanel); break;
|
||||
case "SlideInR": upPanel.ShowAnim = UIPanelAnimation.GetRightToSlideFade(upPanel); break;
|
||||
case "SlideInT": upPanel.ShowAnim = UIPanelAnimation.GetUpToSlideFade(upPanel); break;
|
||||
case "SlideInB": upPanel.ShowAnim = UIPanelAnimation.GetDownToSlideFade(upPanel); break;
|
||||
case "Bounce": upPanel.ShowAnim = UIPanelAnimation.GetBounceVertical(upPanel); break;
|
||||
case "Rotate": upPanel.ShowAnim = UIPanelAnimation.GetRotate(upPanel); break;
|
||||
case "Shake": upPanel.ShowAnim = UIPanelAnimation.GetShake(upPanel); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void OpenUI<T>(object param = null)
|
||||
{
|
||||
Type type = typeof(T);
|
||||
|
||||
3
Assets/Scripts/NBC/UI/Runtime/UITween.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2fcace3b3ca4e21948ba0bce5002c82
|
||||
timeCreated: 1770173105
|
||||
7
Assets/Scripts/NBC/UI/Runtime/UITween/UIAnimTask.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace NBC
|
||||
{
|
||||
public abstract class UIAnimTask : NTask
|
||||
{
|
||||
public abstract void SetDefaultInfo();
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/NBC/UI/Runtime/UITween/UIAnimTask.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22a6b4eac2614a4e9d0872508f9f7249
|
||||
timeCreated: 1770179810
|
||||
103
Assets/Scripts/NBC/UI/Runtime/UITween/UIPackageTween.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
public class UIComponentTween : Dictionary<string, string>
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 组件动效配置包。与 UIComponentLanguagePack 结构类似,根据 resourceURL 映射到每个组件的子节点动效名称。
|
||||
/// </summary>
|
||||
public abstract class UIComponentTweenPack : Dictionary<string, UIComponentTween>
|
||||
{
|
||||
public bool Has(string url)
|
||||
{
|
||||
return ContainsKey(url);
|
||||
}
|
||||
|
||||
public void TryPlayComponentTween(GComponent component)
|
||||
{
|
||||
if (component == null || component.packageItem == null) return;
|
||||
if (!Has(component.resourceURL)) return;
|
||||
PlayComponentTween(component);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 面板调用,不判断是否存在,根节点如果配置了 __root__ 会播放。
|
||||
/// </summary>
|
||||
public void TryPlayPanelTween(GComponent component)
|
||||
{
|
||||
if (component == null) return;
|
||||
PlayComponentTween(component);
|
||||
}
|
||||
|
||||
public string GetRootTween(string url)
|
||||
{
|
||||
if (TryGetValue(url, out var cfg) && cfg != null && cfg.TryGetValue("__root__", out var tween))
|
||||
return tween;
|
||||
return null;
|
||||
}
|
||||
|
||||
public void PlayComponentTween(GComponent component)
|
||||
{
|
||||
if (component == null) return;
|
||||
bool comHasTweenConfig = false;
|
||||
UIComponentTween tweenCfg = null;
|
||||
if (component.packageItem != null && TryGetValue(component.resourceURL, out tweenCfg))
|
||||
{
|
||||
comHasTweenConfig = true;
|
||||
}
|
||||
|
||||
var count = component.numChildren;
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var child = component.GetChildAt(i);
|
||||
if (child.packageItem != null && child is GComponent childCom)
|
||||
{
|
||||
PlayComponentTween(childCom); // 先递归子组件
|
||||
}
|
||||
|
||||
if (comHasTweenConfig)
|
||||
{
|
||||
var id = child.id;
|
||||
if (tweenCfg.TryGetValue(id, out var tweenName))
|
||||
{
|
||||
PlayTween(child, tweenName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 顶层UIPanel根节点动效改由 UIManager 设置 ShowAnim,不在这里直接播放
|
||||
if (component.parent == GRoot.inst) return;
|
||||
// if (comHasTweenConfig && tweenCfg.TryGetValue("__root__", out var rootTween))
|
||||
// {
|
||||
// PlayTween(component, rootTween);
|
||||
// }
|
||||
}
|
||||
|
||||
private static readonly Dictionary<string, Action<GObject>> TweenMap =
|
||||
new()
|
||||
{
|
||||
["Fade"] = o => o.TweenFadeShow(),
|
||||
["Scale"] = o => o.TweenScaleShow(),
|
||||
["Pop"] = o => o.TweenPopShow(),
|
||||
["SlideInL"] = o => o.TweenSlideInLeft(),
|
||||
["SlideInR"] = o => o.TweenSlideInRight(),
|
||||
["SlideInT"] = o => o.TweenSlideInTop(),
|
||||
["SlideInB"] = o => o.TweenSlideInBottom(),
|
||||
["Bounce"] = o => o.TweenBounceShow(),
|
||||
["Rotate"] = o => o.TweenRotateShow(),
|
||||
["Shake"] = o => o.TweenShake()
|
||||
};
|
||||
|
||||
private void PlayTween(GObject target, string tweenName)
|
||||
{
|
||||
if (target == null || string.IsNullOrEmpty(tweenName)) return;
|
||||
if (TweenMap.TryGetValue(tweenName, out var act))
|
||||
act(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cd2e8cf13594c1fbef585689b1fbffa
|
||||
timeCreated: 1770173219
|
||||
266
Assets/Scripts/NBC/UI/Runtime/UITween/UIPanelAnimation.cs
Normal file
@@ -0,0 +1,266 @@
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// ui界面默认动画
|
||||
/// </summary>
|
||||
public class PanelAnimationDef : UIAnimTask
|
||||
{
|
||||
public enum AnimType
|
||||
{
|
||||
CenterScaleBig = 0,
|
||||
|
||||
/// <summary>上往中滑动--</summary>
|
||||
UpToSlide = 1,
|
||||
|
||||
/// <summary>//下往中滑动</summary>
|
||||
DownToSlide = 2,
|
||||
|
||||
/// <summary>左往中--</summary>
|
||||
LeftToSlide = 3,
|
||||
|
||||
/// <summary>右往中--</summary>
|
||||
RightToSlide = 4,
|
||||
|
||||
/// <summary>透明度</summary>
|
||||
Fade = 5,
|
||||
|
||||
//
|
||||
CenterPopScaleFade = 6,
|
||||
UpToSlideFade = 7,
|
||||
DownToSlideFade = 8,
|
||||
LeftToSlideFade = 9,
|
||||
RightToSlideFade = 10,
|
||||
BounceVertical = 11,
|
||||
Rotate = 12,
|
||||
Shake = 13,
|
||||
}
|
||||
|
||||
private bool _isClose;
|
||||
private GComponent _node;
|
||||
private AnimType _animType;
|
||||
private float _animTime;
|
||||
|
||||
|
||||
public PanelAnimationDef(GComponent node, AnimType animType = AnimType.CenterScaleBig, bool close = false,
|
||||
float animTime = 0.5F)
|
||||
{
|
||||
_node = node;
|
||||
_isClose = close;
|
||||
_animType = animType;
|
||||
_animTime = animTime;
|
||||
}
|
||||
|
||||
protected override void OnStart()
|
||||
{
|
||||
if (_node == null)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// 直接使用 UITweenDynamic 扩展方法处理新增复合效果
|
||||
switch (_animType)
|
||||
{
|
||||
case AnimType.CenterPopScaleFade:
|
||||
if (!_isClose)
|
||||
_node.TweenPopShow(callback: Finish);
|
||||
else
|
||||
_node.TweenPopHide(callback: Finish);
|
||||
return;
|
||||
case AnimType.UpToSlideFade:
|
||||
if (!_isClose)
|
||||
_node.TweenSlideInTop(callback: Finish);
|
||||
else
|
||||
_node.TweenSlideOutTop(callback: Finish);
|
||||
return;
|
||||
case AnimType.DownToSlideFade:
|
||||
if (!_isClose)
|
||||
_node.TweenSlideInBottom(callback: Finish);
|
||||
else
|
||||
_node.TweenSlideOutBottom(callback: Finish);
|
||||
return;
|
||||
case AnimType.LeftToSlideFade:
|
||||
if (!_isClose)
|
||||
_node.TweenSlideInLeft(callback: Finish);
|
||||
else
|
||||
_node.TweenSlideOutLeft(callback: Finish);
|
||||
return;
|
||||
case AnimType.RightToSlideFade:
|
||||
if (!_isClose)
|
||||
_node.TweenSlideInRight(callback: Finish);
|
||||
else
|
||||
_node.TweenSlideOutRight(callback: Finish);
|
||||
return;
|
||||
case AnimType.BounceVertical:
|
||||
if (!_isClose)
|
||||
_node.TweenBounceShow(callback: Finish); // 向上偏移进入
|
||||
else
|
||||
_node.TweenBounceHide(callback: Finish);
|
||||
return;
|
||||
case AnimType.Rotate:
|
||||
if (!_isClose)
|
||||
_node.TweenRotateShow(callback: Finish);
|
||||
else
|
||||
_node.TweenRotateHide(callback: Finish);
|
||||
return;
|
||||
case AnimType.Shake:
|
||||
// shake 只在打开时使用,关闭直接结束
|
||||
if (_isClose)
|
||||
{
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
|
||||
_node.TweenShakeShow(callback: Finish);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (_animType == AnimType.CenterScaleBig)
|
||||
{
|
||||
var strat = _isClose ? Vector3.one : Vector3.zero;
|
||||
var end = _isClose ? Vector3.zero : Vector3.one;
|
||||
var easeType = _isClose ? EaseType.BackIn : EaseType.BackOut;
|
||||
GTween.To(strat, end, _animTime)
|
||||
.SetEase(easeType)
|
||||
.SetTarget(_node, TweenPropType.Scale)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.UpToSlide || _animType == AnimType.DownToSlide)
|
||||
{
|
||||
var safeAreaY = UI.Inst.GetSafeArea().y;
|
||||
var hight = GRoot.inst.viewHeight;
|
||||
var y = _animType == AnimType.UpToSlide ? -hight : hight;
|
||||
var strat = _isClose ? 0 : y;
|
||||
var end = _isClose ? y : safeAreaY;
|
||||
GTween.To(strat, end, _animTime)
|
||||
.SetEase(EaseType.CubicOut)
|
||||
.SetTarget(_node, TweenPropType.Y)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.LeftToSlide || _animType == AnimType.RightToSlide)
|
||||
{
|
||||
var width = GRoot.inst.viewWidth;
|
||||
var x = _animType == AnimType.LeftToSlide ? -width : width;
|
||||
var strat = _isClose ? 0 : x;
|
||||
var end = _isClose ? x : 0;
|
||||
GTween.To(strat, end, _animTime)
|
||||
.SetEase(EaseType.CubicOut)
|
||||
.SetTarget(_node, TweenPropType.X)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
else if (_animType == AnimType.Fade)
|
||||
{
|
||||
var s = _isClose ? 1 : 0;
|
||||
var end = _isClose ? 0 : 1;
|
||||
_node.alpha = s;
|
||||
GTween.To(s, end, _animTime)
|
||||
.SetEase(EaseType.Linear)
|
||||
.SetTarget(_node, TweenPropType.Alpha)
|
||||
.OnComplete(Finish);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置默认的状态
|
||||
/// </summary>
|
||||
public override void SetDefaultInfo()
|
||||
{
|
||||
switch (_animType)
|
||||
{
|
||||
case AnimType.CenterScaleBig:
|
||||
_node.scale = _isClose ? Vector2.one : Vector2.zero;
|
||||
break;
|
||||
case AnimType.UpToSlide:
|
||||
case AnimType.DownToSlide:
|
||||
var hight = GRoot.inst.viewHeight;
|
||||
var y = _animType == AnimType.UpToSlide ? -hight : hight;
|
||||
_node.y = _isClose ? 0 : y;
|
||||
break;
|
||||
case AnimType.LeftToSlide:
|
||||
case AnimType.RightToSlide:
|
||||
var width = GRoot.inst.viewWidth;
|
||||
var x = _animType == AnimType.LeftToSlide ? -width : width;
|
||||
_node.x = _isClose ? 0 : x;
|
||||
break;
|
||||
case AnimType.Fade:
|
||||
_node.alpha = _isClose ? 1 : 0;
|
||||
break;
|
||||
case AnimType.CenterPopScaleFade:
|
||||
_node.scale = _isClose ? Vector2.one : new Vector2(0.8f, 0.8f);
|
||||
_node.alpha = _isClose ? 1 : 0;
|
||||
break;
|
||||
case AnimType.UpToSlideFade:
|
||||
|
||||
break;
|
||||
case AnimType.DownToSlideFade:
|
||||
|
||||
break;
|
||||
case AnimType.LeftToSlideFade:
|
||||
|
||||
break;
|
||||
case AnimType.RightToSlideFade:
|
||||
|
||||
break;
|
||||
case AnimType.BounceVertical:
|
||||
|
||||
break;
|
||||
case AnimType.Rotate:
|
||||
|
||||
break;
|
||||
case AnimType.Shake:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class UIPanelAnimation
|
||||
{
|
||||
public static UIAnimTask GetCenterScaleBig(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.CenterScaleBig, close, animTime);
|
||||
|
||||
public static UIAnimTask GetUpToSlide(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.UpToSlide, close, animTime);
|
||||
|
||||
public static UIAnimTask GetDownToSlide(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.DownToSlide, close, animTime);
|
||||
|
||||
public static UIAnimTask GetLeftToSlide(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.LeftToSlide, close, animTime);
|
||||
|
||||
public static UIAnimTask GetRightToSlide(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.RightToSlide, close, animTime);
|
||||
|
||||
public static UIAnimTask GetFade(IUIPanel panel, bool close = false, float animTime = 0.5F)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.Fade, close, animTime);
|
||||
|
||||
// 新增复合动效获取方法
|
||||
public static UIAnimTask GetCenterPopScaleFade(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.CenterPopScaleFade, close);
|
||||
|
||||
public static UIAnimTask GetUpToSlideFade(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.UpToSlideFade, close);
|
||||
|
||||
public static UIAnimTask GetDownToSlideFade(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.DownToSlideFade, close);
|
||||
|
||||
public static UIAnimTask GetLeftToSlideFade(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.LeftToSlideFade, close);
|
||||
|
||||
public static UIAnimTask GetRightToSlideFade(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.RightToSlideFade, close);
|
||||
|
||||
public static UIAnimTask GetBounceVertical(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.BounceVertical, close);
|
||||
|
||||
public static UIAnimTask GetRotate(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.Rotate, close);
|
||||
|
||||
public static UIAnimTask GetShake(IUIPanel panel, bool close = false)
|
||||
=> new PanelAnimationDef(panel.ContentPane, PanelAnimationDef.AnimType.Shake, close);
|
||||
}
|
||||
}
|
||||
840
Assets/Scripts/NBC/UI/Runtime/UITween/UITweenDynamic.cs
Normal file
@@ -0,0 +1,840 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
public enum UISlideDirection
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Top,
|
||||
Bottom
|
||||
}
|
||||
|
||||
public static class UITweenDynamic
|
||||
{
|
||||
private class TweenContext
|
||||
{
|
||||
public GObject target;
|
||||
public float alpha;
|
||||
public float scaleX;
|
||||
public float scaleY;
|
||||
public Vector3 position;
|
||||
public float rotation;
|
||||
public bool visible;
|
||||
public Action callback;
|
||||
}
|
||||
|
||||
private static readonly Dictionary<GObject, TweenContext> _contexts = new Dictionary<GObject, TweenContext>();
|
||||
|
||||
private static TweenContext Capture(GObject target, Action callback)
|
||||
{
|
||||
return new TweenContext
|
||||
{
|
||||
target = target,
|
||||
alpha = target.alpha,
|
||||
scaleX = target.scaleX,
|
||||
scaleY = target.scaleY,
|
||||
position = target.position,
|
||||
rotation = target.rotation,
|
||||
visible = target.visible,
|
||||
callback = callback
|
||||
};
|
||||
}
|
||||
|
||||
// 启动新动画:如存在旧动画,先还原并调用旧回调,再杀死旧 tweens,注册新上下文
|
||||
private static TweenContext StartNewAnimation(GObject target, Action newCallback)
|
||||
{
|
||||
if (target == null) return null;
|
||||
if (_contexts.TryGetValue(target, out var oldCtx))
|
||||
{
|
||||
// 还原旧动画状态
|
||||
if (oldCtx.target != null)
|
||||
{
|
||||
oldCtx.target.alpha = oldCtx.alpha;
|
||||
oldCtx.target.SetScale(oldCtx.scaleX, oldCtx.scaleY);
|
||||
oldCtx.target.position = oldCtx.position;
|
||||
oldCtx.target.rotation = oldCtx.rotation;
|
||||
oldCtx.target.visible = oldCtx.visible;
|
||||
}
|
||||
|
||||
// 调用旧动画的回调
|
||||
oldCtx.callback?.Invoke();
|
||||
_contexts.Remove(target);
|
||||
}
|
||||
|
||||
GTween.Kill(target);
|
||||
var ctx = Capture(target, newCallback);
|
||||
_contexts[target] = ctx;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
private static void FinishAnimation(GObject target)
|
||||
{
|
||||
if (target == null) return;
|
||||
if (_contexts.TryGetValue(target, out var ctx))
|
||||
{
|
||||
_contexts.Remove(target);
|
||||
ctx.callback?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
#region UIPanel UI动效 (wrappers)
|
||||
|
||||
public static void TweenFadeShow<T>(this T self, float duration = 0.45f, Action callback = null)
|
||||
where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenFadeShow(duration, callback);
|
||||
}
|
||||
|
||||
public static void TweenFadeHide<T>(this T self, float duration = 0.3f, Action callback = null)
|
||||
where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenFadeHide(duration, callback);
|
||||
}
|
||||
|
||||
public static void TweenScaleShow<T>(this T self, float duration = 0.3f,
|
||||
float fromScale = 0.8f, EaseType ease = EaseType.BackOut, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
// GComponent.TweenScaleShow signature: (duration, callback, fromScale, ease)
|
||||
pane.TweenScaleShow(duration, callback, fromScale, ease);
|
||||
}
|
||||
|
||||
public static void TweenScaleHide<T>(this T self, float duration = 0.2f,
|
||||
float toScale = 0.8f, EaseType ease = EaseType.QuadIn, bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
// GComponent.TweenScaleHide signature: (duration, callback, toScale, ease, resetAfter, setInvisible)
|
||||
pane.TweenScaleHide(duration, callback, toScale, ease, resetAfter, setInvisible);
|
||||
}
|
||||
|
||||
public static void TweenPopShow<T>(this T self, float duration = 0.2f,
|
||||
float fromScale = 0.8f, EaseType ease = EaseType.BackOut, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenPopShow(duration, callback, fromScale, ease);
|
||||
}
|
||||
|
||||
public static void TweenPopHide<T>(this T self, float duration = 0.2f, Action callback = null,
|
||||
float toScale = 0.8f, EaseType ease = EaseType.QuadIn, bool setInvisible = true) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenPopHide(duration, callback, toScale, ease, setInvisible);
|
||||
}
|
||||
|
||||
public static void TweenSlideInLeft<T>(this T self, float moveTime = 0.5f, float startFadeTimeRate = 0.42f,
|
||||
float startAlpha = 0, float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideInLeft(moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset, ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutLeft<T>(this T self, float moveTime = 0.3f, float startFadeTimeRate = 0,
|
||||
float alphaTime = 0.08f, float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideOutLeft(moveTime, startFadeTimeRate, alphaTime, extraOffset, ease, resetAfter, setInvisible,
|
||||
callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInRight<T>(this T self, float moveTime = 0.5f, float startFadeTimeRate = 0.42f,
|
||||
float startAlpha = 0, float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideInRight(moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset, ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutRight<T>(this T self, float moveTime = 0.3f, float startFadeTimeRate = 0,
|
||||
float alphaTime = 0.08f, float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideOutRight(moveTime, startFadeTimeRate, alphaTime, extraOffset, ease, resetAfter, setInvisible,
|
||||
callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInTop<T>(this T self, float moveTime = 0.35f, float startFadeTimeRate = 0.3f,
|
||||
float startAlpha = 0, float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideInTop(moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset, ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutTop<T>(this T self, float moveTime = 0.3f, float startFadeTimeRate = 0,
|
||||
float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideOutTop(moveTime, startFadeTimeRate, alphaTime, extraOffset, ease, resetAfter, setInvisible,
|
||||
callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInBottom<T>(this T self, float moveTime = 0.35f, float startFadeTimeRate = 0.3f,
|
||||
float startAlpha = 0, float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideInBottom(moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset, ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutBottom<T>(this T self, float moveTime = 0.3f, float startFadeTimeRate = 0,
|
||||
float alphaTime = 0.1f, float extraOffset = 0f, EaseType ease = EaseType.QuadIn, bool resetAfter = true,
|
||||
bool setInvisible = true, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideOutBottom(moveTime, startFadeTimeRate, alphaTime, extraOffset, ease, resetAfter,
|
||||
setInvisible, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideIn<T>(this T self, UISlideDirection direction, float moveTime = 0.35f,
|
||||
float startFadeTimeRate = 0.1f,
|
||||
float startAlpha = 0, float alphaTime = 0.2f, float extraOffset = 0f, EaseType ease = EaseType.QuadOut,
|
||||
Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideIn(direction, moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset, ease,
|
||||
callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOut<T>(this T self, UISlideDirection direction, float moveTime = 0.35f,
|
||||
float startFadeTimeRate = 0.1f,
|
||||
float alphaTime = 0.2f, float extraOffset = 0f, EaseType ease = EaseType.QuadIn, bool resetAfter = true,
|
||||
bool setInvisible = true, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenSlideOut(direction, moveTime, startFadeTimeRate, alphaTime, extraOffset, ease, resetAfter,
|
||||
setInvisible, callback);
|
||||
}
|
||||
|
||||
public static void TweenBounceShow<T>(this T self, float duration = 0.4f, Action callback = null,
|
||||
float fromYOffset = -100f) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenBounceShow(duration, callback, fromYOffset);
|
||||
}
|
||||
|
||||
public static void TweenBounceHide<T>(this T self, float duration = 0.25f, Action callback = null,
|
||||
float toYOffset = 100f, bool resetAfter = true, bool setInvisible = true) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenBounceHide(duration, callback, toYOffset, resetAfter, setInvisible);
|
||||
}
|
||||
|
||||
public static void TweenRotateShow<T>(this T self, float duration = 0.2f, Action callback = null,
|
||||
float fromRotation = -90f, EaseType ease = EaseType.BackOut) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenRotateShow(duration, callback, fromRotation, ease);
|
||||
}
|
||||
|
||||
public static void TweenRotateHide<T>(this T self, float duration = 0.2f, Action callback = null,
|
||||
float toRotation = -90f, EaseType ease = EaseType.QuadIn, bool resetAfter = true, bool setInvisible = true)
|
||||
where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenRotateHide(duration, callback, toRotation, ease, resetAfter, setInvisible);
|
||||
}
|
||||
|
||||
public static void TweenShake<T>(this T self, float duration = 0.4f, Action callback = null,
|
||||
float amplitude = 12f, bool horizontal = true, int vibrato = 6) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenShake(duration, callback, amplitude, horizontal, vibrato);
|
||||
}
|
||||
|
||||
public static void TweenShakeShow<T>(this T self, float durationScale = 0.2f, float ScaleStart = 0.3f,
|
||||
float ScaleEnd = 1f, int shake = 4,
|
||||
float shakeRotation = 18f, float duration = 1, Action callback = null) where T : IUIPanel
|
||||
{
|
||||
var pane = self?.ContentPane;
|
||||
if (pane == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
pane.TweenShakeShow(durationScale, ScaleStart, ScaleEnd, shake, shakeRotation, duration, callback);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GComponent UI动效
|
||||
|
||||
public static void TweenFadeShow(this GObject self, float duration = 0.45f, Action callback = null)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
self.alpha = 0f;
|
||||
self.TweenFade(1f, duration).OnComplete(() => { FinishAnimation(self); });
|
||||
}
|
||||
|
||||
public static void TweenFadeHide(this GObject self, float duration = 0.3f, Action callback = null)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
self.alpha = 1f;
|
||||
self.TweenFade(0f, duration).OnComplete(() => { FinishAnimation(self); });
|
||||
}
|
||||
|
||||
public static void TweenScaleShow(this GObject self, float duration = 0.3f, Action callback = null,
|
||||
float fromScale = 0f, EaseType ease = EaseType.BackOut)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
self.SetPivot(0.5f, 0.5f, false);
|
||||
self.SetScale(0, 0);
|
||||
var ox = self.scaleX;
|
||||
var oy = self.scaleY;
|
||||
self.visible = true;
|
||||
self.SetScale(fromScale, fromScale);
|
||||
self.TweenScale(new Vector2(ox, oy), duration).SetEase(ease).OnComplete(() => { FinishAnimation(self); });
|
||||
}
|
||||
|
||||
public static void TweenScaleHide(this GObject self, float duration = 0.2f, Action callback = null,
|
||||
float toScale = 0.8f, EaseType ease = EaseType.QuadIn, bool resetAfter = true, bool setInvisible = true)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
self.SetPivot(0.5f, 0.5f, false);
|
||||
self.SetScale(1, 1);
|
||||
var ox = self.scaleX;
|
||||
var oy = self.scaleY;
|
||||
self.TweenScale(new Vector2(toScale, toScale), duration).SetEase(ease).OnComplete(() =>
|
||||
{
|
||||
if (resetAfter) self.SetScale(ox, oy);
|
||||
if (setInvisible) self.visible = false;
|
||||
FinishAnimation(self);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenPopShow(this GObject self, float duration = 0.2f, Action callback = null,
|
||||
float fromScale = 0.8f, EaseType ease = EaseType.BackOut)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ox = self.scaleX;
|
||||
var oy = self.scaleY;
|
||||
self.visible = true;
|
||||
self.SetScale(fromScale, fromScale);
|
||||
self.alpha = 0f;
|
||||
int remain = 2;
|
||||
|
||||
void Done()
|
||||
{
|
||||
if (--remain == 0) FinishAnimation(self);
|
||||
}
|
||||
|
||||
self.TweenScale(new Vector2(ox, oy), duration).SetEase(ease).OnComplete(Done);
|
||||
self.TweenFade(1f, duration * 0.9f).SetEase(EaseType.QuadOut).OnComplete(Done);
|
||||
}
|
||||
|
||||
public static void TweenPopHide(this GObject self, float duration = 0.2f, Action callback = null,
|
||||
float toScale = 0.8f, EaseType ease = EaseType.QuadIn, bool setInvisible = true)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ox = self.scaleX;
|
||||
var oy = self.scaleY;
|
||||
int remain = 2;
|
||||
|
||||
void Done()
|
||||
{
|
||||
if (--remain == 0)
|
||||
{
|
||||
self.SetScale(ox, oy);
|
||||
if (setInvisible) self.visible = false;
|
||||
FinishAnimation(self);
|
||||
}
|
||||
}
|
||||
|
||||
self.TweenScale(new Vector2(toScale, toScale), duration).SetEase(ease).OnComplete(Done);
|
||||
self.TweenFade(0f, duration * 0.9f).SetEase(EaseType.QuadIn).OnComplete(Done);
|
||||
}
|
||||
|
||||
public static void TweenSlideInLeft(this GObject self, float moveTime = 0.5f, float startFadeTimeRate = 0.42f
|
||||
, float startAlpha = 0, float alphaTime = 0.1f
|
||||
, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideIn(self, UISlideDirection.Left, moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset,
|
||||
ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutLeft(this GObject self, float moveTime = 0.3f, float startFadeTimeRate = 0
|
||||
, float alphaTime = 0.08f,
|
||||
float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideOut(self, UISlideDirection.Left, moveTime, startFadeTimeRate, alphaTime, extraOffset, ease,
|
||||
resetAfter, setInvisible, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInRight(this GObject self, float moveTime = 0.5f, float startFadeTimeRate = 0.42f
|
||||
, float startAlpha = 0, float alphaTime = 0.1f
|
||||
, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideIn(self, UISlideDirection.Right, moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset,
|
||||
ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutRight(this GObject self, float moveTime = 0.3f, float startFadeTimeRate = 0
|
||||
, float alphaTime = 0.08f,
|
||||
float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideOut(self, UISlideDirection.Right, moveTime, startFadeTimeRate, alphaTime, extraOffset, ease,
|
||||
resetAfter, setInvisible, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInTop(this GObject self, float moveTime = 0.35f, float startFadeTimeRate = 0.3f
|
||||
, float startAlpha = 0, float alphaTime = 0.1f
|
||||
, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideIn(self, UISlideDirection.Top, moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset,
|
||||
ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutTop(this GObject self, float moveTime = 0.3f, float startFadeTimeRate = 0
|
||||
, float alphaTime = 0.1f,
|
||||
float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideOut(self, UISlideDirection.Top, moveTime, startFadeTimeRate, alphaTime, extraOffset, ease,
|
||||
resetAfter, setInvisible, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideInBottom(this GObject self, float moveTime = 0.35f, float startFadeTimeRate = 0.3f
|
||||
, float startAlpha = 0, float alphaTime = 0.1f
|
||||
, float extraOffset = 0f, EaseType ease = EaseType.CubicOut,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideIn(self, UISlideDirection.Bottom, moveTime, startFadeTimeRate, startAlpha, alphaTime, extraOffset,
|
||||
ease, callback);
|
||||
}
|
||||
|
||||
public static void TweenSlideOutBottom(this GObject self, float moveTime = 0.3f, float startFadeTimeRate = 0
|
||||
, float alphaTime = 0.1f,
|
||||
float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
{
|
||||
TweenSlideOut(self, UISlideDirection.Bottom, moveTime, startFadeTimeRate, alphaTime, extraOffset, ease,
|
||||
resetAfter, setInvisible, callback);
|
||||
}
|
||||
|
||||
|
||||
public static void TweenSlideIn(this GObject self, UISlideDirection direction, float moveTime = 0.35f,
|
||||
float startFadeTimeRate = 0.1f
|
||||
, float startAlpha = 0, float alphaTime = 0.2f
|
||||
, float extraOffset = 0f, EaseType ease = EaseType.QuadOut,
|
||||
Action callback = null)
|
||||
{
|
||||
if (self == null || moveTime <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ori = self.position;
|
||||
float startX = ori.x;
|
||||
float startY = ori.y;
|
||||
switch (direction)
|
||||
{
|
||||
case UISlideDirection.Left: startX = startX + (-self.width / 2) - Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Right: startX = startX + (self.width / 2) + Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Top: startY = startY + (-self.height / 2) - Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Bottom: startY = startY + (self.height / 2) + Math.Max(0f, extraOffset); break;
|
||||
}
|
||||
|
||||
self.visible = true;
|
||||
self.alpha = startAlpha;
|
||||
self.position = new Vector3(startX, startY, ori.z);
|
||||
float startFadeTime = moveTime * startFadeTimeRate;
|
||||
int remain = 3;
|
||||
|
||||
void Done()
|
||||
{
|
||||
if (--remain == 0) FinishAnimation(self);
|
||||
}
|
||||
|
||||
GTweener moveTweener = (direction == UISlideDirection.Left || direction == UISlideDirection.Right)
|
||||
? self.TweenMoveX(ori.x, moveTime)
|
||||
: self.TweenMoveY(ori.y, moveTime);
|
||||
moveTweener.SetEase(ease).OnComplete(Done);
|
||||
self.TweenFade(startAlpha, startFadeTime).OnComplete(() =>
|
||||
{
|
||||
Done();
|
||||
self.TweenFade(1, alphaTime).SetEase(EaseType.QuadOut).OnComplete(Done);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenSlideOut(this GObject self, UISlideDirection direction, float moveTime = 0.35f,
|
||||
float startFadeTimeRate = 0.1f
|
||||
, float alphaTime = 0.2f,
|
||||
float extraOffset = 0f, EaseType ease = EaseType.QuadIn,
|
||||
bool resetAfter = true, bool setInvisible = true,
|
||||
Action callback = null)
|
||||
{
|
||||
if (self == null || moveTime <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ori = self.position;
|
||||
float endX = ori.x;
|
||||
float endY = ori.y;
|
||||
switch (direction)
|
||||
{
|
||||
case UISlideDirection.Left: endX = endX + (-self.width / 2) - Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Right: endX = endX + (self.width / 2) + Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Top: endY = endX + (-self.height / 2) - Math.Max(0f, extraOffset); break;
|
||||
case UISlideDirection.Bottom: endY = endX + (self.height / 2) + Math.Max(0f, extraOffset); break;
|
||||
}
|
||||
|
||||
float startAlpha = self.alpha;
|
||||
float startFadeTime = moveTime * startFadeTimeRate;
|
||||
int remain = 3;
|
||||
|
||||
void Done()
|
||||
{
|
||||
if (--remain == 0)
|
||||
{
|
||||
if (resetAfter) self.position = ori;
|
||||
if (setInvisible) self.visible = false;
|
||||
FinishAnimation(self);
|
||||
}
|
||||
}
|
||||
|
||||
GTweener moveTweener = (direction == UISlideDirection.Left || direction == UISlideDirection.Right)
|
||||
? self.TweenMoveX(endX, moveTime)
|
||||
: self.TweenMoveY(endY, moveTime);
|
||||
moveTweener.SetEase(ease).OnComplete(Done);
|
||||
|
||||
self.TweenFade(startAlpha, startFadeTime).OnComplete(() =>
|
||||
{
|
||||
Done();
|
||||
self.TweenFade(0, alphaTime).SetEase(EaseType.QuadOut).OnComplete(Done);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenBounceShow(this GObject self, float duration = 0.4f, Action callback = null,
|
||||
float fromYOffset = -100f)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ori = self.position;
|
||||
self.visible = true;
|
||||
self.position = new Vector3(ori.x, ori.y + fromYOffset, ori.z);
|
||||
self.TweenMoveY(ori.y, duration).SetEase(EaseType.BounceOut).OnComplete(() => { FinishAnimation(self); });
|
||||
}
|
||||
|
||||
public static void TweenBounceHide(this GObject self, float duration = 0.25f, Action callback = null,
|
||||
float toYOffset = 100f, bool resetAfter = true, bool setInvisible = true)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ori = self.position;
|
||||
self.TweenMoveY(ori.y + toYOffset, duration).SetEase(EaseType.QuadIn).OnComplete(() =>
|
||||
{
|
||||
if (resetAfter) self.position = ori;
|
||||
if (setInvisible) self.visible = false;
|
||||
FinishAnimation(self);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenRotateShow(this GObject self, float duration = 0.2f, Action callback = null,
|
||||
float fromRotation = -90f, EaseType ease = EaseType.BackOut)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
float ori = self.rotation;
|
||||
self.visible = true;
|
||||
self.rotation = fromRotation;
|
||||
self.TweenRotate(ori, duration).SetEase(ease).OnComplete(() => { FinishAnimation(self); });
|
||||
}
|
||||
|
||||
public static void TweenRotateHide(this GObject self, float duration = 0.2f, Action callback = null,
|
||||
float toRotation = -90f, EaseType ease = EaseType.QuadIn, bool resetAfter = true, bool setInvisible = true)
|
||||
{
|
||||
if (self == null || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
float ori = self.rotation;
|
||||
self.TweenRotate(toRotation, duration).SetEase(ease).OnComplete(() =>
|
||||
{
|
||||
if (resetAfter) self.rotation = ori;
|
||||
if (setInvisible) self.visible = false;
|
||||
FinishAnimation(self);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenShake(this GObject self, float duration = 0.4f, Action callback = null,
|
||||
float amplitude = 12f, bool horizontal = true, int vibrato = 6)
|
||||
{
|
||||
if (self == null || vibrato <= 0 || amplitude <= 0f || duration <= 0f)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
var ori = self.position;
|
||||
float single = duration / (vibrato * 2f);
|
||||
var end = horizontal
|
||||
? new Vector3(ori.x + amplitude, ori.y, ori.z)
|
||||
: new Vector3(ori.x, ori.y + amplitude, ori.z);
|
||||
self.TweenMove(end, single).SetEase(EaseType.Linear).SetRepeat(vibrato * 2, true).OnComplete(() =>
|
||||
{
|
||||
self.position = ori;
|
||||
FinishAnimation(self);
|
||||
});
|
||||
}
|
||||
|
||||
public static void TweenShakeShow(this GObject self, float durationScale = 0.2f, float ScaleStart = 0.3f,
|
||||
float ScaleEnd = 1f, int shake = 4,
|
||||
float shakeRotation = 18f, float duration = 1, Action callback = null)
|
||||
{
|
||||
if (self == null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
StartNewAnimation(self, callback);
|
||||
|
||||
int remain = 4;
|
||||
|
||||
void Done()
|
||||
{
|
||||
if (--remain == 0)
|
||||
{
|
||||
FinishAnimation(self);
|
||||
}
|
||||
}
|
||||
|
||||
self.scale = Vector2.one * ScaleStart;
|
||||
self.rotation = -shakeRotation;
|
||||
|
||||
float scaleEndTime = 0.2f;
|
||||
float rotaEndTime = 0.1f;
|
||||
float allIns = durationScale + scaleEndTime + rotaEndTime;
|
||||
duration = allIns > duration ? allIns : duration;
|
||||
|
||||
float rotaTime = (duration - durationScale - scaleEndTime - rotaEndTime) / shake;
|
||||
self.TweenScale(Vector2.one * ScaleEnd * 1.1f, durationScale)
|
||||
.OnComplete(() =>
|
||||
{
|
||||
FinishAnimation(self);
|
||||
self.TweenRotate(shakeRotation, rotaTime).SetRepeat(shake, true)
|
||||
.OnComplete(() =>
|
||||
{
|
||||
FinishAnimation(self);
|
||||
self.TweenRotate(0, rotaEndTime).OnComplete(() =>
|
||||
{
|
||||
FinishAnimation(self);
|
||||
self.TweenScale(Vector2.one * ScaleEnd, scaleEndTime).OnComplete(() =>
|
||||
{
|
||||
FinishAnimation(self);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0b1d4565de947b99f0a88d7753e8897
|
||||
timeCreated: 1770172925
|
||||
@@ -16,7 +16,6 @@ namespace NBF
|
||||
UIObjectFactory.SetPackageItemExtension(ClassifyList.URL, typeof(ClassifyList));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonMenu.URL, typeof(CommonMenu));
|
||||
UIObjectFactory.SetPackageItemExtension(MarqueeTag.URL, typeof(MarqueeTag));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnSubMenuLeft.URL, typeof(BtnSubMenuLeft));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTextInputControl.URL, typeof(BtnTextInputControl));
|
||||
UIObjectFactory.SetPackageItemExtension(CommonItemList.URL, typeof(CommonItemList));
|
||||
UIObjectFactory.SetPackageItemExtension(BtnTitleInputControl.URL, typeof(BtnTitleInputControl));
|
||||
|
||||
@@ -18,14 +18,16 @@ namespace NBF
|
||||
public Controller MessageStyle;
|
||||
[AutoFind(Name = "back")]
|
||||
public GImage back;
|
||||
[AutoFind(Name = "box")]
|
||||
public GImage box;
|
||||
[AutoFind(Name = "TextTitle")]
|
||||
public GTextField TextTitle;
|
||||
[AutoFind(Name = "TextContent")]
|
||||
public GTextField TextContent;
|
||||
[AutoFind(Name = "BtnCancel")]
|
||||
public BtnTitleInputControl BtnCancel;
|
||||
[AutoFind(Name = "BtnConfirm")]
|
||||
public BtnTitleInputControl BtnConfirm;
|
||||
[AutoFind(Name = "t0")]
|
||||
public Transition t0;
|
||||
public override string[] GetDependPackages(){ return new string[] {}; }
|
||||
|
||||
public static void Show(object param = null){ UI.Inst.OpenUI<MessageBox>(param); }
|
||||
|
||||
@@ -47,10 +47,8 @@ namespace NBF
|
||||
protected override void OnInit()
|
||||
{
|
||||
this.AutoAddClick(OnClick);
|
||||
// HideAnim = this.HideCenterScaleBig;
|
||||
// ShowAnim = this.ShowCenterScaleBig;
|
||||
IsModal = true;
|
||||
IsDontBack = true;
|
||||
HideAnim = UIPanelAnimation.GetCenterPopScaleFade(this, true);
|
||||
InputManager.OnUICanceled += OnUICanceled;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace NBF
|
||||
protected override void OnInit()
|
||||
{
|
||||
IsShowCursor = false;
|
||||
IsDontBack = true;
|
||||
}
|
||||
|
||||
protected override void OnShow()
|
||||
|
||||
2
Assets/Scripts/UI/Home/HomePanel.Designer.cs
generated
@@ -15,7 +15,7 @@ namespace NBF
|
||||
public override string UIResName => "HomePanel";
|
||||
|
||||
[AutoFind(Name = "Back")]
|
||||
public GLabel Back;
|
||||
public UIBlurBackground Back;
|
||||
[AutoFind(Name = "Pages")]
|
||||
public GComponent Pages;
|
||||
[AutoFind(Name = "Menu")]
|
||||
|
||||
2
Assets/Scripts/UI/Login/LoginPanel.Designer.cs
generated
@@ -15,7 +15,7 @@ namespace NBF
|
||||
public override string UIResName => "LoginPanel";
|
||||
|
||||
[AutoFind(Name = "Back")]
|
||||
public GLabel Back;
|
||||
public UIBlurBackground Back;
|
||||
[AutoFind(Name = "InputAccount")]
|
||||
public CommonInput InputAccount;
|
||||
[AutoFind(Name = "BtnLogin")]
|
||||
|
||||
@@ -22,7 +22,9 @@ namespace NBF
|
||||
{
|
||||
if (btn == BtnLogin)
|
||||
{
|
||||
OnLoginClick().Coroutine();
|
||||
// OnLoginClick().Coroutine();
|
||||
Debug.LogError("test");
|
||||
MessageBox.Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +32,7 @@ namespace NBF
|
||||
{
|
||||
await LoginHelper.Login(InputAccount.text);
|
||||
|
||||
await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
|
||||
// await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
|
||||
// await MapHelper.EnterMap(mapId, role.RoomCode);
|
||||
|
||||
// BagPanel.Show();
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace NBF
|
||||
{
|
||||
base.OnInit();
|
||||
IsShowCursor = true;
|
||||
IsDontBack = true;
|
||||
//TEXT_SETTINGS_
|
||||
var groupNames = Settings.Instance.GetAllTabs();
|
||||
foreach (var group in groupNames)
|
||||
|
||||
4
Assets/Scripts/UI/Shops/ShopGearItem.Designer.cs
generated
@@ -11,7 +11,7 @@ namespace NBF
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7poome9";
|
||||
|
||||
public GImage back;
|
||||
public GImage select;
|
||||
public GTextField TextPrice;
|
||||
public GImage Quality;
|
||||
public GTextField TextAmount;
|
||||
@@ -20,7 +20,7 @@ namespace NBF
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
back = (GImage)GetChild("back");
|
||||
select = (GImage)GetChild("select");
|
||||
TextPrice = (GTextField)GetChild("TextPrice");
|
||||
Quality = (GImage)GetChild("Quality");
|
||||
TextAmount = (GTextField)GetChild("TextAmount");
|
||||
|
||||
3
Assets/Scripts/UI/Tween.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 034e1664c8564ba4985717b0ac055420
|
||||
timeCreated: 1770175824
|
||||
27
Assets/Scripts/UI/Tween/UITweenConfig.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
/**注册组件动效绑定。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class UITweenConfig : UIComponentTweenPack
|
||||
{
|
||||
public UITweenConfig()
|
||||
{
|
||||
AddData();
|
||||
}
|
||||
|
||||
private void AddData()
|
||||
{
|
||||
// Common
|
||||
Add("ui://6hgkvlauips61", new UIComponentTween()
|
||||
{
|
||||
{ "__root__", "Fade" },
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Tween/UITweenConfig.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 290ed26c6e28f694b95cdb9c6ebd14d5
|
||||
@@ -2,14 +2,8 @@
|
||||
<component size="1920,1080" extention="Label">
|
||||
<displayList>
|
||||
<loader id="n36_gii7" name="Back" xy="0,0" size="1920,1080" url="ui://6hgkvlaumbu9ye" align="center" vAlign="middle" fill="scale" clearOnPublish="true"/>
|
||||
<image id="n38_xd2f" name="back" src="vbojnh" fileName="ImagesNew/Square/square128_fill.png" xy="0,0" size="1920,1080" alpha="0.96" color="#000000">
|
||||
<image id="n38_xd2f" name="back" src="vbojnh" fileName="ImagesNew/Square/square128_fill.png" xy="1,0" size="1920,1080" alpha="0.7">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<image id="n39_mbu9" name="n39" src="vbojs9" fileName="ImagesNew/Glow/glow_horizontal/glow_horizontal_3.png" xy="0,0" size="1920,523" color="#000000">
|
||||
<relation target="" sidePair="center-center,top-top"/>
|
||||
</image>
|
||||
<image id="n40_mbu9" name="n40" src="vbojsb" fileName="ImagesNew/Glow/glow_horizontal/glow_horizontal_1.png" xy="0,557" size="1920,523" color="#000000">
|
||||
<relation target="" sidePair="center-center,bottom-bottom"/>
|
||||
</image>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="28,28" pivot="0.5,0.5" extention="Button">
|
||||
<displayList>
|
||||
<loader id="n10_fcfg" name="icon" xy="0,0" size="28,28" url="ui://xo76q8wzfcfgg1" fill="scale" color="#7888a0">
|
||||
<loader id="n10_fcfg" name="icon" xy="0,0" size="28,28" url="ui://xo76q8wzfcfgg1" fill="scale" color="#fe8d1d">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
<Button downEffect="scale" downEffectValue=".95"/>
|
||||
<Button downEffect="scale" downEffectValue="0.95"/>
|
||||
</component>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="34,28" pivot="0.5,0.5" extention="Button">
|
||||
<component size="34,24" pivot="0.5,0.5" extention="Button">
|
||||
<controller name="show" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n11_r03u" name="icon" xy="3,0" size="28,28" url="ui://6hgkvlauvbojv2" align="center" vAlign="middle" fill="scaleMatchHeight">
|
||||
<loader id="n11_r03u" name="icon" xy="3,0" size="28,24" url="ui://6hgkvlauvbojv2" align="center" vAlign="middle" fill="scaleMatchHeight" color="#e2fffb">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<component size="79,32" pivot="0.5,0.5" extention="Button">
|
||||
<controller name="show" pages="0,,1," selected="0"/>
|
||||
<displayList>
|
||||
<loader id="n9_r03u" name="icon" xy="0,2" size="34,28" url="ui://6hgkvlauvbojv2" align="center" vAlign="middle" fill="scaleMatchHeight"/>
|
||||
<text id="n10_r03u" name="title" xy="38,2" size="41,28" font="ui://6hgkvlaugkm7w" fontSize="19" color="#ffffff" text="继续"/>
|
||||
<loader id="n9_r03u" name="icon" xy="0,2" size="34,28" url="ui://6hgkvlauvbojv2" align="center" vAlign="middle" fill="scaleMatchHeight" color="#e2fffb"/>
|
||||
<text id="n10_r03u" name="title" xy="38,2" size="41,28" font="ui://6hgkvlaugkm7w" fontSize="19" color="#e2fffb" text="继续"/>
|
||||
</displayList>
|
||||
<Button downEffect="scale" downEffectValue="0.95"/>
|
||||
<relation target="n10_r03u" sidePair="rightext-right"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,1007" designImage="ui://hxr7rc7pr03ue" designImageAlpha="0">
|
||||
<controller name="style" pages="1,oneMenu,2,twoMenu" selected="0">
|
||||
<component size="1920,1007" designImage="ui://6hgkvlaudczwyu" designImageAlpha="2">
|
||||
<controller name="style" pages="1,oneMenu,2,twoMenu" selected="1">
|
||||
<remark page="0" value="一级菜单"/>
|
||||
<remark page="1" value="二级菜单"/>
|
||||
</controller>
|
||||
@@ -8,12 +8,12 @@
|
||||
<component id="n3_fcfg" name="Menu" src="fcfggr" fileName="Com/Menu/CommonMenu.xml" xy="0,0">
|
||||
<relation target="" sidePair="width-width,center-center,top-top"/>
|
||||
</component>
|
||||
<component id="n25_r03u" name="SubMenu" src="r03us" fileName="Com/Menu/CommonSubMenu.xml" xy="76,128">
|
||||
<component id="n25_r03u" name="SubMenu" src="r03us" fileName="Com/Menu/CommonSubMenu.xml" xy="0,90">
|
||||
<gearDisplay controller="style" pages="2"/>
|
||||
</component>
|
||||
<component id="n6_drkw" name="List" src="drkwh1" fileName="Com/ClassifyList.xml" xy="49,113" size="1846,892">
|
||||
<gearXY controller="style" pages="1,2" values="49,113|49,216"/>
|
||||
<gearSize controller="style" pages="1,2" values="1846,892,1,1|1846,790,1,1"/>
|
||||
<component id="n6_drkw" name="List" src="drkwh1" fileName="Com/ClassifyList.xml" xy="42,166" size="1846,840">
|
||||
<gearXY controller="style" pages="1,2" values="49,113|42,166"/>
|
||||
<gearSize controller="style" pages="1,2" values="1846,892,1,1|1846,840,1,1"/>
|
||||
<relation target="" sidePair="width-width,top-top,bottomext-bottom"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,66">
|
||||
<component size="1920,60" designImage="ui://6hgkvlaudczwyw">
|
||||
<displayList>
|
||||
<list id="n33_9lmc" name="List" xy="980,13" size="891,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" align="right" vAlign="middle" autoClearItems="true">
|
||||
<list id="n33_9lmc" name="List" xy="991,13" size="891,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" align="right" vAlign="middle" autoClearItems="true">
|
||||
<relation target="" sidePair="right-right,top-top"/>
|
||||
<item title="按钮1"/>
|
||||
<item title="按钮2"/>
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<list id="n34_9mf1" name="LeftList" xy="52,13" size="713,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" vAlign="middle" autoClearItems="true">
|
||||
<list id="n34_9mf1" name="LeftList" xy="39,13" size="713,40" layout="row" colGap="32" defaultItem="ui://6hgkvlaur03uj0" vAlign="middle" autoClearItems="true">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
<item/>
|
||||
<item/>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,95" extention="Label" designImage="ui://6hgkvlaufcfgh0" designImageAlpha="0">
|
||||
<component size="1920,90" extention="Label" designImage="ui://6hgkvlaudczwyv" designImageAlpha="10">
|
||||
<displayList>
|
||||
<image id="n14_r03u" name="n14" src="kryob" fileName="Images/Square.png" pkg="xo76q8wz" xy="0,93" pivot="0,1" size="1920,2" color="#323232">
|
||||
<relation target="" sidePair="width-width,bottom-bottom"/>
|
||||
<image id="n17_dczw" name="n17" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="-7,20" size="894,60" color="#3d5c7a">
|
||||
<relation target="n15_vboj" sidePair="middle-middle,rightext-right"/>
|
||||
</image>
|
||||
<list id="n15_vboj" name="List" xy="104,7" size="646,88" layout="row" overflow="hidden" scroll="horizontal" defaultItem="ui://6hgkvlauvbojt5" autoClearItems="true">
|
||||
<item title="主页"/>
|
||||
<item title="商店"/>
|
||||
<item title="设置"/>
|
||||
<item title="排行"/>
|
||||
<item title="档案"/>
|
||||
<item title="设置"/>
|
||||
<list id="n15_vboj" name="List" xy="107,20" size="677,60" layout="row" overflow="hidden" scroll="horizontal" defaultItem="ui://6hgkvlauvbojt5" autoClearItems="true">
|
||||
<item title="Home"/>
|
||||
<item title="Menu1"/>
|
||||
<item title="Menu2"/>
|
||||
<item title="Menu3"/>
|
||||
<item title="Menu4"/>
|
||||
<item title="Menu5"/>
|
||||
</list>
|
||||
<component id="n11_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="58,33"/>
|
||||
<component id="n12_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="767,33">
|
||||
<component id="n11_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="59,36"/>
|
||||
<component id="n12_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="800,36">
|
||||
<relation target="n15_vboj" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,52">
|
||||
<component size="1920,50" designImage="ui://6hgkvlaudczwyv" designImageOffsetY="-90" designImageAlpha="10">
|
||||
<displayList>
|
||||
<list id="n29_vboj" name="List" xy="50,0" size="704,52" layout="row" colGap="-36" defaultItem="ui://6hgkvlauvbojxi" autoClearItems="true">
|
||||
<item url="ui://6hgkvlaumbu9y9"/>
|
||||
<item/>
|
||||
<image id="n30_dczw" name="n30" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="-9,0" size="923,50" color="#3d5c7a">
|
||||
<relation target="n29_vboj" sidePair="middle-middle,rightext-right"/>
|
||||
</image>
|
||||
<list id="n29_vboj" name="List" xy="111,0" size="704,50" layout="row" defaultItem="ui://6hgkvlauvbojxi" autoClearItems="true">
|
||||
<item url="ui://6hgkvlaudczwyz"/>
|
||||
<item/>
|
||||
<item url="ui://6hgkvlaudczwyz"/>
|
||||
<item/>
|
||||
</list>
|
||||
<component id="n27_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="1,12"/>
|
||||
<component id="n28_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="773,12">
|
||||
<component id="n27_r03u" name="BtnPrev" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="59,13"/>
|
||||
<component id="n28_r03u" name="BtnNext" src="r03ut" fileName="Com/Buttons/BtnInputControl.xml" xy="834,13">
|
||||
<relation target="n29_vboj" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
8
FGUIProject/assets/Common/Com/ModalLayer.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,1080">
|
||||
<displayList>
|
||||
<image id="n20_oh2q" name="n20" src="oh2qyo" fileName="ImagesNew/Square/mini/square24_fill.png" xy="0,0" size="1920,1080" alpha="0.3">
|
||||
<relation target="" sidePair="width-width,height-height,middle-middle"/>
|
||||
</image>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,90">
|
||||
<component size="1920,80">
|
||||
<displayList>
|
||||
<text id="n17_d3lv" name="TextTitle" xy="70,11" size="114,66" font="ui://6hgkvlaugkm7v" fontSize="50" color="#07acda" letterSpacing="12" text="选项"/>
|
||||
<image id="n20_mbu9" name="n20" src="kryob" fileName="Images/Square.png" pkg="xo76q8wz" xy="0,88" pivot="0,1" size="1920,2" alpha="0.1" color="#323232">
|
||||
<relation target="" sidePair="width-width,bottom-bottom"/>
|
||||
</image>
|
||||
<text id="n17_d3lv" name="TextTitle" xy="36,12" size="83,46" font="ui://6hgkvlaugkm7v" fontSize="34" color="#303f4e" letterSpacing="12" text="选项"/>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="330,76">
|
||||
<component size="330,85">
|
||||
<controller name="style" exported="true" pages="0,tips,1,success,2,error,3,warning" selected="0">
|
||||
<remark page="0" value="提示"/>
|
||||
<remark page="1" value="成功"/>
|
||||
@@ -7,19 +7,19 @@
|
||||
<remark page="3" value="警告"/>
|
||||
</controller>
|
||||
<displayList>
|
||||
<image id="n1_r03u" name="box" src="r03uia" fileName="Images/Panels/ChatBgLeft.png" xy="0,0" size="330,76" color="#d8fbff" pkg="xo76q8wz">
|
||||
<image id="n1_r03u" name="box" src="r03uia" fileName="Images/Panels/ChatBgLeft.png" pkg="xo76q8wz" xy="0,0" size="330,85">
|
||||
<gearLook controller="style" default="1,0,0,0"/>
|
||||
<gearColor controller="style" pages="0,2,3" values="#d8fbff|#fd6b6d|#faad14" default="#52c41a"/>
|
||||
<gearColor controller="style" pages="0,2,3" values="#ffffff|#fd6b6d|#faad14" default="#52c41a"/>
|
||||
<relation target="" sidePair="width-width,height-height,left-left"/>
|
||||
</image>
|
||||
<text id="n2_r03u" name="TextTitle" xy="45,10" pivot="0.5,0.5" size="43,29" font="ui://6hgkvlaugkm7v" fontSize="20" color="#05cfa4" shadowColor="#000000" shadowOffset="1,1" text="成功">
|
||||
<text id="n2_r03u" name="TextTitle" xy="41,6" pivot="0.5,0.5" size="51,34" font="ui://6hgkvlaugkm7v" fontSize="24" color="#05cfa4" shadowColor="#000000" shadowOffset="1,1" text="成功">
|
||||
<gearColor controller="style" pages="0,1,2,3" values="#05cfa4,#000000|#52c41a,#000000|#fd6b6d,#000000|#faad14,#000000"/>
|
||||
</text>
|
||||
<text id="n3_r03u" name="TextContent" xy="44,39" size="270,24" font="ui://6hgkvlaugkm7w" fontSize="16" color="#d8fbff" vAlign="middle" autoSize="height" text="这个操作将不能恢复"/>
|
||||
<text id="n3_r03u" name="TextContent" xy="44,43" size="270,29" font="ui://6hgkvlaugkm7w" fontSize="20" color="#303f4e" vAlign="middle" autoSize="height" text="这个操作将不能恢复"/>
|
||||
<loader id="n4_r03u" name="icon" xy="14,16" size="22,22" url="ui://xo76q8wzr03uj6" fill="scale">
|
||||
<gearIcon controller="style" pages="0,2,3" values="ui://xo76q8wzr03uj6|ui://xo76q8wzr03uj4|ui://xo76q8wzr03uj5" default="ui://xo76q8wzr03uj3"/>
|
||||
</loader>
|
||||
<component id="n5_r03u" name="BtnClose" src="fcfggb" fileName="Com/Buttons/BtnClose.xml" xy="292,12" scale="0.5,0.5" visible="false"/>
|
||||
<component id="n5_r03u" name="BtnClose" src="fcfggb" fileName="Com/Buttons/BtnClose.xml" xy="297,4" scale="0.5,0.5" visible="false"/>
|
||||
</displayList>
|
||||
<relation target="n3_r03u" sidePair="bottomext-bottom"/>
|
||||
</component>
|
||||
@@ -1,16 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="100,88" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="0"/>
|
||||
<component size="110,60" extention="Button" designImage="ui://6hgkvlaudczwyv" designImageOffsetX="-369" designImageOffsetY="-20" designImageAlpha="0">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="2"/>
|
||||
<displayList>
|
||||
<image id="n4_vboj" name="n4" src="vbojsb" fileName="ImagesNew/Glow/glow_horizontal/glow_horizontal_1.png" xy="0,0" size="100,88" alpha="0.2" color="#07acda">
|
||||
<gearDisplay controller="button" pages="3,4,5"/>
|
||||
<relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
|
||||
<image id="n11_dczw" name="n11" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="0,0" size="110,60" color="#fe8d1d">
|
||||
<gearLook controller="button" pages="2" values="0,0,0,0" default="1,0,0,0" tween="true"/>
|
||||
</image>
|
||||
<image id="n3_vboj" name="n3" src="vbojpz" fileName="ImagesNew/Line/line_h.png" xy="0,86" size="100,2" color="#07acda">
|
||||
<gearDisplay controller="button" pages="3,4,5"/>
|
||||
<relation target="" sidePair="width-width,center-center,bottom-bottom"/>
|
||||
</image>
|
||||
<text id="n10_vboj" name="title" xy="26,27" pivot="0.5,0.5" size="47,32" fontSize="22" color="#e4dbdb" align="center" vAlign="middle" text="主页">
|
||||
<text id="n10_vboj" name="title" xy="29,13" pivot="0.5,0.5" size="51,34" fontSize="24" color="#ffffff" align="center" vAlign="middle" shadowColor="#33000000" shadowOffset="1,1" text="主页">
|
||||
<gearColor controller="button" default="#ffffff,#000000"/>
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
</displayList>
|
||||
|
||||
18
FGUIProject/assets/Common/ComNew/BtnSubIconMenu.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="130,50" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="0"/>
|
||||
<displayList>
|
||||
<image id="n14_vboj" name="back" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="0,0" size="130,50" alpha="0" color="#fe8d1d">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="0,0,0,0|1,0,0,0|0.9,0,0,0|1,0,0,0" tween="true"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<text id="n15_vboj" name="title" xy="50,10" pivot="0.5,0.5" size="62,29" fontSize="20" color="#ffffff" align="center" vAlign="middle" shadowColor="#33000000" shadowOffset="1,1" text="Name">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<loader id="n16_dczw" name="icon" xy="16,11" size="26,26" url="ui://6hgkvlauvbojwk" align="center" vAlign="middle" fill="scale">
|
||||
<relation target="n15_vboj" sidePair="middle-middle,left-left"/>
|
||||
</loader>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n15_vboj" sidePair="width-width,height-height"/>
|
||||
</component>
|
||||
@@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="210,52" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="2"/>
|
||||
<component size="110,50" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="1"/>
|
||||
<displayList>
|
||||
<image id="n14_vboj" name="back" src="vbojxg" fileName="ImagesNew/Button/SubMenuMid.png" xy="0,0" size="210,52" alpha="0.9" color="#0c0c0c">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="0.9,0,0,0|1,0,0,0|0.9,0,0,0|1,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,3,4,5" values="#0c0c0c|#cccccc|#0c0c0c|#cccccc"/>
|
||||
<image id="n14_vboj" name="back" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="0,0" size="110,50" color="#fe8d1d">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="0,0,0,0|1,0,0,0|0.9,0,0,0|1,0,0,0" tween="true"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<text id="n15_vboj" name="title" xy="67,11" pivot="0.5,0.5" size="75,26" fontSize="18" color="#6b6d6c" align="center" vAlign="middle" text="随身武器">
|
||||
<gearColor controller="button" pages="3" values="#323232,#000000" default="#6b6d6c,#000000"/>
|
||||
<text id="n15_vboj" name="title" xy="24,10" pivot="0.5,0.5" size="62,29" fontSize="20" color="#ffffff" align="center" vAlign="middle" shadowColor="#33000000" shadowOffset="1,1" text="Name">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
<relation target="n15_vboj" sidePair="width-width,height-height"/>
|
||||
</component>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="176,52" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="2"/>
|
||||
<displayList>
|
||||
<image id="n14_vboj" name="back" src="vbojxf" fileName="ImagesNew/Button/SubMenuLeft.png" xy="0,0" size="176,52" alpha="0.9" color="#0c0c0c">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="0.9,0,0,0|1,0,0,0|0.9,0,0,0|1,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,3,4,5" values="#0c0c0c|#cccccc|#0c0c0c|#cccccc"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<text id="n15_vboj" name="title" xy="33,13" pivot="0.5,0.5" size="75,26" fontSize="18" color="#6b6d6c" align="center" vAlign="middle" text="随身武器">
|
||||
<gearColor controller="button" pages="3" values="#323232,#000000" default="#6b6d6c,#000000"/>
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
</component>
|
||||
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 249 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 184 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 258 B |
@@ -2,22 +2,18 @@
|
||||
<component size="1920,1080">
|
||||
<controller name="MessageStyle" pages="0,默认,1,只有确定" selected="0"/>
|
||||
<displayList>
|
||||
<image id="n8_r03u" name="back" src="kryob" fileName="Images/Square.png" xy="475,423" size="970,233" color="#08101b" pkg="xo76q8wz">
|
||||
<image id="n8_r03u" name="back" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" xy="459,431" size="1002,218">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</image>
|
||||
<image id="n5_r03u" name="n5" src="kryob" fileName="Images/Square.png" xy="477,582" size="966,2" alpha="0.3" color="#8bf3ff" pkg="xo76q8wz">
|
||||
<relation target="n4_r03u" sidePair="center-center,bottom-bottom"/>
|
||||
</image>
|
||||
<image id="n4_r03u" name="box" src="r03ui7" fileName="Images/Panels/BasicStroke.png" xy="475,423" size="970,233" alpha="0.3" color="#8bf3ff" pkg="xo76q8wz">
|
||||
<relation target="n8_r03u" sidePair="center-center,middle-middle"/>
|
||||
</image>
|
||||
<text id="n6_r03u" name="TextTitle" xy="878,490" pivot="0.5,0.5" size="163,35" font="ui://6hgkvlaugkm7v" fontSize="25" color="#8bf3ff" text="你确定删除吗?">
|
||||
<image id="n15_oh2q" name="n15" src="dczwyx" fileName="ImagesNew/Square/mini/square24_round8px_bottom.png" xy="459,589" size="1002,61" color="#3d5c7a"/>
|
||||
<text id="n6_r03u" name="TextTitle" xy="903,472" pivot="0.5,0.5" size="114,42" font="ui://6hgkvlaugkm7v" fontSize="30" color="#303f4e" align="center" vAlign="middle" text="REVERT">
|
||||
<relation target="n8_r03u" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<text id="n19_oh2q" name="TextContent" xy="934,522" size="52,30" fontSize="21" color="#303f4e" align="center" vAlign="middle" text="Back"/>
|
||||
<component id="n11_r03u" name="BtnCancel" src="r03uj0" fileName="Com/Buttons/BtnTitleInputControl.xml" xy="790,604" size="85,32" group="n12_oivj">
|
||||
<gearDisplay controller="MessageStyle" pages="0"/>
|
||||
<relation target="n8_r03u" sidePair="center-center,bottom-bottom"/>
|
||||
<Button title="退出" icon="ui://6hgkvlau9mf1jw"/>
|
||||
<Button title="退出" icon="ui://6hgkvlauvbojvi"/>
|
||||
</component>
|
||||
<component id="n9_r03u" name="BtnConfirm" src="r03uj0" fileName="Com/Buttons/BtnTitleInputControl.xml" xy="1045,604" size="85,32" group="n12_oivj">
|
||||
<relation target="n8_r03u" sidePair="center-center,bottom-bottom"/>
|
||||
@@ -27,4 +23,5 @@
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</group>
|
||||
</displayList>
|
||||
<transition name="t0"/>
|
||||
</component>
|
||||
@@ -27,10 +27,8 @@
|
||||
<component id="fcfggb" name="BtnClose.xml" path="/Com/Buttons/" exported="true"/>
|
||||
<component id="fcfggj" name="BtnIcon2.xml" path="/Com/Buttons/" exported="true"/>
|
||||
<component id="fcfggq" name="CurrencyGroup.xml" path="/Com/Tags/" exported="true"/>
|
||||
<image id="fcfg9" name="20250521000344_1.jpg" path="/效果图/"/>
|
||||
<component id="fcfggr" name="CommonMenu.xml" path="/Com/Menu/" exported="true"/>
|
||||
<component id="fcfggs" name="ButtonTab.xml" path="/Com/Menu/" exported="true"/>
|
||||
<image id="fcfgh0" name="20250521222909_1.jpg" path="/效果图/"/>
|
||||
<component id="oomej" name="VerticalroScrollBar.xml" path="/Com/ScrollBar/" exported="true"/>
|
||||
<component id="oomei" name="VerticalroScrollBar_grip.xml" path="/Com/ScrollBar/"/>
|
||||
<component id="drkwh1" name="ClassifyList.xml" path="/Com/" exported="true"/>
|
||||
@@ -67,7 +65,6 @@
|
||||
<component id="nzfpme" name="BtnCommonIcon.xml" path="/Com/Buttons/" exported="true"/>
|
||||
<component id="xd2fmf" name="Back2.xml" path="/Com/Back/" exported="true"/>
|
||||
<component id="xd2fml" name="ModelViewer.xml" path="/Com/" exported="true"/>
|
||||
<image id="vbojmm" name="后血武器库.jpg" path="/效果图/"/>
|
||||
<component id="vbojmn" name="Test.xml" path="/ComNew/"/>
|
||||
<image id="vbojmo" name="triangle.png" path="/ImagesNew/Triangle/" exported="true"/>
|
||||
<image id="vbojmp" name="square128_round15px_stroke2px.png" path="/ImagesNew/Square/"/>
|
||||
@@ -99,7 +96,7 @@
|
||||
<image id="vbojnf" name="pattern128_8.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojng" name="pattern128_9.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojnh" name="square128_fill.png" path="/ImagesNew/Square/" exported="true" scale="9grid" scale9grid="6,6,117,116"/>
|
||||
<image id="vbojni" name="square128_round10px_fill.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojni" name="square128_round10px_fill.png" path="/ImagesNew/Square/" exported="true" scale="9grid" scale9grid="32,32,64,64"/>
|
||||
<image id="vbojnj" name="square128_round10px_stroke10px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnk" name="square128_round10px_stroke1px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnl" name="square128_round10px_stroke20px.png" path="/ImagesNew/Square/"/>
|
||||
@@ -111,9 +108,9 @@
|
||||
<image id="vbojnr" name="pattern128_67.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojns" name="square128_round30px_stroke3px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnt" name="square128_round30px_stroke8px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnu" name="square128_round5px_stroke3px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnu" name="square128_round5px_stroke3px.png" path="/ImagesNew/Square/" exported="true" scale="9grid" scale9grid="32,32,64,64"/>
|
||||
<image id="vbojnv" name="square128_round5px_stroke5px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnw" name="square128_round5px_stroke8px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnw" name="square128_round5px_stroke8px.png" path="/ImagesNew/Square/" exported="true" scale="9grid" scale9grid="32,32,64,64"/>
|
||||
<image id="vbojnx" name="square128_round60px_fill.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojny" name="square128_round60px_stroke10px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojnz" name="square128_round60px_stroke1px.png" path="/ImagesNew/Square/"/>
|
||||
@@ -147,7 +144,7 @@
|
||||
<image id="vbojor" name="square128_round50px_stroke3px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojos" name="square128_round50px_stroke5px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojot" name="square128_round50px_stroke8px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojou" name="square128_round5px_fill.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojou" name="square128_round5px_fill.png" path="/ImagesNew/Square/" exported="true" scale="9grid" scale9grid="32,32,64,64"/>
|
||||
<image id="vbojov" name="square128_round30px_stroke5px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojow" name="square128_stroke5px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojox" name="pattern128_66.png" path="/ImagesNew/Pattern/"/>
|
||||
@@ -169,7 +166,7 @@
|
||||
<image id="vbojpd" name="pattern128_25.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojpe" name="pattern128_26.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojpf" name="pattern128_2.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojpg" name="pattern128_10.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojpg" name="pattern128_10.png" path="/ImagesNew/Pattern/" scale="tile"/>
|
||||
<image id="vbojph" name="pattern128_1.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojpi" name="line_v.png" path="/ImagesNew/Line/" scale="9grid" scale9grid="0,2,1,3"/>
|
||||
<image id="vbojpj" name="triangle_round.png" path="/ImagesNew/Triangle/" exported="true"/>
|
||||
@@ -204,14 +201,14 @@
|
||||
<image id="vbojqc" name="pattern128_56.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqd" name="pattern128_58.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqe" name="pattern128_59.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqf" name="pattern128_6.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqf" name="pattern128_6.png" path="/ImagesNew/Pattern/" scale="tile"/>
|
||||
<image id="vbojqg" name="pattern128_60.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqh" name="pattern128_61.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqi" name="pattern128_62.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqj" name="pattern128_63.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqk" name="pattern128_57.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqk" name="pattern128_57.png" path="/ImagesNew/Pattern/" scale="tile"/>
|
||||
<image id="vbojql" name="pattern128_48.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqm" name="pattern128_47.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqm" name="pattern128_47.png" path="/ImagesNew/Pattern/" scale="tile"/>
|
||||
<image id="vbojqn" name="pattern128_46.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqo" name="pattern128_30.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojqp" name="pattern128_31.png" path="/ImagesNew/Pattern/"/>
|
||||
@@ -229,7 +226,7 @@
|
||||
<image id="vbojr1" name="pattern128_42.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojr2" name="pattern128_43.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojr3" name="pattern128_44.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojr4" name="pattern128_45.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojr4" name="pattern128_45.png" path="/ImagesNew/Pattern/" scale="tile"/>
|
||||
<image id="vbojr5" name="pattern128_29.png" path="/ImagesNew/Pattern/"/>
|
||||
<image id="vbojr6" name="square128_stroke8px.png" path="/ImagesNew/Square/"/>
|
||||
<image id="vbojr7" name="glow_circle_1.png" path="/ImagesNew/Glow/glow_circle/"/>
|
||||
@@ -484,7 +481,6 @@
|
||||
<image id="mbu9y5" name="icon_arrow_5.png" path="/ImagesNew/Icon/icon_arrow/" exported="true"/>
|
||||
<image id="mbu9y6" name="icon_arrow_6.png" path="/ImagesNew/Icon/icon_arrow/" exported="true"/>
|
||||
<component id="mbu9y7" name="BtnMask.xml" path="/Com/Buttons/" exported="true"/>
|
||||
<component id="mbu9y9" name="BtnSubMenuLeft.xml" path="/ComNew/" exported="true"/>
|
||||
<component id="mbu9ya" name="ComoomTitle.xml" path="/Com/Tags/" exported="true"/>
|
||||
<image id="mbu9yb" name="triangle_down.png" path="/ImagesNew/Triangle/" exported="true"/>
|
||||
<image id="mbu9yc" name="triangle_left.png" path="/ImagesNew/Triangle/" exported="true"/>
|
||||
@@ -496,6 +492,18 @@
|
||||
<image id="mbu9yi" name="square128_stroke3px.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="5,5,10,10"/>
|
||||
<image id="mbu9yj" name="square20_stroke1px.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="5,5,10,10"/>
|
||||
<image id="mbu9yk" name="square20_stroke2px.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="5,5,10,10"/>
|
||||
<image id="oh2qyn" name="提示2(1).png" path="/效果图/"/>
|
||||
<image id="oh2qyo" name="square24_fill.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="6,6,12,12"/>
|
||||
<image id="oh2qyp" name="square24_round10px_fill.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="10,10,4,4"/>
|
||||
<image id="oh2qyq" name="square24_round5px_fill.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="8,8,7,6"/>
|
||||
<image id="oh2qyr" name="square24_round10px_bottom.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="10,1,3,4"/>
|
||||
<component id="oh2qys" name="ModalLayer.xml" path="/Com/" exported="true"/>
|
||||
<image id="dczwyu" name="背包(1).png" path="/效果图/"/>
|
||||
<image id="dczwyv" name="顶部菜单.png" path="/效果图/"/>
|
||||
<image id="dczwyw" name="底部菜单.png" path="/效果图/"/>
|
||||
<image id="dczwyx" name="square24_round8px_bottom.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="9,5,6,4"/>
|
||||
<image id="dczwyy" name="square24_round8px_fill.png" path="/ImagesNew/Square/mini/" exported="true" scale="9grid" scale9grid="10,10,5,3"/>
|
||||
<component id="dczwyz" name="BtnSubIconMenu.xml" path="/ComNew/" exported="true"/>
|
||||
</resources>
|
||||
<publish name="" path="../Assets/ResRaw/Fgui/Common" packageCount="2" genCode="true"/>
|
||||
</packageDescription>
|
||||
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 119 KiB |
BIN
FGUIProject/assets/Common/效果图/底部菜单.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
FGUIProject/assets/Common/效果图/提示2(1).png
Normal file
|
After Width: | Height: | Size: 456 KiB |
BIN
FGUIProject/assets/Common/效果图/背包(1).png
Normal file
|
After Width: | Height: | Size: 914 KiB |
BIN
FGUIProject/assets/Common/效果图/顶部菜单.png
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
FGUIProject/assets/Main/Assets/效果图/完成提示(1).png
Normal file
|
After Width: | Height: | Size: 772 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 164 KiB |
BIN
FGUIProject/assets/Main/Assets/效果图/设置/合成(1).png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 157 KiB |
BIN
FGUIProject/assets/Main/Assets/效果图/设置/设置1(1).png
Normal file
|
After Width: | Height: | Size: 725 KiB |
BIN
FGUIProject/assets/Main/Assets/效果图/设置/设置3.png
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
FGUIProject/assets/Main/Assets/效果图/设置/设置4.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="882,48" extention="Button" designImage="ui://hxr7rc7pd3lv25" designImageOffsetX="-72" designImageOffsetY="-286" designImageAlpha="0">
|
||||
<controller name="style" exported="true" pages="0,无,1,切换,2,下拉,3,进度,4,按键" selected="2"/>
|
||||
<component size="1190,52" extention="Button" designImage="ui://hxr7rc7pdczw2n" designImageOffsetX="-39" designImageOffsetY="-60" designImageAlpha="0">
|
||||
<controller name="style" exported="true" pages="0,无,1,切换,2,下拉,3,进度,4,按键" selected="0"/>
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="0"/>
|
||||
<displayList>
|
||||
<image id="n5_e9z8" name="back" src="kryob" fileName="Images/Square.png" pkg="xo76q8wz" xy="0,0" size="874,48" alpha="0.1" color="#1c1c1c">
|
||||
<gearColor controller="button" pages="2,3,4,5" values="#1c1c1c|#5e5e5e|#5e5e5e|#5e5e5e"/>
|
||||
<image id="n5_e9z8" name="back" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" pkg="6hgkvlau" xy="1,0" size="1040,52">
|
||||
<gearColor controller="button" pages="2,3,4,5" values="#ffffff|#5e5e5e|#5e5e5e|#5e5e5e"/>
|
||||
</image>
|
||||
<image id="n17_d3lv" name="n17" src="mbu9yj" fileName="ImagesNew/Square/mini/square20_stroke1px.png" pkg="6hgkvlau" xy="0,0" size="874,48" color="#252523">
|
||||
<gearColor controller="button" pages="2,3,4,5" values="#252523|#afb0ab|#afb0ab|#afb0ab"/>
|
||||
</image>
|
||||
<text id="n6_e9z8" name="TextName" xy="9,10" size="79,28" font="ui://6hgkvlaugkm7x" fontSize="19" color="#9d9d9d" text="菜单字幕"/>
|
||||
<text id="n7_e9z8" name="TextInfo" xy="500,10" pivot="0.5,0.5" size="299,28" fontSize="19" color="#e1e0dc" align="center" autoSize="none" text="x2">
|
||||
<text id="n6_e9z8" name="TextName" xy="20,11" size="111,29" font="ui://6hgkvlaugkm7w" fontSize="20" color="#303f4e" text="LANGUAGE"/>
|
||||
<text id="n7_e9z8" name="TextInfo" xy="605,2" pivot="0.5,0.5" size="299,28" fontSize="19" color="#e1e0dc" align="center" autoSize="none" text="x2">
|
||||
<gearDisplay controller="style" pages="1"/>
|
||||
<gearXY controller="style" pages="1,2,3,4" values="500,2|500,10|500,2|500,2" default="605,2"/>
|
||||
</text>
|
||||
<component id="n9_e9z8" name="Slider" src="e9z8k4" fileName="Com/Slider/CommonSlider.xml" pkg="6hgkvlau" xy="494,18" size="348,12">
|
||||
<component id="n9_e9z8" name="Slider" src="e9z8k4" fileName="Com/Slider/CommonSlider.xml" pkg="6hgkvlau" xy="788,18" size="348,12">
|
||||
<gearDisplay controller="style" pages="3"/>
|
||||
<relation target="" sidePair="right-right%"/>
|
||||
<Slider value="100" max="100"/>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,1080" extention="Label" designImage="ui://hxr7rc7pvboj21" designImageAlpha="30">
|
||||
<component size="1920,1080" extention="Label" designImage="ui://hxr7rc7pdczw2l" designImageAlpha="30">
|
||||
<displayList>
|
||||
<component id="n14_gii7" name="n14" src="8hy8la" fileName="Com/Back/Back1.xml" pkg="6hgkvlau" xy="0,0">
|
||||
<component id="n14_gii7" name="n14" src="8hy8la" fileName="Com/Back/UIBlurBackground.xml" pkg="6hgkvlau" xy="0,0">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</component>
|
||||
<component id="n16_d3lv" name="MenuList" src="r03us" fileName="Com/Menu/CommonSubMenu.xml" pkg="6hgkvlau" xy="72,108">
|
||||
<component id="n21_mbu9" name="Title" src="mbu9ya" fileName="Com/Tags/ComoomTitle.xml" pkg="6hgkvlau" xy="0,0"/>
|
||||
<component id="n16_d3lv" name="MenuList" src="r03us" fileName="Com/Menu/CommonSubMenu.xml" pkg="6hgkvlau" xy="0,90">
|
||||
<relation target="" sidePair="left-left,top-top"/>
|
||||
</component>
|
||||
<component id="n3_e9z8" name="Introduce" src="e9z89" fileName="Com/IntroduceTag.xml" xy="985,179" size="890,828">
|
||||
<relation target="" sidePair="right-right,top-top,bottomext-bottom"/>
|
||||
</component>
|
||||
<list id="n10_e9z8" name="List" xy="72,179" size="886,828" overflow="scroll" scrollBarFlags="4" clipSoftness="10,10" lineGap="10" defaultItem="ui://hxr7rc7pe9z88" autoClearItems="true">
|
||||
<list id="n10_e9z8" name="List" xy="41,147" size="1200,868" overflow="scroll" scrollBarFlags="4" clipSoftness="10,10" lineGap="10" defaultItem="ui://hxr7rc7pe9z88" autoClearItems="true">
|
||||
<relation target="" sidePair="left-left,top-top,rightext-right,bottomext-bottom"/>
|
||||
<item url="ui://hxr7rc7pj6rn17"/>
|
||||
<item/>
|
||||
@@ -28,10 +29,9 @@
|
||||
<item/>
|
||||
<item/>
|
||||
</list>
|
||||
<component id="n11_e9z8" name="BottomMenu" src="9mf1z" fileName="Com/Menu/BottomMenu.xml" pkg="6hgkvlau" xy="0,1014">
|
||||
<component id="n11_e9z8" name="BottomMenu" src="9mf1z" fileName="Com/Menu/BottomMenu.xml" pkg="6hgkvlau" xy="0,1020">
|
||||
<relation target="" sidePair="width-width,center-center,bottom-bottom"/>
|
||||
</component>
|
||||
<component id="n13_j6rn" name="Mask" src="j6rn18" fileName="Com/SettingMask.xml" xy="0,0" visible="false"/>
|
||||
<component id="n21_mbu9" name="Title" src="mbu9ya" fileName="Com/Tags/ComoomTitle.xml" pkg="6hgkvlau" xy="0,0" size="1920,90"/>
|
||||
</displayList>
|
||||
</component>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="1920,1080" designImage="ui://hxr7rc7pj2ni2a" designImageOffsetY="-45" designImageAlpha="30">
|
||||
<component size="1920,1080" designImageOffsetY="-45" designImageAlpha="30">
|
||||
<displayList>
|
||||
<component id="n4_j2ni" name="n4" src="mbu9y7" fileName="Com/Buttons/BtnMask.xml" pkg="6hgkvlau" xy="0,0" size="1920,1080">
|
||||
<relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
|
||||
</component>
|
||||
<image id="n0_j2ni" name="n0" src="vbojnh" fileName="ImagesNew/Square/square128_fill.png" pkg="6hgkvlau" xy="1,366" size="1920,348" color="#000000"/>
|
||||
<text id="n1_j2ni" name="n1" xy="841,460" size="247,46" font="ui://6hgkvlaugkm7v" fontSize="34" color="#e9e9e9" align="center" vAlign="middle" autoSize="none" text="正在等待输入...">
|
||||
<image id="n5_dczw" name="back" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" pkg="6hgkvlau" xy="459,431" size="1002,218">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</image>
|
||||
<image id="n6_dczw" name="n6" src="dczwyx" fileName="ImagesNew/Square/mini/square24_round8px_bottom.png" pkg="6hgkvlau" xy="459,595" size="1002,61" color="#3d5c7a"/>
|
||||
<text id="n1_j2ni" name="n1" xy="842,447" size="247,46" font="ui://6hgkvlaugkm7v" fontSize="34" color="#303f4e" align="center" vAlign="middle" autoSize="none" text="正在等待输入...">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<text id="n2_j2ni" name="TextTime" xy="944,507" size="33,66" fontSize="50" color="#07acda" align="center" vAlign="middle" text="5">
|
||||
<text id="n2_j2ni" name="TextTime" xy="945,510" size="33,66" fontSize="50" color="#fe8d1d" align="center" vAlign="middle" text="5">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</text>
|
||||
<component id="n3_j2ni" name="BtnCancel" src="r03uj0" fileName="Com/Buttons/BtnTitleInputControl.xml" pkg="6hgkvlau" xy="920,587">
|
||||
<component id="n3_j2ni" name="BtnCancel" src="r03uj0" fileName="Com/Buttons/BtnTitleInputControl.xml" pkg="6hgkvlau" xy="920,608">
|
||||
<Button title="取消" icon="ui://6hgkvlauvbojvi"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="284,320" overflow="hidden" extention="Button" designImage="ui://hxr7rc7pcmiv2c" designImageOffsetX="-175" designImageOffsetY="-539" designImageAlpha="0">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver,6,disabled,7,selectedDisabled" selected="2"/>
|
||||
<component size="284,320" overflow="hidden" extention="Button" designImage="ui://hxr7rc7pdczw2e" designImageAlpha="0">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver,6,disabled,7,selectedDisabled" selected="3"/>
|
||||
<displayList>
|
||||
<image id="n10_r03u" name="back" src="mbu9yj" fileName="ImagesNew/Square/mini/square20_stroke1px.png" pkg="6hgkvlau" xy="0,0" size="284,320">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="1,0,0,0|1,0,0,0|1,0,0,0|1,0,0,0" default="0.8,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,3,4,5,6,7" values="#727270|#ffffff|#ffffff|#ffffff|#6fa8c0|#6fa8c0"/>
|
||||
<image id="n19_cmiv" name="n19" src="dczwyy" fileName="ImagesNew/Square/mini/square24_round8px_fill.png" pkg="6hgkvlau" xy="0,0" size="284,320">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<image id="n19_cmiv" name="n19" src="vbojnh" fileName="ImagesNew/Square/square128_fill.png" pkg="6hgkvlau" xy="0,0" size="284,320" alpha="0.15" color="#afb0ab">
|
||||
<gearLook controller="button" pages="3,4,5" values="0.1,0,0,0|0.15,0,0,0|0.1,0,0,0" default="0.2,0,0,0"/>
|
||||
<gearColor controller="button" pages="3,4,5" values="#afb0ab|#afb0ab|#afb0ab" default="#323232"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
<image id="n20_dczw" name="select" src="vbojnu" fileName="ImagesNew/Square/square128_round5px_stroke3px.png" pkg="6hgkvlau" xy="0,0" size="284,320" color="#fe8d1d">
|
||||
<gearLook controller="button" pages="2,3,4,5" values="0,0,0,0|1,0,0,0|1,0,0,0|1,0,0,0" default="0,0,0,0" tween="true"/>
|
||||
</image>
|
||||
<text id="n7_oome" name="title" xy="24,7" size="242,32" fontSize="22" color="#e9e9e9" autoSize="height" text="Title"/>
|
||||
<loader id="n13_r03u" name="icon" xy="42,66" size="200,200" align="center" vAlign="middle" fill="scale" clearOnPublish="true">
|
||||
<text id="n7_oome" name="title" xy="24,10" size="242,32" fontSize="22" color="#16202f" autoSize="height" text="Title"/>
|
||||
<loader id="n13_r03u" name="icon" xy="42,61" size="200,200" align="center" vAlign="middle" fill="scale" clearOnPublish="true">
|
||||
<relation target="" sidePair="center-center,middle-middle"/>
|
||||
</loader>
|
||||
<text id="n15_r03u" name="TextPrice" xy="217,280" pivot="1,1" size="27,29" fontSize="20" color="#e1e0dc" align="right" text="11">
|
||||
<text id="n15_r03u" name="TextPrice" xy="217,280" pivot="1,1" size="27,29" fontSize="20" color="#16202f" align="right" text="11">
|
||||
<relation target="" sidePair="right-right,bottom-bottom"/>
|
||||
</text>
|
||||
<loader id="n16_r03u" name="n16" xy="246,285" size="20,20" url="ui://xo76q8wzr03uj9" align="center" vAlign="middle" fill="scale" color="#8bf3ff">
|
||||
<loader id="n16_r03u" name="n16" xy="246,285" size="20,20" url="ui://xo76q8wzr03uj9" align="center" vAlign="middle" fill="scale" color="#16202f">
|
||||
<relation target="" sidePair="right-right,bottom-bottom"/>
|
||||
</loader>
|
||||
<image id="n17_fpwl" name="Quality" src="kryob" fileName="Images/Square.png" pkg="xo76q8wz" xy="13,14" size="4,20" color="#ff6c00"/>
|
||||
<text id="n18_fpwl" name="TextAmount" xy="18,280" size="75,29" fontSize="20" color="#e9e9e9" align="right" text="个数:1">
|
||||
<image id="n17_fpwl" name="Quality" src="kryob" fileName="Images/Square.png" pkg="xo76q8wz" xy="13,17" size="4,20" color="#ff6c00"/>
|
||||
<text id="n18_fpwl" name="TextAmount" xy="18,280" size="75,29" fontSize="20" color="#16202f" align="right" text="个数:1">
|
||||
<relation target="" sidePair="left-left,bottom-bottom"/>
|
||||
</text>
|
||||
</displayList>
|
||||
|
||||
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 155 KiB |
BIN
FGUIProject/assets/Main/Shop/x效果图/shopItem.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
FGUIProject/assets/Main/Shop/x效果图/商店(1).png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
@@ -68,21 +68,6 @@
|
||||
<image id="fcfg4" name="自动贩卖机.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="fcfg5" name="咖啡店.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="fcfg6" name="食品店.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uc" name="20250521000344_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03ud" name="20250521221501_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03ue" name="20250521221613_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uf" name="20250521221623_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03ug" name="20250521221650_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uh" name="20250521221757_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03ui" name="20250521221819_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uj" name="20250521221928_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uk" name="20250521221948_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03ul" name="20250521222125_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03um" name="20250521222215_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03un" name="20250521222223_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uo" name="20250521222232_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03up" name="20250521222522_1.jpg" path="/Shop/x效果图/"/>
|
||||
<image id="r03uq" name="20250521222909_1.jpg" path="/Shop/x效果图/"/>
|
||||
<component id="fcfg8" name="FishingShopPanel.xml" path="/Shop/" exported="true"/>
|
||||
<component id="uiwj1s" name="BagSelectPanel.xml" path="/Bag/" exported="true"/>
|
||||
<component id="uiwj1t" name="BagSlotItem.xml" path="/Bag/" exported="true"/>
|
||||
@@ -92,17 +77,18 @@
|
||||
<component id="fpwl1y" name="ShopBuyItem.xml" path="/Shop/Com/" exported="true"/>
|
||||
<component id="fpwl1z" name="BtnBuy.xml" path="/Shop/Com/" exported="true"/>
|
||||
<image id="vboj20" name="成绩.jpg" path="/Assets/效果图/"/>
|
||||
<image id="vboj21" name="设置.jpg" path="/Assets/效果图/设置/"/>
|
||||
<image id="d3lv22" name="20260131233807_1.jpg" path="/Assets/效果图/设置/"/>
|
||||
<image id="d3lv23" name="20260131233825_1.jpg" path="/Assets/效果图/设置/"/>
|
||||
<image id="d3lv24" name="20260131233827_1.jpg" path="/Assets/效果图/设置/"/>
|
||||
<image id="d3lv25" name="20260131233729_1.jpg" path="/Assets/效果图/设置/"/>
|
||||
<component id="mbu927" name="CommonComboBox_item.xml" path="/Settings/"/>
|
||||
<component id="mbu928" name="CommonComboBox_popup.xml" path="/Settings/"/>
|
||||
<component id="mbu929" name="CommonComboBox.xml" path="/Settings/" exported="true"/>
|
||||
<image id="j2ni2a" name="等待输入.jpg" path="/Assets/效果图/设置/"/>
|
||||
<component id="j2ni2b" name="SettingWaitInputPanel.xml" path="/Settings/" exported="true"/>
|
||||
<image id="cmiv2c" name="20260201110006_1.jpg" path="/Assets/效果图/商店/"/>
|
||||
<image id="dczw2d" name="商店(1).png" path="/Shop/x效果图/"/>
|
||||
<image id="dczw2e" name="shopItem.png" path="/Shop/x效果图/"/>
|
||||
<image id="dczw2f" name="完成提示(1).png" path="/Assets/效果图/"/>
|
||||
<image id="dczw2l" name="设置1(1).png" path="/Assets/效果图/设置/"/>
|
||||
<image id="dczw2m" name="合成(1).png" path="/Assets/效果图/设置/"/>
|
||||
<image id="dczw2n" name="设置3.png" path="/Assets/效果图/设置/"/>
|
||||
<image id="dczw2o" name="设置4.png" path="/Assets/效果图/设置/"/>
|
||||
</resources>
|
||||
<publish name="" path="../Assets/ResRaw/Fgui/Main" packageCount="2" genCode="true"/>
|
||||
</packageDescription>
|
||||
@@ -6,6 +6,14 @@ var System = CS.System;
|
||||
const CodeWriter_1 = require("./CodeWriter");
|
||||
const GenCodeSettings_1 = require("./GenCodeSettings");
|
||||
const LanguageSettings_1 = require("./LanguageSettings");
|
||||
const tweenSetting = (function () {
|
||||
try {
|
||||
return require('../whoot-tween/TweenSettings').default || require('../whoot-tween/TweenSettings');
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
}
|
||||
})();
|
||||
const File = System.IO.File;
|
||||
const Directory = System.IO.Directory;
|
||||
const App = FairyEditor.App;
|
||||
@@ -119,6 +127,8 @@ function genCSCode(handler) {
|
||||
console.log("生成Binder,count=" + componentClassNameArr.length);
|
||||
genBinder(codePkgName, componentClassNameArr);
|
||||
genLanguage();
|
||||
// 生成动效配置
|
||||
genTween();
|
||||
}
|
||||
function getScriptName(className, comUrl) {
|
||||
if (allCustomNameByUrl.hasOwnProperty(comUrl)) {
|
||||
@@ -487,3 +497,72 @@ function genLanguage() {
|
||||
}
|
||||
writer.save(savePath);
|
||||
}
|
||||
/**
|
||||
* 生成动效配置
|
||||
* 结构参考多语言生成:按包 -> 组件URL -> 子项id,写入 C# 配置类
|
||||
*/
|
||||
function genTween() {
|
||||
let binderName = 'UITweenConfig';
|
||||
if (!tweenSetting || !tweenSetting.getAllPackage) {
|
||||
console.warn('UITweenConfig 生成被跳过:未找到 ../whoot-tween/TweenSettings.js 或接口不完整');
|
||||
return;
|
||||
}
|
||||
let tweenMap = tweenSetting.getAllPackage();
|
||||
let codeConfig = new WhootCodeWriterConfig();
|
||||
codeConfig.fileMark = "/**注册组件动效绑定。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/";
|
||||
let writer = new CodeWriter_1.default(codeConfig);
|
||||
writer.reset();
|
||||
writer.writeln('using System.Collections.Generic;');
|
||||
writer.writeln('using FairyGUI;');
|
||||
writer.writeln('using NBC;');
|
||||
writer.writeln();
|
||||
if (setNamespaceName) {
|
||||
writer.writeln('namespace %s', namespaceName);
|
||||
writer.startBlock();
|
||||
}
|
||||
writer.writeln('public class %s : UIComponentTweenPack', binderName);
|
||||
writer.startBlock();
|
||||
writer.writeln('public %s()', binderName);
|
||||
writer.startBlock();
|
||||
writer.writeln('AddData();');
|
||||
writer.endBlock();
|
||||
writer.writeln();
|
||||
writer.writeln('private void AddData()');
|
||||
writer.startBlock();
|
||||
let keys = tweenMap.keys();
|
||||
for (let key of keys) {
|
||||
let pack = tweenMap.get(key);
|
||||
let tweenData = pack.components;
|
||||
for (let comUrl in tweenData) {
|
||||
let comObj = tweenData[comUrl];
|
||||
if (comObj == undefined)
|
||||
continue;
|
||||
writer.writeln('// %s', key);
|
||||
writer.writeln('Add("%s", new UIComponentTween()', comUrl);
|
||||
writer.startBlock();
|
||||
for (let childId in comObj) {
|
||||
var cfg = comObj[childId];
|
||||
let useable = cfg['useable'];
|
||||
let tweenKey = cfg['key'];
|
||||
if (useable != 1)
|
||||
continue;
|
||||
writer.writeln('{ "%s", "%s" },', childId, tweenKey);
|
||||
}
|
||||
writer.endBlock();
|
||||
writer.writeln(');');
|
||||
}
|
||||
writer.writeln();
|
||||
}
|
||||
writer.endBlock(); // AddData
|
||||
writer.endBlock(); // class
|
||||
if (setNamespaceName) {
|
||||
writer.endBlock(); // namespace
|
||||
}
|
||||
let fileName = binderName + '.cs';
|
||||
let savePath = exportCodePath + '/' + fileName;
|
||||
console.log("生成 tween=", fileName);
|
||||
if (existScriptPaths.hasOwnProperty(fileName)) {
|
||||
savePath = existScriptPaths[fileName];
|
||||
}
|
||||
writer.save(savePath);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,14 @@ import CodeWriter, { ICodeWriterConfig } from './CodeWriter';
|
||||
import genSetting, { ComponentData, MemberData } from './GenCodeSettings'
|
||||
import languageSetting, { LanguageComponentChildData } from './LanguageSettings'
|
||||
|
||||
// Tween 使用运行时 require,避免跨项目编译输出位置错乱;本地定义最小类型接口
|
||||
interface TweenComponentChildData { id: string; key: string; useable: number }
|
||||
// 注意:运行时从相对路径加载已编译的 JS(CustomAttributer/TweenSettings.js)
|
||||
declare const require: any;
|
||||
const tweenSetting: any = (function(){
|
||||
try { return require('../whoot-tween/TweenSettings').default || require('../whoot-tween/TweenSettings'); } catch { return null; }
|
||||
})();
|
||||
|
||||
const File = System.IO.File;
|
||||
const Directory = System.IO.Directory;
|
||||
const App = FairyEditor.App;
|
||||
@@ -137,6 +145,8 @@ function genCSCode(handler: FairyEditor.PublishHandler) {
|
||||
console.log("生成Binder,count="+componentClassNameArr.length)
|
||||
genBinder(codePkgName, componentClassNameArr);
|
||||
genLanguage();
|
||||
// 生成动效配置
|
||||
genTween();
|
||||
}
|
||||
|
||||
function getScriptName(className: string, comUrl: string) {
|
||||
@@ -587,4 +597,87 @@ function genLanguage() {
|
||||
writer.save(savePath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成动效配置
|
||||
* 结构参考多语言生成:按包 -> 组件URL -> 子项id,写入 C# 配置类
|
||||
*/
|
||||
function genTween() {
|
||||
let binderName = 'UITweenConfig';
|
||||
|
||||
if (!tweenSetting || !tweenSetting.getAllPackage) {
|
||||
console.warn('UITweenConfig 生成被跳过:未找到 ../whoot-tween/TweenSettings.js 或接口不完整');
|
||||
return;
|
||||
}
|
||||
let tweenMap = tweenSetting.getAllPackage();
|
||||
|
||||
let codeConfig: WhootCodeWriterConfig = new WhootCodeWriterConfig();
|
||||
codeConfig.fileMark = "/**注册组件动效绑定。本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/"
|
||||
|
||||
let writer = new CodeWriter(codeConfig);
|
||||
writer.reset();
|
||||
|
||||
writer.writeln('using System.Collections.Generic;');
|
||||
writer.writeln('using FairyGUI;');
|
||||
writer.writeln('using NBC;');
|
||||
writer.writeln();
|
||||
if (setNamespaceName) {
|
||||
writer.writeln('namespace %s', namespaceName);
|
||||
writer.startBlock();
|
||||
}
|
||||
writer.writeln('public class %s : UIComponentTweenPack', binderName);
|
||||
writer.startBlock();
|
||||
|
||||
writer.writeln('public %s()', binderName);
|
||||
writer.startBlock();
|
||||
writer.writeln('AddData();');
|
||||
writer.endBlock();
|
||||
|
||||
writer.writeln();
|
||||
writer.writeln('private void AddData()');
|
||||
writer.startBlock();
|
||||
|
||||
let keys = tweenMap.keys();
|
||||
for (let key of keys) {
|
||||
let pack = tweenMap.get(key);
|
||||
let tweenData = pack.components;
|
||||
|
||||
for (let comUrl in tweenData) {
|
||||
let comObj = tweenData[comUrl];
|
||||
if (comObj == undefined) continue;
|
||||
writer.writeln('// %s', key);
|
||||
writer.writeln('Add("%s", new UIComponentTween()', comUrl);
|
||||
writer.startBlock();
|
||||
for (let childId in comObj) {
|
||||
var cfg = comObj[childId] as TweenComponentChildData | any;
|
||||
let useable = cfg['useable'];
|
||||
let tweenKey = cfg['key'];
|
||||
if (useable != 1) continue;
|
||||
writer.writeln('{ "%s", "%s" },', childId, tweenKey);
|
||||
}
|
||||
writer.endBlock();
|
||||
writer.writeln(');');
|
||||
}
|
||||
|
||||
writer.writeln();
|
||||
}
|
||||
|
||||
writer.endBlock(); // AddData
|
||||
|
||||
writer.endBlock(); // class
|
||||
if (setNamespaceName) {
|
||||
writer.endBlock(); // namespace
|
||||
}
|
||||
|
||||
let fileName = binderName + '.cs'
|
||||
let savePath = exportCodePath + '/' + fileName
|
||||
console.log("生成 tween=", fileName)
|
||||
if (existScriptPaths.hasOwnProperty(fileName)) {
|
||||
savePath = existScriptPaths[fileName]
|
||||
}
|
||||
|
||||
writer.save(savePath);
|
||||
}
|
||||
|
||||
|
||||
export { genCSCode };
|
||||
28
FGUIProject/plugins/whoot-tween/CodeWriter.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
interface ICodeWriterConfig {
|
||||
blockStart?: string;
|
||||
blockEnd?: string;
|
||||
blockFromNewLine?: boolean;
|
||||
usingTabs?: boolean;
|
||||
endOfLine?: string;
|
||||
fileMark?: string;
|
||||
}
|
||||
export default class CodeWriter {
|
||||
private blockStart;
|
||||
private blockEnd;
|
||||
private blockFromNewLine;
|
||||
private indentStr;
|
||||
private endOfLine;
|
||||
private lines;
|
||||
private indent;
|
||||
private fileMark;
|
||||
constructor(config?: ICodeWriterConfig);
|
||||
writeMark(): void;
|
||||
writeln(fmt?: string, ...args: any[]): CodeWriter;
|
||||
startBlock(): CodeWriter;
|
||||
endBlock(): CodeWriter;
|
||||
incIndent(): CodeWriter;
|
||||
decIndent(): CodeWriter;
|
||||
reset(): void;
|
||||
toString(): string;
|
||||
save(filePath: string): void;
|
||||
}
|
||||
BIN
FGUIProject/plugins/whoot-tween/TweenAttributer_fui.bytes
Normal file
460
FGUIProject/plugins/whoot-tween/TweenCoustomInspector.js
Normal file
@@ -0,0 +1,460 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CustomAttributer = void 0;
|
||||
const csharp_1 = require("csharp");
|
||||
const puerts_1 = require("puerts");
|
||||
const index_1 = require("./index");
|
||||
const App = csharp_1.FairyEditor.App;
|
||||
// 动效设置(参考 LanguageSettings 的存储方式)
|
||||
const TweenSettings_1 = require("./TweenSettings");
|
||||
class CustomAttributer extends csharp_1.FairyEditor.View.PluginInspector {
|
||||
list;
|
||||
components = [];
|
||||
pattern = "*";
|
||||
parent = false;
|
||||
textMode;
|
||||
mode = index_1.EMode.WRITE;
|
||||
modeCtr;
|
||||
// private btn_save: FairyGUI.GButton;
|
||||
// private btn_reset: FairyGUI.GButton;
|
||||
customData = "";
|
||||
customDataObj = {};
|
||||
constructor(data) {
|
||||
super();
|
||||
this.panel = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", "Main").asCom;
|
||||
// this.panel.GetChild("btn_save").asButton.visible = false;
|
||||
// this.panel.GetChild("btn_reset").asButton.visible = false;
|
||||
// this.panel.GetChild("btn_copy").asButton.visible = false;
|
||||
let { components, mode, pattern, parent } = data;
|
||||
this.components = components;
|
||||
this.pattern = pattern;
|
||||
this.parent = parent;
|
||||
this.list = this.panel.GetChild("list_components").asList;
|
||||
//this.textMode = this.panel.GetChild("text_mode").asTextField;
|
||||
this.mode = mode || index_1.EMode.WRITE; // todo
|
||||
if (this.components.length > 0) {
|
||||
this.list.numItems = 0;
|
||||
}
|
||||
this.modeCtr = this.panel.GetController("op");
|
||||
// this.btn_save = this.panel.GetChild("btn_save").asButton;
|
||||
// this.btn_save.onClick.Add(() => {
|
||||
// this.setCustomData();
|
||||
// })
|
||||
// this.btn_reset = this.panel.GetChild("btn_reset").asButton;
|
||||
// this.btn_reset.onClick.Add(() => {
|
||||
// this.showList(true);
|
||||
// })
|
||||
this.updateAction = () => { return this.updateUI(); };
|
||||
}
|
||||
lastSelectedComponent = "";
|
||||
lastData = "";
|
||||
updateUI() {
|
||||
let curDoc = App.activeDoc;
|
||||
let { inspectingTarget } = curDoc;
|
||||
let id = this.parent ? curDoc.docURL : inspectingTarget.id;
|
||||
// 实时获取自定义数据
|
||||
let propName = this.parent ? "remark" : "customData";
|
||||
this.customData = inspectingTarget.GetProperty(propName);
|
||||
try {
|
||||
this.customDataObj = JSON.parse(this.customData) || {};
|
||||
}
|
||||
catch (e) {
|
||||
// console.log("自定义数据异常或没有发现自定义数据,无法渲染列表");
|
||||
this.customDataObj = {};
|
||||
}
|
||||
// 根据匹配规则验证是否显示inspector
|
||||
// 正则 & 字符串 通配符
|
||||
let name = this.parent ? curDoc.displayTitle : inspectingTarget.name;
|
||||
let pattern = isMatch(name, this.pattern);
|
||||
if ((pattern && this.lastSelectedComponent != id) || this.customData !== this.lastData) { // 判断是否满足条件的组件以及是上一次选中的组件或者数据是否被修改
|
||||
this.showList();
|
||||
}
|
||||
this.lastData = this.customData;
|
||||
this.lastSelectedComponent = id;
|
||||
return pattern;
|
||||
}
|
||||
showList(reset = false) {
|
||||
this.list.numItems = 0;
|
||||
// todo
|
||||
// if (this.mode == EMode.WRITE) {
|
||||
// this.textMode.SetVar("mode", "设置").FlushVars();
|
||||
// this.modeCtr.SetSelectedPage("write");
|
||||
// } else {
|
||||
// this.textMode.SetVar("mode", "读取").FlushVars();
|
||||
// this.modeCtr.SetSelectedPage("read");
|
||||
// }
|
||||
// 根据自定义属性和配置文件混合比较【以自定义属性为主】渲染列表数据
|
||||
for (let item of this.components) {
|
||||
let { type, name, id, key } = item;
|
||||
let com = getComponent(type);
|
||||
if (!key) {
|
||||
console.log("未定义唯一keyID:", id);
|
||||
return;
|
||||
}
|
||||
if (!com) {
|
||||
console.log("发现未定义扩展组件,ID:", id);
|
||||
}
|
||||
com.title = name || key;
|
||||
const component = com.GetChild("component");
|
||||
com.name = key;
|
||||
this.renderItem(component, item, reset);
|
||||
// 监听组件变更并保存到 json(参考 LanguageCustomInspector 的做法)
|
||||
this.bindPersistEvents(component, item);
|
||||
this.list.AddChild(com);
|
||||
}
|
||||
this.list.ResizeToFit();
|
||||
// 更新关联关系
|
||||
for (let item of this.components) {
|
||||
let { associate, key } = item;
|
||||
// 找到关联组件
|
||||
let associateCom, curCom;
|
||||
for (let i = 0; i < this.list.numChildren; i++) {
|
||||
let com = this.list.GetChildAt(i);
|
||||
if (com.name == associate) {
|
||||
associateCom = com;
|
||||
}
|
||||
if (com.name == key) {
|
||||
curCom = com;
|
||||
}
|
||||
}
|
||||
if (associateCom && !associateCom.GetChild("component").selected && curCom) {
|
||||
this.list.RemoveChild(curCom);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 给渲染出来的控件绑定事件:
|
||||
* -(已暂时停用)更新自定义属性(SetProperty)
|
||||
* - 将动效设置保存到项目设置目录下的 json(whootTween/<package>.json)
|
||||
*/
|
||||
bindPersistEvents(component, item) {
|
||||
const persist = () => {
|
||||
// 暂时不写回到自定义数据,仅保存到 json
|
||||
// this.setCustomData();
|
||||
// 将与动效相关的设置保存到 json
|
||||
this.trySaveTweenSetting(item, component);
|
||||
};
|
||||
// 根据控件类型选择合适的触发时机
|
||||
if (component instanceof csharp_1.FairyGUI.GComboBox) {
|
||||
component.onChanged.Add(persist);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyEditor.Component.NumericInput) {
|
||||
// 数字输入使用失焦触发
|
||||
component.onFocusOut.Add(persist);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GSlider) {
|
||||
component.onChanged.Add(persist);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GButton) { // SWITCH / RADIOBOX
|
||||
component.onChanged.Add(persist);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyEditor.Component.ColorInput) {
|
||||
component.onChanged.Add(persist);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GLabel) { // 文本输入类:失焦时保存
|
||||
component.onFocusOut.Add(persist);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 将与动效相关的设置保存到 json 文件。
|
||||
* 规则:
|
||||
* - 仅对下拉框(ComboBox)做持久化(其 value 代表动效 key)
|
||||
* - 当选中值为 "null" 视为未启用(useable=false),否则为启用
|
||||
*/
|
||||
trySaveTweenSetting(item, component) {
|
||||
try {
|
||||
if (!(component instanceof csharp_1.FairyGUI.GComboBox))
|
||||
return;
|
||||
// 读取当前对象与文档信息
|
||||
let sels = App.activeDoc.inspectingTargets;
|
||||
let obj = sels.get_Item(0);
|
||||
let activeDoc = App.activeDoc;
|
||||
let packageName = activeDoc.packageItem.owner.name;
|
||||
let docUrl = activeDoc.docURL;
|
||||
let objId = obj.id;
|
||||
// 父级组件通常没有有效的 id,这里为父级使用文档级占位 id
|
||||
if ((!objId || objId === "") && this.parent) {
|
||||
objId = "__root__";
|
||||
}
|
||||
// 当前选择的动效 key
|
||||
const selectedIndex = component.selectedIndex;
|
||||
const selectedValue = component.values?.get_Item(selectedIndex);
|
||||
// 条件:无(值为"null")或组件ID为空(非父级场景),不记录
|
||||
if ((!objId || objId === "") && !this.parent)
|
||||
return;
|
||||
if (selectedValue == null)
|
||||
return;
|
||||
if (selectedValue === "null") {
|
||||
// 选择“无”时,删除已存在的记录
|
||||
TweenSettings_1.default.remove(packageName, docUrl, objId);
|
||||
return;
|
||||
}
|
||||
const useable = true; // 只有有效选择才记录,直接标记为可用
|
||||
// 保存到 whootTween/<package>.json
|
||||
TweenSettings_1.default.update(packageName, docUrl, objId, selectedValue, useable);
|
||||
// 保存后做一次清理:把已删除的组件从 json 中移除
|
||||
this.cleanupDeletedComponents(packageName, docUrl);
|
||||
}
|
||||
catch (e) {
|
||||
console.error("保存动效设置到 json 失败:", e);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 收集当前文档中仍然存在的组件ID(递归)并触发清理
|
||||
*/
|
||||
cleanupDeletedComponents(packageName, docUrl) {
|
||||
try {
|
||||
const ids = [];
|
||||
const visited = {};
|
||||
const collect = (node) => {
|
||||
if (!node)
|
||||
return;
|
||||
const nid = node.id;
|
||||
if (nid && !visited[nid]) {
|
||||
visited[nid] = true;
|
||||
ids.push(nid);
|
||||
}
|
||||
if (node instanceof csharp_1.FairyEditor.FComponent) {
|
||||
const cnt = node.numChildren;
|
||||
for (let i = 0; i < cnt; i++) {
|
||||
const child = node.GetChildAt(i);
|
||||
collect(child);
|
||||
}
|
||||
}
|
||||
};
|
||||
const activeDoc = App.activeDoc;
|
||||
if (activeDoc && activeDoc.content) {
|
||||
collect(activeDoc.content);
|
||||
}
|
||||
// 仅当有 id 列表时尝试清理(保留 __root__)
|
||||
TweenSettings_1.default.cleanupDoc(packageName, docUrl, ids);
|
||||
}
|
||||
catch (err) {
|
||||
console.error('清理已删除组件记录失败', err);
|
||||
}
|
||||
}
|
||||
renderItem(component, item, reset) {
|
||||
let { value, key } = item;
|
||||
if (!reset) {
|
||||
let defaultVal = this.getValueByName(key);
|
||||
value = defaultVal != undefined ? defaultVal : value;
|
||||
}
|
||||
// 下拉框
|
||||
if (component instanceof csharp_1.FairyGUI.GComboBox && item.type == index_1.EComponent.COMBOBOX) {
|
||||
let data = item.data;
|
||||
let valueArr = csharp_1.System.Array.CreateInstance((0, puerts_1.$typeof)(csharp_1.System.String), data.values.length);
|
||||
for (let i = 0; i < data.values.length; i++) {
|
||||
let v = data.values[i];
|
||||
valueArr.set_Item(i, v);
|
||||
}
|
||||
let itemArr = csharp_1.System.Array.CreateInstance((0, puerts_1.$typeof)(csharp_1.System.String), data.items.length);
|
||||
for (let i = 0; i < data.items.length; i++) {
|
||||
let v = data.items[i];
|
||||
itemArr.set_Item(i, v);
|
||||
}
|
||||
component.items = itemArr;
|
||||
component.values = valueArr;
|
||||
// 优先使用外部配置(TweenSettings)进行回填
|
||||
const extVal = this.getExternalTweenKey();
|
||||
if (extVal && data.values.indexOf(extVal) >= 0) {
|
||||
component.value = extVal;
|
||||
}
|
||||
else {
|
||||
// 兼容:customData 可能保存的是值字符串或索引
|
||||
if (typeof value === 'string' && data.values.indexOf(value) >= 0) {
|
||||
component.value = value;
|
||||
}
|
||||
else {
|
||||
const idx = Number(value);
|
||||
const finalIdx = isNaN(idx) ? 0 : idx;
|
||||
component.value = data.values[finalIdx] ?? data.values[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GLabel &&
|
||||
(item.type == index_1.EComponent.TEXTINPUT ||
|
||||
item.type == index_1.EComponent.TEXTAREA ||
|
||||
item.type == index_1.EComponent.RESOURCEINPUT)) { // 文本输入框
|
||||
component.title = value + "" || "";
|
||||
}
|
||||
else if (item.type == index_1.EComponent.COLORINPUT && component instanceof csharp_1.FairyEditor.Component.ColorInput) { // 颜色输入框
|
||||
let colorValue = value + "" || "#000000";
|
||||
component.colorValue = csharp_1.FairyEditor.ColorUtil.FromHexString(colorValue);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GSlider && item.type == index_1.EComponent.SLIDER) { // 滑动块
|
||||
let data = item.data;
|
||||
component.min = +data.min || 0;
|
||||
component.max = +data.max || 100;
|
||||
component.value = +value || 0;
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyEditor.Component.NumericInput && item.type == index_1.EComponent.NUMBERINPUT) { // 数字输入框
|
||||
let data = item.data;
|
||||
component.min = +data.min || 0;
|
||||
component.max = +data.max || 100;
|
||||
component.step = +data.step || 0;
|
||||
component.value = +value || 0;
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GButton && item.type == index_1.EComponent.SWITCH) { // 切换器
|
||||
component.selected = Boolean(value);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GButton && item.type == index_1.EComponent.RADIOBOX) { // 单选框
|
||||
let data = item.data;
|
||||
component.GetChildAt(0).text = data.items[0];
|
||||
component.GetChildAt(1).text = data.items[1];
|
||||
component.selected = Boolean(value);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 读取当前对象在 TweenSettings 中的外部配置 key
|
||||
*/
|
||||
getExternalTweenKey() {
|
||||
try {
|
||||
let sels = App.activeDoc.inspectingTargets;
|
||||
// puerts 映射的 IList$1 没有 Count 属性,这里直接尝试取第 0 项
|
||||
if (!sels)
|
||||
return null;
|
||||
let obj = sels.get_Item(0);
|
||||
let activeDoc = App.activeDoc;
|
||||
let packageName = activeDoc.packageItem.owner.name;
|
||||
let docUrl = activeDoc.docURL;
|
||||
let objId = obj.id;
|
||||
if ((!objId || objId === "") && this.parent) {
|
||||
objId = "__root__";
|
||||
}
|
||||
let data = TweenSettings_1.default.get(packageName, docUrl, objId);
|
||||
if (data && data.useable == 1 && data.key) {
|
||||
return data.key;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.error('读取 TweenSettings 外部配置失败', e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
getListItemVal() {
|
||||
for (let i = 0; i < this.list.numChildren; i++) {
|
||||
let item = this.list.GetChildAt(i);
|
||||
let component = item.GetChild("component");
|
||||
let value = component.title;
|
||||
if (component instanceof csharp_1.FairyEditor.Component.ColorInput) {
|
||||
value = csharp_1.FairyEditor.ColorUtil.ToHexString(component.colorValue);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyGUI.GComboBox) {
|
||||
// value = component.selectedIndex;
|
||||
value = component.values.get_Item(component.selectedIndex);
|
||||
}
|
||||
else if (component instanceof csharp_1.FairyEditor.Component.NumericInput) {
|
||||
value = component.value;
|
||||
}
|
||||
else if (this.components[i].type == index_1.EComponent.SWITCH) {
|
||||
value = component.selected;
|
||||
}
|
||||
else if (this.components[i].type == index_1.EComponent.RADIOBOX) {
|
||||
value = component.selected ? 1 : 0;
|
||||
}
|
||||
else if (this.components[i].type == index_1.EComponent.SLIDER) {
|
||||
value = component.value;
|
||||
}
|
||||
let key = this.components[i].key;
|
||||
if (this.customDataObj) {
|
||||
this.customDataObj[key] = value;
|
||||
}
|
||||
}
|
||||
return JSON.stringify(this.customDataObj) || "";
|
||||
}
|
||||
getValueByName(name) {
|
||||
// let value = "";
|
||||
// if (this.customDataObj?.[name]) {
|
||||
// value = this.customDataObj[name];
|
||||
// }
|
||||
// return value;
|
||||
return this.customDataObj[name];
|
||||
}
|
||||
setCustomData() {
|
||||
let propName = this.parent ? "remark" : "customData";
|
||||
let data = this.getListItemVal();
|
||||
App.activeDoc.inspectingTarget.docElement.SetProperty(propName, data);
|
||||
}
|
||||
}
|
||||
exports.CustomAttributer = CustomAttributer;
|
||||
let isCharacterMatch = (s, p) => {
|
||||
let dp = [];
|
||||
for (let i = 0; i <= s.length; i++) {
|
||||
let child = [];
|
||||
for (let j = 0; j <= p.length; j++) {
|
||||
child.push(false);
|
||||
}
|
||||
dp.push(child);
|
||||
}
|
||||
dp[s.length][p.length] = true;
|
||||
for (let i = p.length - 1; i >= 0; i--) {
|
||||
if (p[i] != "*")
|
||||
break;
|
||||
else
|
||||
dp[s.length][i] = true;
|
||||
}
|
||||
for (let i = s.length - 1; i >= 0; i--) {
|
||||
for (let j = p.length - 1; j >= 0; j--) {
|
||||
if (s[i] == p[j] || p[j] == "?") {
|
||||
dp[i][j] = dp[i + 1][j + 1];
|
||||
}
|
||||
else if (p[j] == "*") {
|
||||
dp[i][j] = dp[i + 1][j] || dp[i][j + 1];
|
||||
}
|
||||
else {
|
||||
dp[i][j] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dp[0][0];
|
||||
};
|
||||
let isRegMatch = (source, pattern) => {
|
||||
const patt = new RegExp(pattern);
|
||||
return patt.test(source);
|
||||
};
|
||||
let isMatch = (source, pattern) => {
|
||||
if (pattern.includes("*") || pattern.includes("?")) {
|
||||
return isCharacterMatch(source, pattern);
|
||||
}
|
||||
else if (pattern.includes("/")) {
|
||||
return isRegMatch(source, pattern);
|
||||
}
|
||||
else {
|
||||
return source.includes(pattern);
|
||||
}
|
||||
};
|
||||
let getComponent = (componentType) => {
|
||||
let component;
|
||||
switch (componentType) {
|
||||
case index_1.EComponent.TEXTINPUT:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.TEXTINPUT).asCom;
|
||||
break;
|
||||
case index_1.EComponent.TEXTAREA:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.TEXTAREA).asCom;
|
||||
break;
|
||||
case index_1.EComponent.COMBOBOX:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.COMBOBOX).asCom;
|
||||
break;
|
||||
case index_1.EComponent.COLORINPUT:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.COLORINPUT).asCom;
|
||||
break;
|
||||
case index_1.EComponent.NUMBERINPUT:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.NUMBERINPUT).asCom;
|
||||
break;
|
||||
case index_1.EComponent.RESOURCEINPUT:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.RESOURCEINPUT).asCom;
|
||||
break;
|
||||
case index_1.EComponent.SLIDER:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.SLIDER).asCom;
|
||||
break;
|
||||
case index_1.EComponent.RADIOBOX:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.RADIOBOX).asCom;
|
||||
break;
|
||||
case index_1.EComponent.SWITCH:
|
||||
component = csharp_1.FairyGUI.UIPackage.CreateObject("TweenAttributer", index_1.EComponent.SWITCH).asCom;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return component;
|
||||
};
|
||||