libraryUI迭代
This commit is contained in:
parent
f8ce4c49ba
commit
6651f28c56
@ -136937,6 +136937,10 @@ MonoBehaviour:
|
||||
m_Unicode: 10
|
||||
m_GlyphIndex: 1
|
||||
m_Scale: 1
|
||||
- m_ElementType: 1
|
||||
m_Unicode: 13
|
||||
m_GlyphIndex: 1
|
||||
m_Scale: 1
|
||||
m_AtlasTextures:
|
||||
- {fileID: 8051654401015415506}
|
||||
m_AtlasTextureIndex: 0
|
||||
|
||||
@ -2357,7 +2357,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &20834529
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -42362,9 +42362,9 @@ RectTransform:
|
||||
m_Father: {fileID: 2013676003}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -17, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &340853723
|
||||
MonoBehaviour:
|
||||
@ -122510,9 +122510,9 @@ RectTransform:
|
||||
- {fileID: 1114548577}
|
||||
m_Father: {fileID: 2059412261}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 250, y: -213.6052}
|
||||
m_SizeDelta: {x: 500, y: 427.2104}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &947884485
|
||||
@ -141498,7 +141498,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1082107953
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -186156,9 +186156,9 @@ RectTransform:
|
||||
- {fileID: 331884266}
|
||||
m_Father: {fileID: 1854669646}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 253.20705, y: -129.3694}
|
||||
m_SizeDelta: {x: 506.4141, y: 208.7388}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1433167224
|
||||
@ -191474,7 +191474,7 @@ RectTransform:
|
||||
m_Father: {fileID: 1700871003}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@ -240427,7 +240427,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 233.7388}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &1854669647
|
||||
MonoBehaviour:
|
||||
@ -256531,9 +256531,9 @@ RectTransform:
|
||||
- {fileID: 1081090070}
|
||||
m_Father: {fileID: 2059412261}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 250, y: -667.24}
|
||||
m_SizeDelta: {x: 500, y: 480.0592}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1982802041
|
||||
@ -266428,7 +266428,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 907.2696}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2059412262
|
||||
MonoBehaviour:
|
||||
|
||||
@ -3,11 +3,13 @@ using Logic;
|
||||
using RuntimeData;
|
||||
using UnityEngine.UI;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEditor;
|
||||
|
||||
public class BottomBarUI
|
||||
{
|
||||
public GameObject ROBottomBarUI;
|
||||
public Button SettingsButton;
|
||||
public Button QuitButton;
|
||||
public Button GameStatsButton;
|
||||
public Button TechTreeButton;
|
||||
public Button NextTurnButton;
|
||||
@ -33,12 +35,14 @@ public class BottomBarUI
|
||||
ROBottomBarUI = UIManager.Instance.ROUIManager.transform.Find("BottomBarPanel").gameObject;
|
||||
|
||||
SettingsButton = ROBottomBarUI.transform.Find("SettingsButton").GetComponent<Button>();
|
||||
QuitButton = ROBottomBarUI.transform.Find("QuitButton").GetComponent<Button>();
|
||||
GameStatsButton = ROBottomBarUI.transform.Find("GameStatsButton").GetComponent<Button>();
|
||||
TechTreeButton = ROBottomBarUI.transform.Find("TechTreeButton").GetComponent<Button>();
|
||||
NextTurnButton = ROBottomBarUI.transform.Find("NextTurnButton").GetComponent<Button>();
|
||||
MessageButton = ROBottomBarUI.transform.Find("MessageButton").GetComponent<Button>(); // ← 新增按钮获取
|
||||
|
||||
SettingsButton.onClick.AddListener(OnSettingsClicked);
|
||||
QuitButton.onClick.AddListener(OnQuitClicked);
|
||||
GameStatsButton.onClick.AddListener(OnRankingClicked);
|
||||
TechTreeButton.onClick.AddListener(OnTechTreeClicked);
|
||||
NextTurnButton.onClick.AddListener(OnNextTurnClicked);
|
||||
@ -102,6 +106,12 @@ public class BottomBarUI
|
||||
{
|
||||
UIManager.Instance.SettingUI.NeedShow = !UIManager.Instance.SettingUI.NeedShow;
|
||||
}
|
||||
|
||||
private void OnQuitClicked()
|
||||
{
|
||||
UIManager.Instance.GameUI.MainUI.NeedShow = true;
|
||||
_main.GameLogic.ChangeState(GameState.Menu);
|
||||
}
|
||||
|
||||
private void OnRankingClicked()
|
||||
{
|
||||
|
||||
@ -81,7 +81,7 @@ namespace UI.LibraryUI
|
||||
slotButton.onClick.AddListener(() =>
|
||||
{
|
||||
// 当按钮被点击时,调用 UpdateGiantInfoData 并传入对应的 GiantType
|
||||
GiantListItemOnClick(table,slot,giant);
|
||||
GiantListItemOnClick(slot,giant);
|
||||
});
|
||||
|
||||
//处理成就星星的显示
|
||||
@ -114,13 +114,13 @@ namespace UI.LibraryUI
|
||||
|
||||
}
|
||||
|
||||
public void GiantListItemOnClick(Transform table, Transform selected, GiantType giant)
|
||||
public void GiantListItemOnClick(Transform selected, GiantType giant)
|
||||
{
|
||||
//消除之前选中对象的红圈,换成当前这个
|
||||
SelectedListItem?.Find("TribeIconMask/Selected")?.gameObject.SetActive(false);
|
||||
selected.Find("TribeIconMask/Selected")?.gameObject.SetActive(true);
|
||||
SelectedListItem = selected;
|
||||
|
||||
GiantSelected = giant;
|
||||
|
||||
InfoPanel.GetComponent<AnimancerComponent>()?.Play(ResourceCache.Instance.AnimCache.UICommonPanelFadeOut);
|
||||
|
||||
|
||||
@ -29,11 +29,6 @@ public class SettingUI
|
||||
// 绑定按钮事件
|
||||
Transform settingList = ROSettingUI.transform.Find("SettingList");
|
||||
settingList.Find("ButtonRow/CloseButton").GetComponent<Button>().onClick.AddListener(() => { NeedShow = false; });
|
||||
settingList.Find("ButtonRow/ExitButton").GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
NeedShow = false;
|
||||
UIManager.Instance.GameUI.MainUI.NeedShow = true;
|
||||
});
|
||||
|
||||
// 获取语言按钮
|
||||
Transform row5 = settingList.Find("Row5");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user