public void OnCellItemDidClick(UICellItemBase item) { if (item.IsLock()) { return; } }
public void AddItem(UICellItemBase item) { if (listItem == null) { return; } listItem.Add(item); }
public void OnCellItemDidClick(UICellItemBase item) { if (item.IsLock()) { return; } tick = Common.GetCurrentTimeMs(); GotoGame(item.index); }
public override void OnClickItem(UICellItemBase item) { switch (item.tagValue) { case TAG_HOWTOPLAY: { } break; } }
public UICellItemBase GetItem(int idx) { if (listItem == null) { return(null); } UICellItemBase item = listItem[idx]; return(item); }
public void OnCellItemDidClick(UICellItemBase item) { ItemInfo info = listItem[item.index] as ItemInfo; string strAppUrl = info.url; if (Common.BlankString(strAppUrl)) { return; } Application.OpenURL(strAppUrl); }
public void OnCellItemDidClick(UICellItemBase item) { SystemLanguage lan = (SystemLanguage)item.tagValue; Language.main.SetLanguage(lan); PlayerPrefs.SetInt(AppString.STR_KEY_LANGUAGE, item.tagValue); if (this.callbackClose != null) { this.callbackClose(this); } OnClickBtnBack(); }
public void OnCellItemDidClick(UICellItemBase item) { if (Config.main.APP_FOR_KIDS) { ShowParentGate(item.index); } else { GotoAppUrl(item.index); } }
void LoadPrefab() { { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UICELLBASE); cellPrefab = obj.GetComponent <UICellBase>(); } { GameObject obj = PrefabCache.main.Load("AppCommon/Prefab/Home/UILearnProgressCellItem"); cellItemPrefab = obj.GetComponent <UICellItemBase>(); } }
void LoadPrefab() { { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UICELLBASE); cellPrefab = obj.GetComponent <UICellBase>(); } { GameObject obj = PrefabCache.main.Load("Common/Prefab/Comment/UICommentCellItem"); cellItemPrefab = obj.GetComponent <UICellItemBase>(); } }
void LoadPrefab() { { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UICELLBASE); cellPrefab = obj.GetComponent <UICellBase>(); } { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UILanguageCellItem); cellItemPrefab = obj.GetComponent <UICellItemBase>(); } }
public void OnCellItemDidClick(UICellItemBase item) { int idx = item.index; ItemInfo info = listItem[idx] as ItemInfo; if (callBackClick != null) { callBackClick(info); } AppVersion.main.DoComment(info); }
public void OnCellItemDidClick(UICellItemBase item) { if (item.IsLock()) { return; } LevelManager.main.placeLevel = item.index; AudioPlay.main.PlayBtnSound(); if (this.controller != null) { NaviViewController navi = this.controller.naviController; if (Common.appType == AppType.STICKER) { LevelManager.main.ParseGuanka(); navi.Push(GameViewController.main); } else { GuankaViewController guanka = GuankaViewController.main; guanka.indexPlace = item.index; navi.Push(guanka); } } ItemInfo info = listItem[item.index] as ItemInfo; if (info.isAd) { bool isAdVideo = true; int type = AdConfigParser.SOURCE_TYPE_VIDEO; string keyAdVideo = AdConfig.main.GetAdKey(Source.GDT, type); if (Common.isAndroid) { if ((Common.BlankString(keyAdVideo)) || (keyAdVideo == "0")) { //android 显示插屏广告 isAdVideo = false; } } if (isAdVideo) { AdKitCommon.main.ShowAdVideo(); } else { AdKitCommon.main.InitAdInsert(); AdKitCommon.main.ShowAdInsert(100); } } }
public void OnCellItemDidClick(UICellItemBase item) { int idx = item.index; ItemInfo info = listItem[idx] as ItemInfo; if (callBackClick != null) { callBackClick(info); } else { Share.main.ShareWeb(info.source, strShareTitle, strShareDetail, strShareUrl); } }
void LoadPrefab() { { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UICELLBASE); cellPrefab = obj.GetComponent <UICellBase>(); } { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_PLACE_CELL_ITEM_APP); if (obj == null) { obj = PrefabCache.main.Load(AppCommon.PREFAB_PLACE_CELL_ITEM_COMMON); } cellItemPrefab = obj.GetComponent <UICellItemBase>(); } }
void LoadPrefab() { { GameObject obj = PrefabCache.main.Load(AppCommon.PREFAB_UICELLBASE); cellPrefab = obj.GetComponent <UICellBase>(); } { GameObject obj = PrefabCache.main.Load("AppCommon/Prefab/MoreApp/UIMoreAppCellItem"); if (obj == null) { obj = PrefabCache.main.Load(AppCommon.PREFAB_MOREAPP_CELL_ITEM); } cellItemPrefab = obj.GetComponent <UICellItemBase>(); } }
//Will be called by the TableView when a cell needs to be created for display public TableViewCell GetCellForRowInTableView(TableView tableView, int row) { UICellBase cell = tableView.GetReusableCell(cellPrefab.reuseIdentifier) as UICellBase; if (cell == null) { cell = (UICellBase)GameObject.Instantiate(cellPrefab); cell.name = "UICellBase" + (++numInstancesCreated).ToString(); Rect rccell = (cellPrefab.transform as RectTransform).rect; Rect rctable = (tableView.transform as RectTransform).rect; Vector2 sizeCell = (cellPrefab.transform as RectTransform).sizeDelta; Vector2 sizeTable = (tableView.transform as RectTransform).sizeDelta; Vector2 sizeCellNew = sizeCell; sizeCellNew.x = rctable.width; for (int i = 0; i < oneCellNum; i++) { int itemIndex = row * oneCellNum + i; float cell_space = 10; UICellItemBase item = (UICellItemBase)GameObject.Instantiate(cellItemPrefab); //item.itemDelegate = this; Rect rcItem = (item.transform as RectTransform).rect; item.width = (rctable.width - cell_space * (oneCellNum - 1)) / oneCellNum; item.height = heightCell; item.transform.SetParent(cell.transform, false); item.index = itemIndex; item.totalItem = totalItem; item.callbackClick = OnCellItemDidClick; cell.AddItem(item); } } cell.totalItem = totalItem; cell.oneCellNum = oneCellNum; cell.rowIndex = row; foreach (UICellItemBase it_base in cell.listItem) { UILearnProgressCellItem ui = it_base as UILearnProgressCellItem; ui.SetItemType(itemType); ui.colorSel = colorSel; ui.colorUnSel = colorUnSel; } cell.UpdateItem(listItem); return(cell); }
//Will be called by the TableView when a cell needs to be created for display public TableViewCell GetCellForRowInTableView(TableView tableView, int row) { UICellBase cell = tableView.GetReusableCell(cellPrefab.reuseIdentifier) as UICellBase; if (cell == null) { cell = (UICellBase)GameObject.Instantiate(cellPrefab); cell.name = "UICellBase" + (++numInstancesCreated).ToString(); Rect rccell = (cellPrefab.transform as RectTransform).rect; Rect rctable = (tableView.transform as RectTransform).rect; Vector2 sizeCell = (cellPrefab.transform as RectTransform).sizeDelta; Vector2 sizeTable = (tableView.transform as RectTransform).sizeDelta; Vector2 sizeCellNew = sizeCell; sizeCellNew.x = rctable.width; // cell.SetCellSize(sizeCellNew); // Debug.LogFormat("TableView Cell Add Item:rcell:{0}, sizeCell:{1},rctable:{2},sizeTable:{3}", rccell, sizeCell, rctable, sizeTable); // oneCellNum = (int)(rctable.width / heightCell); //int i =0; for (int i = 0; i < oneCellNum; i++) { int itemIndex = row * oneCellNum + i; float cell_space = 10; UICellItemBase item = (UICellItemBase)GameObject.Instantiate(cellItemPrefab); //item.itemDelegate = this; Rect rcItem = (item.transform as RectTransform).rect; item.width = (rctable.width - cell_space * (oneCellNum - 1)) / oneCellNum; item.height = heightCell; item.transform.SetParent(cell.transform, false); item.index = itemIndex; item.totalItem = totalItem; item.callbackClick = OnCellItemDidClick; cell.AddItem(item); } } cell.totalItem = totalItem; cell.oneCellNum = oneCellNum; cell.rowIndex = row; cell.UpdateItem(listItem); return(cell); }
public void OnCellItemDidClick(UICellItemBase item) { int idx = item.index; ShopItemInfo info = listItem[idx] as ShopItemInfo; goldClickItem = info.gold; if (info.isIAP) { string title = Language.main.GetString(AppString.STR_UIVIEWALERT_TITLE_SHOP_START_BUY); string msg = Language.main.GetString(AppString.STR_UIVIEWALERT_MSG_SHOP_START_BUY); string yes = Language.main.GetString(AppString.STR_UIVIEWALERT_YES_SHOP_START_BUY); string no = Language.main.GetString(AppString.STR_UIVIEWALERT_YES_SHOP_START_BUY); ViewAlertManager.main.ShowFull(title, msg, yes, no, false, KEYNAME_VIEWALERT, OnUIViewAlertFinished); IAP.main.StartBuy(info.id); //IAPCallBack(IAP.UNITY_CALLBACK_BUY_DID_Fail); } else { if (info.id == ID_GOLD_VIDEO) { AdKitCommon.main.callbackAdVideoFinish = OnAdKitAdVideoFinish; AdKitCommon.main.ShowAdVideo(); if (Application.isEditor) { OnBuyFinish(); } } if (info.id == ID_GOLD_SHARE) { ShowShare(); } if (info.id == ID_GOLD_COMMENT) { string str_date = GetDateString(); PlayerPrefs.SetString(KEY_HAS_COMMENT, str_date); //AppVersion.main.callBackCommentClick = OnUICommentDidClick; //AppVersion.main.OnComment(); AppVersion.main.GotoComment(); } } }
void AddCellItem(UICellBase cell, TableView tableView, int row) { Rect rctable = (tableView.transform as RectTransform).rect; for (int i = 0; i < oneCellNum; i++) { int itemIndex = row * oneCellNum + i; float cell_space = 10; UICellItemBase item = (UICellItemBase)GameObject.Instantiate(cellItemPrefab); //item.itemDelegate = this; Rect rcItem = (item.transform as RectTransform).rect; item.width = (rctable.width - cell_space * (oneCellNum - 1)) / oneCellNum; item.height = heightCell; item.transform.SetParent(cell.transform, false); item.index = itemIndex; item.totalItem = totalItem; item.callbackClick = OnCellItemDidClick; cell.AddItem(item); } }
public void OnCellItemDidClick(UICellItemBase item) { if (item.IsLock()) { return; } GameManager.placeLevel = item.index; if (this.controller != null) { NaviViewController navi = this.controller.naviController; if (Common.appType == AppType.STICKER) { GameManager.ParseGuanka(); navi.Push(GameViewController.main); } else { GuankaViewController guanka = GuankaViewController.main; guanka.indexPlace = item.index; navi.Push(guanka); } } }
public virtual void OnClickItem(UICellItemBase item) { }
public void OnCellItemDidClick(UICellItemBase item) { switch (item.tagValue) { case (int)SettingItemTag.TAG_SETTING_COMMENT: { AppVersion.main.GotoComment(); } break; case (int)SettingItemTag.TAG_SETTING_VERSION: { string title, msg, yes, no; bool isShowBtnNo = false; if (AppVersion.main.appNeedUpdate) { isShowBtnNo = true; title = Language.main.GetString(AppString.STR_UIVIEWALERT_TITLE_UPDATE_VERSION); msg = AppVersion.main.strUpdateNote; yes = Language.main.GetString(AppString.STR_UIVIEWALERT_YES); no = Language.main.GetString(AppString.STR_UIVIEWALERT_NO); } else { isShowBtnNo = false; title = Language.main.GetString(AppString.STR_UIVIEWALERT_TITLE_UPDATE_VERSION); msg = Language.main.GetString(AppString.STR_UIVIEWALERT_MSG_NEWEST_VERSION); yes = Language.main.GetString(AppString.STR_UIVIEWALERT_YES); no = Language.main.GetString(AppString.STR_UIVIEWALERT_NO); } ViewAlertManager.main.ShowFull(title, msg, yes, no, isShowBtnNo, STR_KEYNAME_VIEWALERT_UPDATE_VERSION, OnUIViewAlertFinished); } break; case (int)SettingItemTag.TAG_SETTING_LANGUAGE: { ShowLanguage(true); } break; case (int)SettingItemTag.TAG_SETTING_BACKGROUND_MUSIC: { } break; case (int)SettingItemTag.TAG_SETTING_NOAD: { OnClickBtnNoADIAP(); } break; case (int)SettingItemTag.TAG_SETTING_RESTORE_IAP: { OnClickBtnRestoreIAP(); } break; } OnClickItem(item); }
public virtual void OnCellItemDidClick(UICellItemBase item) { }