This commit is contained in:
2026-02-12 22:15:15 +08:00
parent 47a5cff08b
commit 502c6efedc
58 changed files with 2114 additions and 708 deletions

View File

@@ -0,0 +1,27 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class VideoEditorItem
{
public const string URL = "ui://hxr7rc7pxjb91hr";
public GButton BtnEdit;
public GButton BtnDelete;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
BtnEdit = (GButton)GetChild("BtnEdit");
BtnDelete = (GButton)GetChild("BtnDelete");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

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

View File

@@ -0,0 +1,27 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class VideoEditorItem : GButton
{
private VideoRetData _video;
private void OnInited()
{
BtnDelete.onClick.Set(OnBtnDelete);
}
public void InitData(VideoRetData videoRetData)
{
_video = videoRetData;
}
private void OnBtnDelete()
{
}
}
}

View File

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

View File

@@ -0,0 +1,44 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
using System.Collections.Generic;
namespace NBF
{
/// <summary> </summary>
public partial class VideoEditorPanel
{
public GObject this[string aKey] => ContentPane.GetChild(aKey);
public override string UIPackName => "Main";
public override string UIResName => "VideoEditorPanel";
[AutoFind(Name = "page")]
public Controller page;
[AutoFind(Name = "List")]
public VideoListPage List;
[AutoFind(Name = "Nav")]
public GLabel Nav;
[AutoFind(Name = "BtnStatistics")]
public GButton BtnStatistics;
[AutoFind(Name = "BtnVideoList")]
public GButton BtnVideoList;
[AutoFind(Name = "BtnAdd")]
public GButton BtnAdd;
[AutoFind(Name = "BtnDevice")]
public GButton BtnDevice;
[AutoFind(Name = "BtnAdmin")]
public GButton BtnAdmin;
[AutoFind(Name = "MenuGroup")]
public GGroup MenuGroup;
public override string[] GetDependPackages(){ return new string[] {}; }
public static void Show(object param = null){ UI.Inst.OpenUI<VideoEditorPanel>(param); }
public static void Hide(){ UI.Inst.HideUI<VideoEditorPanel>(); }
public static void Del(){ UI.Inst.DestroyUI<VideoEditorPanel>(); }
}
}

View File

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

View File

@@ -0,0 +1,11 @@
// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using UnityEngine;
using NBC;
namespace NBF
{
public partial class VideoEditorPanel : UIPanel
{
}
}

View File

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

View File

@@ -0,0 +1,25 @@
/**本脚本为自动生成每次生成会覆盖请勿手动修改生成插件文档及项目地址https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
using FairyGUI;
using FairyGUI.Utils;
using NBC;
namespace NBF
{
public partial class VideoListPage
{
public const string URL = "ui://hxr7rc7pxjb91hz";
public GList List;
public override void ConstructFromXML(XML xml)
{
base.ConstructFromXML(xml);
List = (GList)GetChild("List");
OnInited();
UILanguage.TrySetComponentLanguage(this);
}
}
}

View File

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

View File

@@ -0,0 +1,97 @@
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class VideoListPage : GComponent
{
public const int PageSize = 20;
private readonly List<VideoRetData> Videos = new List<VideoRetData>();
private GComponent _footer;
private Controller _controller;
public int Page = 0;
private void OnInited()
{
List.itemRenderer = RenderListItem1;
List.SetVirtual();
List.scrollPane.onPullUpRelease.Add(OnPullUpToRefresh);
_footer = (GComponent)List.scrollPane.footer;
_controller = _footer.GetController("style");
}
private void SetList()
{
List.numItems = Videos.Count;
}
void RenderListItem1(int index, GObject obj)
{
if (obj is VideoEditorItem item)
{
}
// GButton item = obj.asButton;
// item.title = "Item " + (_list1.numItems - index - 1);
}
void OnPullUpToRefresh()
{
_controller.selectedIndex = 1;
List.scrollPane.LockFooter(_footer.sourceHeight);
GetList(Page + 1);
// //Simulate a async resquest
// Timers.inst.Add(2, 1, (object param) =>
// {
// List.numItems += 5;
//
// //Refresh completed
// _controller.selectedIndex = 0;
// List.scrollPane.LockFooter(0);
// });
}
#region
private void GetList(int page)
{
if (page < 1) return;
var dic = new Dictionary<string, string>
{
{ "page", page.ToString() },
{ "PageSize", PageSize.ToString() }
};
Net.Instance.Send("/api/list", dic, ParseVideo);
}
private void ParseVideo(HttpResult httpResult)
{
_controller.selectedIndex = 0;
List.scrollPane.LockFooter(0);
if (httpResult.Code == 0)
{
var retData = httpResult.Data.ToObject<PageListData<VideoRetData>>();
if (retData != null)
{
if (retData.List.Count > 0)
{
Videos.AddRange(retData.List);
}
Page = retData.Page;
}
}
SetList();
}
#endregion
}
}

View File

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