| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- namespace SmartBow
- {
- public class SocialView : MonoBehaviour, MenuBackInterface
- {
- [SerializeField] Transform panelLeftContent;
- void Start()
- {
- PersistenHandler.ins?.menuBackCtr.views.Add(this);
- ShowFriendList(true);
- }
- void OnDestroy()
- {
- PersistenHandler.ins?.menuBackCtr.views.Remove(this);
- }
- public bool OnMenuBack()
- {
- ViewManager2.HideView(ViewManager2.Path_SettingsView);
- return true;
- }
- public void OnClick_PanelLeftItem(Transform target)
- {
- foreach (Transform item in panelLeftContent)
- {
- if (item == target)
- {
- item.Find("Text").GetComponent<Text>().fontStyle = FontStyle.Bold;
- item.Find("Text").GetComponent<Text>().color = Color.white;
- bool oldActive = item.Find("LightMask").gameObject.activeSelf;
- item.Find("LightMask").gameObject.SetActive(true);
- if (!oldActive)
- {
- AudioMgr.ins.PlayBtn();
- ShowBox(item.name);
- }
- }
- else
- {
- item.Find("Text").GetComponent<Text>().fontStyle = FontStyle.Normal;
- item.Find("Text").GetComponent<Text>().color = Color.gray;
- item.Find("LightMask").gameObject.SetActive(false);
- }
- }
- }
- void ShowBox(string itemName)
- {
-
- }
- void ShowFriendList(bool show)
- {
- }
- public void ShowModalConfirmDeleteFriend(bool show)
- {
- transform.Find("ModalConfirmDeleteFriend").gameObject.SetActive(show);
- }
- public void OnClick_Back()
- {
- AudioMgr.ins.PlayBtn();
-
- }
- }
- }
|