public override void initialize() { gameObject = create ( Program.I().new_ui_cardDescription, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), new Vector3(0, 0, 0), true, Program.ui_back_ground_2d ); picLoader = gameObject.AddComponent <cardPicLoader>(); picLoader.code = 0; picLoader.uiTexture = UIHelper.getByName <UITexture>(gameObject, "pic_"); picLoader.loaded_code = -1; resizer = UIHelper.getByName <UIDragResize>(gameObject, "resizer"); underSprite = UIHelper.getByName <UITexture>(gameObject, "under_"); description = UIHelper.getByName <UITextList>(gameObject, "description_"); line = UIHelper.getByName(gameObject, "line"); UIHelper.registEvent(gameObject, "pre_", onPre); UIHelper.registEvent(gameObject, "next_", onNext); UIHelper.registEvent(gameObject, "big_", onb); UIHelper.registEvent(gameObject, "small_", ons); picSprite = UIHelper.getByName <UITexture>(gameObject, "pic_"); lineSprite = UIHelper.getByName <UISprite>(gameObject, "line"); try { description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24")); } catch (System.Exception e) { } read(); }
void OnInitialize() { UITextList uiTextList = _textListCollider.GetComponent <UITextList>(); _textLabel.lineWidth = Mathf.FloorToInt(uiTextList.maxWidth); string versionNumString = string.Format(Localization.instance.Get("IDS_SETTING_ABOUT"), AppVersion.GetCurrentVersionString()); string versionAppString = string.Format(Localization.instance.Get("IDS_SETTING_ABOUT2"), AppVersion.GetCurrentBuildString()); _textLabel.text = versionNumString + "\n" + Localization.instance.Get("IDS_SETTING_CREDITS") + "\n" + versionAppString + "(" + FCDownloadManager.Instance.CurrentAssetBundleTag + ")"; _textHeight = _textLabel.relativeSize.y * _textLabel.transform.localScale.y; _textListCollider.size = new Vector3(_textListCollider.size.x, _textHeight, _textListCollider.size.z); _textListCollider.center = new Vector3(_textListCollider.center.x, -_textHeight / 2.0f, _textListCollider.center.z); _springPanel = _draggablePanel.gameObject.GetComponent <SpringPanel>(); _textListPanelTrans = _draggablePanel.gameObject.transform; _boardHeight2D = _draggablePanel.gameObject.GetComponent <UIPanel>().clipRange.w / 2.0f; _draggablePanel.ResetPosition(); _draggablePanel.MoveRelative(new Vector3(0, -_boardHeight2D, 0)); _isPressing = false; _isStarting = true; StartCoroutine("WaitAWhile"); }
public void Init() { InitLabelLanguage(); btn_close = FindInChild <Button>("topright/btn_close"); textList = FindInChild <UITextList>("hylb/txt_lb"); btn_close.onClick = CloseFarmLogView; }
public void OnFacebookBind(string szFacebookAccount) { PlayerPrefs.SetString("logintype", "facebook"); PlayerPrefs.SetString("user_id", user_id); PlayerPrefs.SetString("user_token", user_token); SceneManager.instance.ShowLoadingTipPanel(true, GAME_MODE.NONE, () => { UITextList.ClearTextList(); //UIMgr.GetTownBasePanel().Close(); //UIMgr.instance.Clear(UIMgr.UIType.System); UIMgr.ClearUI(true); NetworkClient.instance.DisconnectGameServer();//연결 종료 NetData.instance.InitUserData(); NetData.instance.ClearCharIdc(); SceneManager.instance.ActionEvent(_ACTION.GO_LOGIN); }); //option.SaveOptionData(); //Close(); option.SaveOptionData(); base.Close(); }
private void Awake() { Global.Instance.scene = SceneType.MenuScene;//切换场景变量 Global.Instance.activedSceneManager = this; //尝试获取网络端口 try { cardClient = GameObject.FindGameObjectWithTag(Tags.Networks).GetComponent<CardClient>(); RequestPlayerInfo();//获取角色信息 } catch (Exception ex) { LogsSystem.Instance.Print(ex.ToString()); } //获取功能按键 //StartButton = GameObject.Find("GameStart"); //聊天窗初始化 chatList = GameObject.Find("Chatting/ChattingList").GetComponent<UITextList>(); if (chatList != null) { chatScroll = chatList.scrollBar as UIScrollBar; chatScroll.alpha = 0.01f; } //角色信息获取 coinLabel = GameObject.Find("Economy/Coin/Sprite/Num").GetComponent<UILabel>(); gemLabel = GameObject.Find("Economy/Gem/Sprite/Num").GetComponent<UILabel>(); playerNameLabel = GameObject.Find("Head/Name").GetComponent<UILabel>(); levelLabel = GameObject.Find("Head/Head-bg/Level").GetComponent<UILabel>(); //信息控件获取 //infoPanel = GameObject.Find("Frame/Background/InfoPanel"); cardListGrid = GameObject.Find("Frame/Background/InfoPanel/CardContainer/CardList/Grid"); }
public ItemDestribe(Transform head) { itemIcon = head.Find("Item/Icon").GetComponent <UISprite>(); itemName = head.Find("Item/Label").GetComponent <UILabel>(); itemMoney = head.Find("Gold/Label").GetComponent <UILabel>(); itemDes = head.GetComponent <UITextList>(); ItemId = -1; }
public static void ConsoleMessage(string str) { if (null == console) { //console = SALaunch.UIRootCamera.FindChild("ConsolePanel/Console").GetComponent<UILabel>(); textList = SAManager.Instance.UIRootCamera.Find("ConsoleUI/Console").GetComponent <UITextList>(); } textList.Add(str); }
// Use this for initialization void Start() { UITextList mytext = GetComponent <UITextList>(); mytext.Add(contentTitle); // mytext.Add ("\n\t"); mytext.Add(contents); mytext.Add(contents); }
private void Awake() { _ins = this; CommandRegister._ins.Register(typeof(CommandBase).Assembly); InitView(); input = _inputField; output = _logCat; submitAction = new ConsoleSubmitAction(); escapeAction = new ConsoleCloseAction(); }
static public int get_style(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); pushValue(l, true); pushEnum(l, (int)self.style); return(2); } catch (Exception e) { return(error(l, e)); } }
void Awake() { textList = TextList.GetComponentInChildren<UITextList>(); Back_Top.width = 2000; Back_Top.height = (int)Screen.height/4; Back_Bottom.width = 2000; Back_Bottom.height = (int)Screen.height/4; TextList.width = (int)(Screen.width * 0.8f); goFrontPos = Screen.width /4f; goBackPos = Screen.width /3f; bFinish = false; }
static public int get_paragraphHistory(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); pushValue(l, true); pushValue(l, self.paragraphHistory); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int Clear(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); self.Clear(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_textLabel(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); pushValue(l, true); pushValue(l, self.textLabel); return(2); } catch (Exception e) { return(error(l, e)); } }
// Use this for initialization void Start() { UITextList tl = gameObject.GetComponent <UITextList> (); foreach (CommonUtil.LogRecord r in CommonUtil.CommonLogger.s_Records) { tl.Add(TransOrgLog(r.type, r.log)); } tl.scrollBar.value = 1f; CommonUtil.CommonLogger.NewLogEvent += this.LogIncoming; }
/* protected - Override & Unity API */ protected override void OnAwake() { base.OnAwake(); _pUITextList = GetComponentInChildren <UITextList>(); if (_pUITextList == null) { Debug.LogWarning("UITextList 가 없습니다."); } Application.logMessageReceived += OnCallbackUnity_DebugLog; }
private void Awake() { Global.Instance.scene = SceneType.MenuScene;//切换场景变量 Global.Instance.activedSceneManager = this; //尝试获取网络端口 try { cardClient = GameObject.FindGameObjectWithTag(Tags.Networks).GetComponent<CardClient>(); RequestPlayerInfo();//获取角色信息 } catch (Exception ex) { LogsSystem.Instance.Print(ex.ToString()); } //获取功能按键 //StartButton = GameObject.Find("GameStart"); //聊天窗初始化 chatList = GameObject.Find("Chatting/ChattingList").GetComponent<UITextList>(); if (chatList != null) { chatScroll = chatList.scrollBar as UIScrollBar; chatScroll.alpha = 0.01f; } //角色信息获取 coinLabel = GameObject.Find("Economy/Coin/Sprite/Num").GetComponent<UILabel>(); gemLabel = GameObject.Find("Economy/Gem/Sprite/Num").GetComponent<UILabel>(); playerNameLabel = GameObject.Find("Head/Name").GetComponent<UILabel>(); levelLabel = GameObject.Find("Head/Head-bg/Level").GetComponent<UILabel>(); //信息控件获取 //infoPanel = GameObject.Find("Frame/Background/InfoPanel"); cardListGrid = GameObject.Find("Frame/Background/InfoPanel/CardContainer/CardList/Grid"); //卡片背包面板 cardInventoryPanel = GameObject.Find("CardInventory").GetComponent<UIPanel>(); cardInventoryButtonLowlay = GameObject.Find("CardInventory/Background/Feature/Button-lowlay"); heroInfoUsingList = GameObject.Find("CardInventory/Background/Main/HeroInfo/UsingHeros/Scroll View/Grid").GetComponent<UIGrid>(); heroInfoInvList = GameObject.Find("CardInventory/Background/Main/HeroInfo/InvHeros/Scroll View/Grid").GetComponent<UIGrid>(); //卡片背包标签页 ci_PlayerInfo = GameObject.Find("CardInventory/Background/Main/PlayerInfo"); ci_HeroInfo = GameObject.Find("CardInventory/Background/Main/HeroInfo"); ci_GuideInfo = GameObject.Find("CardInventory/Background/Main/GuideInfo"); ci_InvInfo = GameObject.Find("CardInventory/Background/Main/InvInfo"); //玩家页 pp_PlayerName = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerName").GetComponent<UILabel>(); pp_PlayerLevel = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerLevel").GetComponent<UILabel>(); pp_PlayerCoin = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerCoin").GetComponent<UILabel>(); pp_PlayerGem = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerGem").GetComponent<UILabel>(); pp_HeroGrid = GameObject.Find("CardInventory/Background/Main/PlayerInfo/CardInfo/Heros/Scroll View/Grid").GetComponent<UIGrid>(); pp_ItemGrid = GameObject.Find("CardInventory/Background/Main/PlayerInfo/CardInfo/Items/Scroll View/Grid").GetComponent<UIGrid>(); }
// Use this for initialization void Start() { Debuger.EnableLog = GD.ENABLELOG; tReceive = new Thread(ReceiveDatasThread); textList = GetComponentInChildren <UITextList>(); popup_端口号 = GameUtility.FindDeepChild(gameObject, "Popup_端口号").GetComponent <UIPopupList>(); popup_波特率 = GameUtility.FindDeepChild(gameObject, "Popup_波特率").GetComponent <UIPopupList>(); textInput = GameUtility.FindDeepChild(gameObject, "Input Field").GetComponent <UIInput>(); EventInit(); }
public void Init(GameObject go) { m_BaseWndObject = go; m_BaseTrans = go.transform; m_ScrollView.m_Grid = new UIGrid[3]; m_ScrollView.m_BaseChild = m_BaseTrans.GetChild(0).GetChild(0).gameObject; for (byte i = 0; i < 3; ++i) { m_ScrollView.m_Grid[i] = m_BaseTrans.GetChild(0).GetChild(i + 1).GetComponent <UIGrid>(); } m_NoticeLabel = m_BaseTrans.GetChild(1).GetComponent <UITextList>(); UIEventListener.Get(m_BaseTrans.GetChild(2).gameObject).onClick = onClickChangeAddress; }
static public int set_style(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); UITextList.Style v; checkEnum(l, 2, out v); self.style = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int Add(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); System.String a1; checkType(l, 2, out a1); self.Add(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_textLabel(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); UILabel v; checkType(l, 2, out v); self.textLabel = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_scrollValue(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); float v; checkType(l, 2, out v); self.scrollValue = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int OnDrag(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); UnityEngine.Vector2 a1; checkType(l, 2, out a1); self.OnDrag(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_paragraphHistory(IntPtr l) { try { UITextList self = (UITextList)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.paragraphHistory = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public override void initialize() { gameObject = create ( Program.I().new_ui_cardDescription, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), new Vector3(0, 0, 0), true, Program.ui_back_ground_2d ); picLoader = gameObject.AddComponent <cardPicLoader>(); picLoader.code = 0; picLoader.uiTexture = UIHelper.getByName <UITexture>(gameObject, "pic_"); picLoader.loaded_code = -1; resizer = UIHelper.getByName <UIDragResize>(gameObject, "resizer"); underSprite = UIHelper.getByName <UITexture>(gameObject, "under_"); description = UIHelper.getByName <UITextList>(gameObject, "description_"); cardShowerWidget = UIHelper.getByName <UIWidget>(gameObject, "card_shower"); monitor = UIHelper.getByName <UIPanel>(gameObject, "monitor"); deckPanel = gameObject.GetComponentInChildren <UIDeckPanel>(); line = UIHelper.getByName(gameObject, "line"); UIHelper.registEvent(gameObject, "pre_", onPre); UIHelper.registEvent(gameObject, "next_", onNext); UIHelper.registEvent(gameObject, "big_", onb); UIHelper.registEvent(gameObject, "small_", ons); UIHelper.registEvent(gameObject, "wiki_", onwiki); UIHelper.registEvent(gameObject, "reset_", onReset); picSprite = UIHelper.getByName <UITexture>(gameObject, "pic_"); lineSprite = UIHelper.getByName <UISprite>(gameObject, "line"); try { description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24")); } catch (System.Exception e) { } read(); myGraveStr = InterString.Get("我方墓地:"); myExtraStr = InterString.Get("我方额外:"); myBanishedStr = InterString.Get("我方除外:"); opGraveStr = InterString.Get("[8888FF]对方墓地:[-]"); opExtraStr = InterString.Get("[8888FF]对方额外:[-]"); opBanishedStr = InterString.Get("[8888FF]对方除外:[-]"); for (int i = 0; i < quickCards.Length; i++) { quickCards[i] = deckPanel.createCard(); quickCards[i].relayer(i); } monitor.gameObject.SetActive(false); }
static int Clear(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1); obj.Clear(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
//< 화면이 꺼졌다 켜졌을경우 처리 //#if !UNITY_EDITOR && UNITY_ANDROID public void OnApplicationPause(bool type) { if (type) { PlayerPrefs.SetString("OnApplicationPauseTime", dateTimeToUnixTime(System.DateTime.Now).ToString()); } else { NativeHelper.instance.DisableNavUI(); System.DateTime EndTime = UnixTimeToDateTime(uint.Parse(PlayerPrefs.GetString("OnApplicationPauseTime", "0"))); EndTime = EndTime.AddMinutes(5); long tick = (EndTime - System.DateTime.Now).Ticks; if (tick <= 0) { if (instance.CurrState() != _STATE.LOGIN && SceneManager.instance.CurrState() != _STATE.START /*&& SceneManager.instance.CurrState() != _STATE.GAMEREADY*/) { string msg = _LowDataMgr.instance.GetStringCommon(1021); string title = _LowDataMgr.instance.GetStringCommon(141); string ok = _LowDataMgr.instance.GetStringCommon(117); AddPopup(0, msg, title, ok, null, null, () => { ShowLoadingTipPanel(true, GAME_MODE.NONE, () => { UITextList.ClearTextList(); NetData.instance.InitUserData(); NetData.instance.ClearCharIdc(); ActionEvent(_ACTION.GO_LOGIN); }); }, null, null); //UIMgr.instance.OpenPopup("게임을 장시간 플레이하지 않아,\n타이틀로 돌아갑니다.", () => //{ //SceneManager.instance.ActionEvent(_ACTION.GO_LOGIN); //}, false); } } } #if UNITY_ANDROID Object[] objects = GameObject.FindObjectsOfType(typeof(SkinnedMeshRenderer)); foreach (SkinnedMeshRenderer s in objects) { s.sharedMesh.vertices = s.sharedMesh.vertices; s.sharedMesh.colors = s.sharedMesh.colors; s.sharedMesh.colors32 = s.sharedMesh.colors32; s.sharedMesh.uv = s.sharedMesh.uv; } #endif }
// Use this for initialization void Start() { if (string.IsNullOrEmpty(mText)) { return; } UITextList uilist = GetComponent <UITextList>(); string[] lines = mText.Split('\n'); foreach (string line in lines) { uilist.Add(line); } }
//void Awake() //{ // init(); //} //private void init() //{ // this.textList = this.transform.Find("UIDebug/TextArea").GetComponent<UITextList>(); //} public void log(object obj, Color136 color = Color136.Black) { if (this.textList == null) { this.textList = this.transform.Find("UIDebug/TextArea").GetComponent <UITextList>(); } string content = obj.ToString(); if (this.color136.Count == 0) { color136 = TextStyle.getColor136(); } content = "[" + color136[color].HEX + "]" + content + "[-]"; //设置颜色/ this.textList.Add(content); }
static int Add(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1); string arg0 = ToLua.CheckString(L, 2); obj.Add(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int OnDrag(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1); UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2); obj.OnDrag(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int OnScroll(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.OnScroll(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private UILabel appkeyLabel; //用来接收用户输入的appkey void Start() { //获得引用,赋值等操作,并将一开始不显示的组件隐藏 trainController = TrainController.GetInstance(); query.SetActive(false); trainInfoShow.SetActive(false); stationInfoShow.SetActive(false); backButton.gameObject.SetActive(false); nextButton.gameObject.SetActive(false); errorShow.SetActive(false); trainLabel = trainInfoShow.transform.FindChild("TrainLabel").GetComponent<UITextList>(); stationLabel = stationInfoShow.transform.FindChild("StationLabel").GetComponent<UITextList>(); errorLabel = errorShow.transform.FindChild("ErrorLabel").GetComponent<UILabel>(); appkeyLabel = appkey.transform.FindChild("AppKeyInput Field/Label").GetComponent<UILabel>(); stationModelsList = new List<StationModel>(); }
void Start() { label = GetComponent<UITextList>(); }
// Use this for initialization void Start () { myTextList = this.GetComponent<UITextList> (); }
// Use this for initialization void Start() { networkManager = Manager.GetComponent<NetworkManager>(); playerList = GetComponent<UITextList>(); }