diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs
index c3ca2042..8a9773a5 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs
@@ -277,7 +277,7 @@ namespace GameLogic
item.SetSelected(false);
}
- item = GetItem(m_selectIndex) as IListSelectItem;
+ item = GetItem(selectIndex) as IListSelectItem;
if (item != null)
{
item.SetSelected(true);
diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs
index 423b9de7..381dd406 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using TEngine;
using UnityEngine;
namespace GameLogic
@@ -17,7 +18,7 @@ namespace GameLogic
///
/// Item字典
///
- private Dictionary m_itemCache = new Dictionary();
+ private GameFrameworkDictionary m_itemCache = new GameFrameworkDictionary();
///
/// 计算偏差后的ItemList
@@ -163,9 +164,19 @@ namespace GameLogic
m_items.Clear();
for (int i = 0; i < m_itemCache.Count; i++)
{
- m_items.Add(m_itemCache[i]);
+ m_items.Add(m_itemCache.GetValueByIndex(i));
}
return m_items;
}
+
+ ///
+ /// 获取Item。
+ ///
+ /// 索引。
+ /// TItem。
+ public TItem GetItemByIndex(int index)
+ {
+ return m_itemCache.GetValueByIndex(index);
+ }
}
}
diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs
index e2c1f3ae..c20af44d 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs
@@ -8,7 +8,7 @@ namespace GameLogic
{
public LoopListView LoopRectView { private set; get; }
- private Dictionary m_itemCache = new Dictionary();
+ private GameFrameworkDictionary m_itemCache = new GameFrameworkDictionary();
public override void BindMemberProperty()
{
@@ -71,9 +71,8 @@ namespace GameLogic
List list = new List();
for (int i = 0; i < m_itemCache.Count; i++)
{
- list.Add(m_itemCache[i]);
+ list.Add(m_itemCache.GetValueByIndex(i));
}
-
return list;
}
@@ -85,11 +84,11 @@ namespace GameLogic
///
/// 获取Item。
///
- ///
- ///
+ /// 索引。
+ /// TItem。
public T GetItemByIndex(int index)
{
- return m_itemCache[index];
+ return m_itemCache.GetValueByIndex(index);
}
}
}
\ No newline at end of file
diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs
index a3e29c34..db7bea3e 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using TEngine;
using UnityEngine;
namespace GameLogic
@@ -16,8 +17,9 @@ namespace GameLogic
///
/// Item字典
+ /// Key => GameObjectHashCode | Value => TItem.
///
- private Dictionary m_itemCache = new Dictionary();
+ private GameFrameworkDictionary m_itemCache = new GameFrameworkDictionary();
///
/// 计算偏差后的ItemList
@@ -159,7 +161,10 @@ namespace GameLogic
public List GetItemList()
{
m_items.Clear();
- m_items.AddRange(m_itemCache.Values);
+ for (int i = 0; i < m_itemCache.Count; i++)
+ {
+ m_items.Add(m_itemCache.GetValueByIndex(i));
+ }
return m_items;
}
@@ -171,5 +176,15 @@ namespace GameLogic
{
return LoopRectView.GetItemStartIndex();
}
+
+ ///
+ /// 获取Item。
+ ///
+ /// 索引。
+ /// TItem。
+ public TItem GetItemByIndex(int index)
+ {
+ return m_itemCache.GetValueByIndex(index);
+ }
}
}
diff --git a/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadTip.prefab b/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadTip.prefab
index a13dd843..8f20b9ba 100644
--- a/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadTip.prefab
+++ b/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadTip.prefab
@@ -812,7 +812,6 @@ GameObject:
- component: {fileID: 4070374929253206932}
- component: {fileID: 4872533144352319846}
- component: {fileID: 3352775805385032060}
- - component: {fileID: 3859027068210555860}
m_Layer: 5
m_Name: UILoadTip
m_TagString: Untagged
@@ -880,31 +879,6 @@ MonoBehaviour:
m_BlockingMask:
serializedVersion: 2
m_Bits: 55
---- !u!114 &3859027068210555860
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 7666412045263395013}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: bcd11033283847ee8f7c71eedd9a4771, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- elements:
- m_keys:
- - m_btnUpdate
- - m_btnIgnore
- - m_textInfo
- - m_textTittle
- - m_btnPackage
- m_values:
- - {fileID: 2745714441875214452}
- - {fileID: 467775921333773033}
- - {fileID: 3862717357071106210}
- - {fileID: 9127528276671758327}
- - {fileID: 1387175525974173601}
--- !u!1 &8012535748721374403
GameObject:
m_ObjectHideFlags: 0
diff --git a/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadUpdate.prefab b/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadUpdate.prefab
index 0a9ac199..75dd2abf 100644
--- a/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadUpdate.prefab
+++ b/UnityProject/Assets/GameScripts/Main/Launcher/Resources/AssetLoad/UILoadUpdate.prefab
@@ -773,7 +773,6 @@ GameObject:
- component: {fileID: 1633508802563447727}
- component: {fileID: 5827342734203288403}
- component: {fileID: 4835021223508371640}
- - component: {fileID: 903919243524269039}
m_Layer: 5
m_Name: UILoadUpdate
m_TagString: Untagged
@@ -843,33 +842,6 @@ MonoBehaviour:
m_BlockingMask:
serializedVersion: 2
m_Bits: 55
---- !u!114 &903919243524269039
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 9130266365217219149}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: bcd11033283847ee8f7c71eedd9a4771, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- elements:
- m_keys:
- - m_imgBackGround
- - m_scrollbarProgress
- - m_textDesc
- - m_btnClear
- - m_textAppid
- - m_textResid
- m_values:
- - {fileID: 4652061626151979521}
- - {fileID: 2347891492826839465}
- - {fileID: 8666815445422661327}
- - {fileID: 4232232858152633415}
- - {fileID: 3038352660368000718}
- - {fileID: 8143980099109665604}
--- !u!1 &9157096376857424144
GameObject:
m_ObjectHideFlags: 0
diff --git a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs
index 28df109c..a5249dc8 100644
--- a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs
+++ b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs
@@ -20,26 +20,22 @@ namespace GameMain
public MessageShowType ShowType = MessageShowType.None;
#region 脚本工具生成的代码
-
private Button m_btnPackage;
private Text m_textTittle;
private Text m_textInfo;
private Button m_btnIgnore;
private Button m_btnUpdate;
-
public override void ScriptGenerator()
{
- CheckUIElement();
- m_btnPackage = FChild