protected virtual void OnClickEnhanceItem(MyNGUIEnhanceItem _nItem = null, MyUGUIEnhanceItem _Item = null) { EnhanceScrollView ESV = _nItem.GetComponentInParent <EnhanceScrollView>(); ESV.setFishActivefalse(); ESV.SetHorizontalTargetItemIndex(this); }
void Awake() { instance = this;//singleTon }
void Awake() { instance = this; }
public void SetScrollView(EnhanceScrollView view) { enhanceScrollView = view; }
void Awake() { instance = this; }
public void SetData(float _f_posX, EnhanceScrollView _scrollView) { f_posX = _f_posX; scrollView = _scrollView; }
public void SetScrollView(EnhanceScrollView view) { enhanceScrollView = view; }
protected RectTransform GetHotTrans() { if (!m_currentItem.hasHotArea) { return(null); } //refresh hot area Window window = Window.GetOpenedWindow(m_currentItem.hotWindow); if (window == null) { return(null); } Transform t = window.transform; if (m_currentItem.hasProtoArea) { var protoId = Module_Player.instance?.proto; string propArea = m_currentItem.GetProtoArea(protoId ?? 0); t = Util.FindChild(t, propArea); } foreach (var item in m_currentItem.hotAreaData.hotArea) { t = Util.FindChild(t, item); if (t == null) { break; } } if (!t || t == window.transform) { Logger.LogError("window {0} haven't a child with path: {1},please check out guide_config with id {2}", window.name, m_currentItem.hotAreaData.hotArea.ToXml(), moduleGuide.currentGuide.ID); return(null); } m_lastHotScroll = t.GetComponent <ScrollRect>(); m_lastScrollView = t.GetComponent <ScrollView>(); m_enhanceScroll = t.GetComponent <EnhanceScrollView>(); m_createObject = t.GetComponent <DynamicallyCreateObject>(); //m_loopScrollRect = t.GetComponent<LoopScrollRect>(); if (m_lastHotScroll) { return(GetItemFromScroll(m_lastHotScroll.content)); } else if (m_lastScrollView) { return(GetItemFromScroll(m_lastScrollView.content)); } else if (m_enhanceScroll) { return(GetEnhanceScrollItem()); } else if (m_createObject) { return(GetItemFromDyObject(m_createObject.transform as RectTransform)); } else if (INCLUDE_INACTIVE_HOTAREA.Contains(t.name)) { BaseRestrain b = t.GetComponentInChildren <BaseRestrain>(true); m_updateCheckScrollItem = b == null; return(b?.rectTransform); } else { return(t as RectTransform); } }
protected void ClearScrollCache() { m_lastHotScroll = null; m_lastScrollView = null; m_enhanceScroll = null; }
public void Init(EnhanceScrollView ctrl) { m_ScrollViewCtrl = ctrl; }
void Awake() { GetInstance = this; }