本文整理汇总了C#中UITable类的典型用法代码示例。如果您正苦于以下问题:C# UITable类的具体用法?C# UITable怎么用?C# UITable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UITable类属于命名空间,在下文中一共展示了UITable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init()
{
this.ResetTimer = base.transform.Find("time1").GetComponent<UILabel>();
Transform transform = base.transform.Find("RewardBK");
this.Title = transform.transform.Find("Title").GetComponent<UILabel>();
this.Reward = transform.transform.Find("Reward");
this.Price = transform.transform.Find("Price").GetComponent<UILabel>();
this.OffPrice = transform.transform.Find("OffPrice").GetComponent<UILabel>();
this.BuyVIPLevel = transform.transform.Find("BuyVIPLevel").GetComponent<UILabel>();
this.CurVipLevel = transform.transform.Find("CurVipLevel").GetComponent<UILabel>();
this.ToBuy = transform.transform.Find("GoBtn");
this.Buyed = transform.transform.Find("Buy");
UIEventListener expr_105 = UIEventListener.Get(this.ToBuy.gameObject);
expr_105.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_105.onClick, new UIEventListener.VoidDelegate(this.OnBuyVipWeekReward));
this.rewardScrollView = base.transform.Find("rewardPanel").GetComponent<UIScrollView>();
this.rewardTable = this.rewardScrollView.transform.Find("rewardContents").GetComponent<UITable>();
for (int i = 0; i <= 15; i++)
{
this.VIPLevel[i] = this.rewardTable.transform.Find(string.Format("{0:D2}", i)).GetComponent<UISprite>();
UIEventListener expr_1A7 = UIEventListener.Get(this.VIPLevel[i].gameObject);
expr_1A7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_1A7.onClick, new UIEventListener.VoidDelegate(this.OnVIPLevelClicked));
}
this.mTabBtnScrollBar = base.transform.Find("scrollBar").GetComponent<UIScrollBar>();
EventDelegate.Add(this.mTabBtnScrollBar.onChange, new EventDelegate.Callback(this.OnScrollBarValueChange));
this.leftBtn = base.transform.Find("LeftBtn").gameObject;
this.rightBtn = base.transform.Find("RightBtn").gameObject;
UIEventListener expr_24D = UIEventListener.Get(this.leftBtn);
expr_24D.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_24D.onClick, new UIEventListener.VoidDelegate(this.OnLeftBtnClicked));
UIEventListener expr_279 = UIEventListener.Get(this.rightBtn);
expr_279.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_279.onClick, new UIEventListener.VoidDelegate(this.OnRightBtnClicked));
this.RefreshCurLevelToggle();
this.RefreshCurLevelInfo();
}
示例2: OnUpdate
override protected void OnUpdate (float factor, bool isFinished)
{
Vector3 result = from * (1f - factor) + to * factor;
if (result.x < 0.00001f && result.x > -0.00001f)
{
result = new Vector3(0.001f, result.y, result.z);
Mogo.Util.LoggerHelper.Debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MaiFeo Debug when divid zero");
}
if (result.y < 0.00001f && result.y > -0.00001f)
{
result = new Vector3(result.x, 0.001f, result.z);
Mogo.Util.LoggerHelper.Debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MaiFeo Debug when divid zero");
}
if (result.z < 0.00001f && result.z > -0.00001f)
{
result = new Vector3(result.x, result.y, 0.001f);
Mogo.Util.LoggerHelper.Debug("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MaiFeo Debug when divid zero");
}
cachedTransform.localScale = result;
if (updateTable)
{
if (mTable == null)
{
mTable = NGUITools.FindInParents<UITable>(gameObject);
if (mTable == null) { updateTable = false; return; }
}
mTable.repositionNow = true;
}
}
示例3: Awake
private void Awake()
{
this.rechargeScrollView = base.transform.FindChild("contentsPanel").GetComponent<UIScrollView>();
this.rechargeTable = this.rechargeScrollView.transform.FindChild("infoContents").gameObject.AddComponent<UITable>();
this.rechargeTable.columns = 3;
this.rechargeTable.direction = UITable.Direction.Down;
this.rechargeTable.sorting = UITable.Sorting.None;
this.rechargeTable.hideInactive = true;
this.rechargeTable.keepWithinPanel = true;
this.rechargeTable.padding = new Vector2(6f, 0f);
int privilege = Globals.Instance.CliSession.Privilege;
foreach (PayInfo current in Globals.Instance.AttDB.PayDict.Values)
{
if (!current.Test || privilege > 0)
{
if (current.Type == 0)
{
UIRechargeItem uIRechargeItem = UIRechargeItem.CreateItem(this.rechargeTable.transform, this.rechargeScrollView);
uIRechargeItem.Init(current);
}
else
{
UIMonthCard uIMonthCard = UIMonthCard.CreateItem(this.rechargeTable.transform, this.rechargeScrollView);
uIMonthCard.Init(current);
}
}
}
}
示例4: Awake
public override void Awake()
{
base.Awake();
_uiTable = GetComponent<UITable>();
_uiGrid = GetComponent<UIGrid>();
_itemTemplate = gameObject.GetComponent<NguiListItemTemplate>();
}
示例5: Awake
protected override void Awake() {
base.Awake();
Arguments.ValidateNotNull(rowPrefab);
_table = gameObject.GetSafeFirstMonoBehaviourInChildren<UITable>();
_table.sorting = UITable.Sorting.Custom;
_cmdLookup = new Dictionary<GameObject, IFleetCmdItem>();
}
示例6: CreateObjects
private void CreateObjects()
{
this.btnTab = base.transform.Find("tab").GetComponent<UIToggle>();
EventDelegate.Add(this.btnTab.onChange, new EventDelegate.Callback(this.OnTabCheckChanged));
this.txtTab = this.btnTab.transform.Find("tabTxt").GetComponent<UILabel>();
this.txtTab2 = this.btnTab.transform.Find("tabCheck/tabTxt").GetComponent<UILabel>();
Transform transform = base.transform.Find("tabPanel");
this.topBtn = GameUITools.RegisterClickEvent("TopBtn", new UIEventListener.VoidDelegate(this.OnTopBtnClick), transform.gameObject);
this.topBtn.SetActive(false);
this.bottomBtn = GameUITools.RegisterClickEvent("BottomBtn", new UIEventListener.VoidDelegate(this.OnBottomBtnClick), transform.gameObject);
this.bottomBtn.SetActive(false);
this.btnsTable = transform.Find("tabBtnsPanel/tabBtns").GetComponent<UITable>();
this.scrollBar = transform.Find("scrollBar").GetComponent<UIScrollBar>();
EventDelegate.Add(this.scrollBar.onChange, new EventDelegate.Callback(this.OnScrollBarValueChange));
this.txtTab.text = this.initData.strName;
this.txtTab2.text = this.initData.strName;
if (this.initData.strName.Length > 2)
{
this.txtTab.spacingX = 5;
this.txtTab2.spacingX = 5;
}
this.infoTable = transform.Find("bg/infoPanel/infoContents").GetComponent<UITable>();
this.infoTitle = this.infoTable.transform.Find("Label0").GetComponent<UILabel>();
this.infoTitle.spaceIsNewLine = false;
this.infoContent = this.infoTable.transform.Find("Label1").GetComponent<UILabel>();
this.infoContent.spaceIsNewLine = false;
UIEventListener expr_206 = UIEventListener.Get(this.infoContent.gameObject);
expr_206.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_206.onClick, new UIEventListener.VoidDelegate(this.OnInfoContentClick));
}
示例7: Awake
protected override void Awake() {
base.Awake();
Arguments.ValidateNotNull(rowPrefab);
_table = gameObject.GetSafeFirstMonoBehaviourInChildren<UITable>();
_table.sorting = UITable.Sorting.Custom;
_systemLookup = new Dictionary<GameObject, ISystemItem>();
_doneButtonGo = gameObject.GetComponentInChildren<InputModeControlButton>().gameObject;
}
示例8: CreateObjects
private void CreateObjects()
{
Transform transform = base.transform.Find("commonArea");
this.mCommonTable = transform.Find("commonLayer/commonContents").GetComponent<UITable>();
this.mGUICommonItem = this.mCommonTable.transform.Find("commonLabelContents").gameObject.AddComponent<GUICommonItem>();
this.mGUICommonItem.gameObject.SetActive(false);
UIEventListener expr_68 = UIEventListener.Get(transform.gameObject);
expr_68.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_68.onClick, new UIEventListener.VoidDelegate(this.OnBgClick));
}
示例9: Init
public void Init()
{
GameUITools.RegisterClickEvent("FadeBG", new UIEventListener.VoidDelegate(this.OnCloseClick), base.gameObject);
this.mWinBG = GameUITools.FindGameObject("winBG", base.gameObject);
this.mCloseBtn = GameUITools.RegisterClickEvent("closeBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), this.mWinBG);
this.mFinishBtn = GameUITools.RegisterClickEvent("finishBtn", new UIEventListener.VoidDelegate(this.OnFinishClick), this.mWinBG);
this.mPanel = GameUITools.FindGameObject("panel", this.mWinBG).GetComponent<UIPanel>();
this.mTable = GameUITools.FindGameObject("contents", this.mPanel.gameObject).GetComponent<UITable>();
}
示例10: CreateObjects
private void CreateObjects()
{
this.mBG = GameUITools.FindGameObject("BG", base.gameObject);
GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), this.mBG);
this.mContents = GameUITools.FindGameObject("GetRewardItems/Panel/Contents", this.mBG).GetComponent<UITable>();
GameUITools.RegisterClickEvent("StartBtn", new UIEventListener.VoidDelegate(this.OnStartBtnClick), this.mBG);
this.mTimeBtns.Add(GameUITools.FindGameObject("0", this.mBG).AddComponent<GUICostumePartyStartPopUp.TimeBtn>().Init(0, new GUICostumePartyStartPopUp.TimeBtn.ChangeCallBack(this.RefreshItem)));
this.mTimeBtns.Add(GameUITools.FindGameObject("1", this.mBG).AddComponent<GUICostumePartyStartPopUp.TimeBtn>().Init(1, new GUICostumePartyStartPopUp.TimeBtn.ChangeCallBack(this.RefreshItem)));
this.mTimeBtns.Add(GameUITools.FindGameObject("2", this.mBG).AddComponent<GUICostumePartyStartPopUp.TimeBtn>().Init(2, new GUICostumePartyStartPopUp.TimeBtn.ChangeCallBack(this.RefreshItem)));
}
示例11: Create
public static LobbyRowType2 Create(DataLobby data, UITable parent)
{
GameObject go = GameObject.Instantiate(Resources.Load("Prefabs/Lobby/LobbyRowType2")) as GameObject;
go.transform.parent = parent.transform;
go.transform.localPosition = Vector3.zero;
go.transform.localScale = Vector3.one;
go.name = data.roomId + " - " + data.roomName;
LobbyRowType2 item = go.GetComponent<LobbyRowType2>();
item.StartCoroutine(item.setData(data));
return item;
}
示例12: Awake
public override void Awake()
{
base.Awake();
_groupNumber = Random.Range(1, 10000);
if (_usedGroupNumbers.Contains(_groupNumber))
_groupNumber++;
_usedGroupNumbers.Add(_groupNumber);
_uiTable = GetComponent<UITable>();
_uiGrid = GetComponent<UIGrid>();
_itemTemplate = gameObject.GetComponent<NguiListItemTemplate>();
scrollRect = transform.parent.GetComponent<ScrollRect>();
}
示例13: Create
public static LobbyRowType1 Create(DataLobby data, UITable parent, Action<DataLobby> callBack)
{
GameObject go = GameObject.Instantiate(Resources.Load("Prefabs/Lobby/LobbyRowType1")) as GameObject;
go.transform.parent = parent.transform;
go.transform.localPosition = Vector3.zero;
go.transform.localScale = Vector3.one;
go.GetComponent<UIDragScrollView>().scrollView = parent.GetComponentInParent<UIScrollView>();
go.name = "#" + data.roomId;
LobbyRowType1 item = go.GetComponent<LobbyRowType1>();
item.setData(data);
item.action = callBack;
return item;
}
示例14: OnUpdate
protected override void OnUpdate (float factor, bool isFinished)
{
cachedTransform.localScale = from * (1f - factor) + to * factor;
if (updateTable)
{
if (mTable == null)
{
mTable = NGUITools.FindInParents<UITable>(gameObject);
if (mTable == null) { updateTable = false; return; }
}
mTable.repositionNow = true;
}
}
示例15: DestroyRows
public void DestroyRows()
{
if(tableEvidencias == null)
tableEvidencias = GetComponent<UITable>();
foreach (var item in tableEvidencias.GetChildList()) {
Destroy (item.gameObject);
}
if(evidencias != null)
evidencias.Clear();
else
Debug.Log("null evidencias");
}