public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; Gro_ShowVersionInfo = null; n0 = null; n9 = null; n10 = null; Btn_Login = null; Btn_Registe = null; accountInput = null; passwordInput = null; accountText = null; Tex_LoginInfo = null; ToTestSceneBtn = null; passwordText = null; Gro_LoginInfo = null; Gros_Detail_BackGround = null; n26 = null; Gro_Detail = null; Btn_VersionInfo = null; Gro_VersionInfo = null; t0 = null; t1 = null; Anim_VersionHide = null; Anim_VersionShow = null; }
protected override void OnInit(object userData) { base.OnInit(userData); m_VersionText = UI.GetChild("tf_Version").asTextField; m_NoticeButton = UI.GetChild("btn_Notice").asButton; m_AccountButton = UI.GetChild("btn_Account").asButton; m_NoticePanel = UI.GetChild("notice").asCom; m_LoginPanel = UI.GetChild("login").asCom; m_AccountInput = m_LoginPanel.GetChild("ipt_account").asTextInput; m_PasswordInput = m_LoginPanel.GetChild("ipt_password").asTextInput; m_RegisterButton = m_LoginPanel.GetChild("btn_rigister").asButton; m_LoginButton = m_LoginPanel.GetChild("btn_login").asButton; m_NoticePanel.visible = false; m_LoginPanel.visible = false; m_NoticeButton.onClick.Add(() => { m_NoticePanel.visible = !m_NoticePanel.visible; }); m_AccountButton.onClick.Add(() => { m_LoginPanel.visible = !m_LoginPanel.visible; }); }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; m_Gro_ShowVersionInfo = null; m_n0 = null; m_n9 = null; m_n10 = null; m_Btn_Login.Dispose(); m_Btn_Login = null; m_Btn_Registe.Dispose(); m_Btn_Registe = null; m_accountInput = null; m_passwordInput = null; m_accountText = null; m_Tex_LoginInfo = null; m_ToTestSceneBtn.Dispose(); m_ToTestSceneBtn = null; m_passwordText = null; m_Gro_LoginInfo = null; m_t0 = null; m_t1 = null; }
public HtmlInput() { textInput = new GTextInput(); textInput.verticalAlign = VertAlignType.Middle; _border = new Shape(); }
public ChatScene() { UIPackage.AddPackage("UI/Emoji"); UIConfig.verticalScrollBar = "ui://Emoji/ScrollBar_VT"; UIConfig.defaultScrollBarDisplay = ScrollBarDisplayType.Auto; _messages = new List <Message>(); _mainView = UIPackage.CreateObject("Emoji", "Main").asCom; _mainView.MakeFullScreen(); _mainView.AddRelation(GRoot.inst, RelationType.Size); AddChild(_mainView); _list = _mainView.GetChild("list").asList; _list.SetVirtual(); _list.itemProvider = GetListItemResource; _list.itemRenderer = RenderListItem; _input = _mainView.GetChild("input").asTextInput; _input.onSubmit.Add(onSubmit); _mainView.GetChild("btnSend").onClick.Add(__clickSendBtn); _mainView.GetChild("btnEmoji").onClick.Add(__clickEmojiBtn); _emojiSelectUI = UIPackage.CreateObject("Emoji", "EmojiSelectUI").asCom; _emojiSelectUI.GetChild("list").asList.onClickItem.Add(__clickEmoji); }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { account = (GTextInput)com.GetChildAt(4); password = (GTextInput)com.GetChildAt(5); loginBtn = (GButton)com.GetChildAt(6); selserverBtn = (GButton)com.GetChildAt(7); storyBtn = (GButton)com.GetChildAt(8); newGuideBtn = (GButton)com.GetChildAt(9); hold = (GGraph)com.GetChildAt(10); } }
public HtmlInput() { textInput = (GTextInput)UIObjectFactory.NewObject("inputtext"); textInput.verticalAlign = VertAlignType.Middle; _border = new Shape(); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); name1 = (GTextInput)this.GetChild("name1"); enterGame2 = (GButton)this.GetChild("enterGame2"); }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { bg = (GImage)com.GetChild("bg"); contentBG = (GImage)com.GetChild("contentBG"); accountBg = (GImage)com.GetChild("accountBg"); accountInput = (GTextInput)com.GetChild("accountInput"); passwordBg = (GImage)com.GetChild("passwordBg"); passwordInput = (GTextInput)com.GetChild("passwordInput"); loginButton = FGUITitleButton.Create(domain, com.GetChild("loginButton")); registButton = FGUITitleButton.Create(domain, com.GetChild("registButton")); content = (GGroup)com.GetChild("content"); } }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); self.Remove(); self = null; n0 = null; n9 = null; n10 = null; Btn_Login = null; Btn_Registe = null; accountInput = null; passwordInput = null; accountText = null; Tex_LoginInfo = null; ToTestSceneBtn = null; passwordText = null; n16 = null; t0 = null; t1 = null; }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); GRoot.inst.SetContentScaleFactor(720, 1280); _mainView = this.GetComponent <UIPanel>().ui; playerlogin.instance.thisuser = AVUser.CurrentUser; //username = _mainView.GetChild("username").asButton.title; //password = _mainView.GetChild("password").asButton.title; username = _mainView.GetChild("username").asButton.GetChild("title").asTextInput; password = _mainView.GetChild("password").asButton.GetChild("title").asTextInput; creatname = _mainView.GetChild("creatname").asButton.GetChild("title").asTextInput; randomStatus = _mainView.GetChild("randomStatus").asButton; start = _mainView.GetChild("start").asButton; //Debug.Log(randomStatus); randomShow = _mainView.GetChild("randomShow").asTextField; //Debug.Log(username); //Debug.Log(password); login = _mainView.GetChild("login").asButton; signup = _mainView.GetChild("signup").asButton; c1 = _mainView.GetController("c1"); randomShow.text = string.Format("力量:{0}\n体质:{1}\n耐力:{2}\n敏捷:{3}\n智力:{4}\n", S, P, D, A, I); }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Emoji"); UIConfig.verticalScrollBar = UIPackage.GetItemURL("Emoji", "ScrollBar_VT"); UIConfig.defaultScrollBarDisplay = ScrollBarDisplayType.Auto; _mainView = UIPackage.CreateObject("Emoji", "Main").asCom; _mainView.fairyBatching = true; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _list = _mainView.GetChild("list").asList; _list.RemoveChildrenToPool(); _input = _mainView.GetChild("input").asTextInput; _input.onKeyDown.Add(__inputKeyDown); _itemURL1 = UIPackage.GetItemURL("Emoji", "chatLeft"); _itemURL2 = UIPackage.GetItemURL("Emoji", "chatRight"); _mainView.GetChild("btnSend").onClick.Add(__clickSendBtn); _mainView.GetChild("btnEmoji").onClick.Add(__clickEmojiBtn); _emojiSelectUI = UIPackage.CreateObject("Emoji", "EmojiSelectUI").asCom; _emojiSelectUI.fairyBatching = true; _emojiSelectUI.GetChild("list").asList.onClickItem.Add(__clickEmoji); }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _itemURL1 = UIPackage.GetItemURL("EmojiPro", "chatLeft"); _itemURL2 = UIPackage.GetItemURL("EmojiPro", "chatRight"); _messages = new List <Message>(); _mainView = this.GetComponent <UIPanel>().ui; _list = _mainView.GetChild("list").asList; _list.defaultItem = _itemURL1; _list.SetVirtual(); _list.itemProvider = GetListItemResource; _list.itemRenderer = RenderListItem; _input = _mainView.GetChild("input").asTextInput; _input.onKeyDown.Add(__inputKeyDown); //作为demo,这里只添加了部分表情素材 _emojies = new Dictionary <uint, Emoji>(); for (uint i = 0x1f600; i < 0x1f637; i++) { string url = UIPackage.GetItemURL("EmojiPro", Convert.ToString(i, 16)); if (url != null) { _emojies.Add(i, new Emoji(url)); } } _input.emojies = _emojies; _mainView.GetChild("btnSend").onClick.Add(__clickSendBtn); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); dog_loader = (GLoader)this.GetChildAt(0); name_txt = (GTextInput)this.GetChildAt(2); confirm_btn = (GButton)this.GetChildAt(3); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); m_BackGround = (GImage)this.GetChildAt(0); m_InputContent = (GTextInput)this.GetChildAt(1); m_Title = (GTextField)this.GetChildAt(2); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); user = (GTextInput)this.GetChild("user"); psw = (GTextInput)this.GetChild("psw"); login = (GButton)this.GetChild("login"); exit = (GButton)this.GetChild("exit"); }
protected void SetTextInput(string objname, string value) { GTextInput textinput = FindChildren <GTextInput>(objname); if (textinput != null) { textinput.text = value; } }
public HtmlInput() { textInput = (GTextInput)UIObjectFactory.NewObject(ObjectType.InputText); textInput.verticalAlign = VertAlignType.Middle; _border = new Shape(); _border.graphics.dontClip = true; ((InputTextField)textInput.displayObject).AddChildAt(_border, 0); }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Emoji"); UIConfig.verticalScrollBar = UIPackage.GetItemURL("Emoji", "ScrollBar_VT"); UIConfig.defaultScrollBarDisplay = ScrollBarDisplayType.Auto; _messages = new List <Message>(); _mainView = UIPackage.CreateObject("Emoji", "Main").asCom; _mainView.fairyBatching = true; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _list = _mainView.GetChild("list").asList; _list.SetVirtual(); _list.itemProvider = GetListItemResource; _list.itemRenderer = RenderListItem; _input1 = _mainView.GetChild("input1").asTextInput; _input1.onKeyDown.Add(__inputKeyDown1); _input2 = _mainView.GetChild("input2").asTextInput; _input2.onKeyDown.Add(__inputKeyDown2); //作为demo,这里只添加了部分表情素材 _emojies = new Dictionary <uint, Emoji>(); for (uint i = 0x1f600; i < 0x1f637; i++) { string url = UIPackage.GetItemURL("Emoji", Convert.ToString(i, 16)); if (url != null) { _emojies.Add(i, new Emoji(url)); } } _input2.emojies = _emojies; _mainView.GetChild("btnSend1").onClick.Add(__clickSendBtn1); _mainView.GetChild("btnSend2").onClick.Add(__clickSendBtn2); _mainView.GetChild("btnEmoji1").onClick.Add(__clickEmojiBtn1); _mainView.GetChild("btnEmoji2").onClick.Add(__clickEmojiBtn2); _emojiSelectUI1 = UIPackage.CreateObject("Emoji", "EmojiSelectUI").asCom; _emojiSelectUI1.fairyBatching = true; _emojiSelectUI1.GetChild("list").asList.onClickItem.Add(__clickEmoji1); _emojiSelectUI2 = UIPackage.CreateObject("Emoji", "EmojiSelectUI_ios").asCom; _emojiSelectUI2.fairyBatching = true; _emojiSelectUI2.GetChild("list").asList.onClickItem.Add(__clickEmoji2); }
protected string GetTextInput(string objname) { GTextInput textinput = FindChildren <GTextInput>(objname); if (textinput != null) { return(textinput.text); } return(string.Empty); }
public override void ConstructFromXML(XML xml) { base.ConstructFromXML(xml); list_ = (GList)this.GetChild("list_"); channel_ = (GComponent)this.GetChild("channel_"); input_ = (GTextInput)this.GetChild("input_"); emotion_ = (GButton)this.GetChild("emotion_"); send_ = (GButton)this.GetChild("send_"); }
private void StartUp() { this.m_input = this.FUIComponent.GetChild("n38").asLabel.GetChild("title").asTextInput; this.m_input.onSubmit.Set(this.OnSubmit); this.m_chatList = this.FUIComponent.GetChild("n40").asList; this.m_chatList.numItems = 0; }
public override void Create() { GTile = MainView.GetChild("Map").asCom.GetChild("Tile").asCom; GLine = MainView.GetChild("Map").asCom.GetChild("Line").asCom; GBattle = MainView.GetChild("Battle").asCom; GTextInput pName = MainView.GetChild("PlayerName").asTextInput; pName.text = PlayerPrefs.GetString("PlayerName", ""); pName.onFocusOut.Add(() => PlayerPrefs.SetString("PlayerName", pName.text)); MainView.GetChild("Hp").text = $"{THClimbTower.Game.Instance.player.NowHp}/{THClimbTower.Game.Instance.player.MaxHp}"; MainView.GetChild("Gold").text = THClimbTower.Game.Instance.player.Gold.ToString(); //监听金币变化 THClimbTower.Game.Instance.EventSystem.AddAction(THClimbTower.EventType.GoldChange, (t, vs) => { ValueChange vc = vs[0] as ValueChange; MainView.GetChild("Gold").text = vc.AfterValue.ToString(); }); //监听血量变化 THClimbTower.Game.Instance.EventSystem.AddAction(THClimbTower.EventType.HpChange, (t, vs) => { Player p = vs[0] as Player; if (p == null) { return; } ValueChange vc = vs[1] as ValueChange; MainView.GetChild("Hp").text = $"{vc.AfterValue}/{THClimbTower.Game.Instance.player.MaxHp}"; }); //监听战斗开始 THClimbTower.Game.Instance.EventSystem.AddAction(THClimbTower.EventType.BattleStart, (t, vs) => { MainView.GetController("c1").selectedIndex = 1; Battle battle = THClimbTower.Game.Instance.NowBattle; GComponent gPlayer = UIPackage.CreateObject("Map", "BattleCharactor").asCom; GBattle.AddChild(gPlayer); new UIModule.UICharactor(gPlayer, THClimbTower.Game.Instance.player); foreach (var a in battle.Enemys) { GComponent gEnemy = UIPackage.CreateObject("Map", "BattleCharactor").asCom; GBattle.AddChild(gEnemy); UIModule.UICharactor uICharactor = new UIModule.UICharactor(gEnemy, a); gEnemy.xy = new Vector2(a.X, a.Y); } }, 100); THClimbTower.Game.Instance.EventSystem.AddAction(THClimbTower.EventType.FreshMap, FreshMap); THClimbTower.Game.Instance.EventSystem.AddAction(THClimbTower.EventType.ReBuildMap, CreatMap); //由于Create的时候地图已经生成了,还没有监听上,所以要手动创建一次 CreatMap(THClimbTower.EventType.ReBuildMap, THClimbTower.Game.Instance.NowMap); }
public void Awake(GObject go) { if (go == null) { return; } GObject = go; if (string.IsNullOrWhiteSpace(Name)) { Name = Id.ToString(); } self = (GComponent)go; self.Add(this); var com = go.asCom; if (com != null) { login2RegisterController = com.GetControllerAt(0); bgBtn = bgBtn.Create(com.GetChildAt(0)); frameReg = WindowFrame1.Create(com.GetChildAt(1)); ConfirmBtn = Button.Create(com.GetChildAt(2)); RegAccIn = (GTextInput)com.GetChildAt(3); n83 = (GTextField)com.GetChildAt(4); n84 = (GImage)com.GetChildAt(5); n86 = (GGroup)com.GetChildAt(6); RegPWIn = (GTextInput)com.GetChildAt(7); n88 = (GTextField)com.GetChildAt(8); n89 = (GImage)com.GetChildAt(9); n91 = (GGroup)com.GetChildAt(10); RegConfirmIn = (GTextInput)com.GetChildAt(11); n93 = (GTextField)com.GetChildAt(12); n94 = (GImage)com.GetChildAt(13); n96 = (GGroup)com.GetChildAt(14); Register = (GGroup)com.GetChildAt(15); Login = (GGroup)com.GetChildAt(16); frameLogin = WindowFrame1.Create(com.GetChildAt(17)); n80 = (GGroup)com.GetChildAt(18); pwIn = (GTextInput)com.GetChildAt(19); n78 = (GImage)com.GetChildAt(20); n77 = (GTextField)com.GetChildAt(21); loginBtn = Button.Create(com.GetChildAt(22)); n53 = (GGroup)com.GetChildAt(23); accIn = (GTextInput)com.GetChildAt(24); n51 = (GImage)com.GetChildAt(25); n50 = (GTextField)com.GetChildAt(26); regBtn = Button.Create(com.GetChildAt(27)); } }
private void FindObject() { uid = this.GetChild("n5").asCom.GetChild("n1").asTextInput; uid.promptText = Tools.GetMessageById("13137"); btn_ok = this.GetChild("n4").asButton; btn_ok.text = Tools.GetMessageById("19008"); btn_ok.onClick.Add(() => { if (!uid.text.Equals("")) { if (!uid.text.Equals(userModel.uid)) { try { Convert.ToInt32(uid.text); if (!Tools.IsNullEmpty(userModel.records["invite_uid"] + "")) { ViewManager.inst.ShowText(Tools.GetMessageById("19962")); } else { Dictionary <string, object> data = new Dictionary <string, object>(); data["uid"] = uid.text; NetHttp.inst.Send(NetBase.HTTP_GETWIN, data, (VoHttp vo) => { DispatchManager.inst.Dispatch(new MainEvent(MainEvent.EVENTSHARE, "1")); ViewManager.inst.ShowText(Tools.GetMessageById("19961")); Dictionary <string, object> dIcon = new Dictionary <string, object>(); dIcon[Config.ASSET_COIN] = share["invited"]; ViewManager.inst.ShowIcon(dIcon, () => { userModel.UpdateData(vo.data); }); ViewManager.inst.CloseView(this); }); } } catch (Exception e) { ViewManager.inst.ShowText(Tools.GetMessageById("13160")); } } else { ViewManager.inst.ShowText(Tools.GetMessageById("19436")); } } else { ViewManager.inst.ShowText(Tools.GetMessageById("13138")); } }); }
public override void Init() { base.Init(); this.Create(Config.VIEW_GUILDCREATE); simCfg = DataManager.inst.systemSimple; input = this.GetChild("n3").asTextInput; btn_changeIcon = this.GetChild("n0").asButton; img_icon = btn_changeIcon.GetChild("n0").asLoader; btn_create = this.GetChild("n6").asButton; l_goldNeed = this.GetChild("n7").asTextField; bo_suozaidi = this.GetChild("n10").asComboBox; this.GetChild("n2").asTextField.text = Tools.GetMessageById("20129"); this.GetChild("n9").asTextField.text = Tools.GetMessageById("20130"); btn_create.text = Tools.GetMessageById("20149"); this.GetChild("n15").asButton.onClick.Add(OnAddClickInInput); Dictionary <string, object> cc = (Dictionary <string, object>)(simCfg ["society_location"]); object[] cfgs = (object[])((Dictionary <string, object>)DataManager.inst.guild["society"])["society_icon"]; MediatorChangeIcon.iconID = cfgs [Tools.GetRandom(0, cfgs.Length - 1)].ToString(); img_icon.url = Tools.GetResourceUrl("Icon:" + MediatorChangeIcon.iconID); string[] str = new string[cc.Count]; string[] va = new string[cc.Count]; int ii = 0; foreach (string i in cc.Keys) { str [ii] = Tools.GetMessageById(((object[])cc [i]) [1].ToString()); va[ii] = i; ii++; } bo_suozaidi.items = str; bo_suozaidi.values = va; input.touchable = false; l_goldNeed.text = Tools.GetMessageById("20172", new object[] { Convert.ToString((int)cfg ["society_cost"]) }); input.text = ""; input.promptText = Tools.GetMessageById("20150"); input.onChanged.Add(OnInputChange); //input.maxLength = 8; // Tools.GetStringLength (); btn_changeIcon.onClick.Add(OnChangeIconViewShow); btn_create.onClick.Add(GuildCreate); DispatchManager.inst.Register(MainEvent.CHANGE_GUILD_ICON, OnChangeIconHandler); this.AddGlobalListener(MainEvent.CHAT_GUILDJOIN, CHAT_GUILDJOIN); }
protected override void OnInit(object userData) { base.OnInit(userData); m_WarriorButton = UI.GetChild("btn_warrior").asButton; m_MagicButton = UI.GetChild("btn_magic").asButton; m_ArcherButton = UI.GetChild("btn_archer").asButton; m_CreateRoleButton = UI.GetChild("btn_CreateRole").asButton; m_RoleNamePanel = UI.GetChild("RoleNamePanel").asCom; m_DiceButton = m_RoleNamePanel.GetChild("btn_Dice").asButton; m_NameInput = m_RoleNamePanel.GetChild("ipt_RoleName").asTextInput; m_RoleInfoPanel = UI.GetChild("RoleInfoPanel").asCom; m_RoleInfoCtrl = m_RoleInfoPanel.GetController("roleInfoCtrl"); }
public void TestTextFieldAndInut() { GTextField mTextFieldTest = this.mShowImagetoUintyCom.GetChild("TextFieldTest") .asTextField; mTextFieldTest.text = "测试"; GTextInput input = mTextFieldTest.asTextInput; if (input != null) { input.editable = false; } }
private void FindObject() { list_guest = this.GetChild("n2").asList; list_guest.SetVirtual(); input_content = this.GetChild("n3").asTextInput; input_content.promptText = Tools.GetMessageById("13061"); //input_content.maxLength = (int)DataManager.inst.systemSimple["book_num"]; input_content.onChanged.Add(() => { input_content.text = Tools.GetStringByLength(input_content.text, (int)DataManager.inst.systemSimple["book_num"]); input_content.text = Tools.StrReplace(input_content.text); }); send = this.GetChild("n4").asButton; send.onClick.Add(Send); send.text = Tools.GetMessageById("13064"); }
public override void ConstructFromXML() { this.Owner = "FUI.Login"; m_Text_Account_Input = (GTextInput)this.GetChild("Text_Account_Input"); m_Text_GD_Protocol_More = (GRichTextField)this.GetChild("Text_GD_Protocol_More"); m_Text_Code_Input = (GTextInput)this.GetChild("Text_Code_Input"); m_Button_Guest = (Button_Guest)this.GetChild("Button_Guest"); m_Button_SendCode = (Button_SendCode)this.GetChild("Button_SendCode"); m_Button_Close_X3 = (GButton)this.GetChild("Button_Close_X3"); m_Button_Choose = (GButton)this.GetChild("Button_Choose"); m_Button_OtherMethods = (Button_OtherMethods)this.GetChild("Button_OtherMethods"); m_CBox_SelectNumber = (CBox_SelectNumber)this.GetChild("CBox_SelectNumber"); m_CBox_NumberArea = (CBox_NumberArea)this.GetChild("CBox_NumberArea"); }