public void WaitForInput(GameInputField input, string text, int timeout = defaultTimeout, string screenshot = "") { App.WaitFor(() => { return(input.Text == text); }, retryFrequency: new TimeSpan(0, 0, 0, 0, 800), timeout: new TimeSpan(0, 0, 0, 0, timeout), timeoutMessage: string.Format("Timed out waiting for: {0}", input.Name)); if (!string.IsNullOrEmpty(screenshot)) { App.Screenshot(screenshot); } }
public GameInputField InvokeInput(string name, string text, int timeout = defaultTimeout) { GameInputField input = null; App.WaitFor(() => { input = Client.Post <GameInputField>(invokeInputRoute, string.Format("?name={0}&text={1}", name, text)); return(input != null); }, retryFrequency: TimeSpan.FromMilliseconds(800), timeout: TimeSpan.FromMilliseconds(timeout), timeoutMessage: string.Format("Timed out waiting for: {0}", name)); return(input); }
public void SetType(GuidStartCartoonType type, float m_screenX, long ID) { m_GuidID = ID; cartoonType = type; if (type == GuidStartCartoonType.HEAD) { //GameEvents.UIEvents.UI_StartCartoon_Event.OnNextBtnVisible.SafeInvoke(false,0); ENUM_LOGIN_TYPE loginType = ENUM_LOGIN_TYPE.E_GUEST; if (null != PlayerPrefTool.GetUsername(ENUM_LOGIN_TYPE.E_THIRD)) { loginType = ENUM_LOGIN_TYPE.E_THIRD; } int headCount = CommonData.CartoonHEAD.Count; Transform headRoot = gameObject.transform.Find("Panel (1)/Panel"); this.m_TweenHead = headRoot.GetComponent <TweenScale>(); this.m_IconTex = Make <GameNetworkRawImage>("icon"); this.m_IconTween = m_IconTex.GetComponent <TweenScale>(); Material mat = new Material(ShaderModule.Instance.GetShader("SeekerGame/ImageBlur")); mat.SetFloat("_BlurRadius", 1.5f); bgTexture = Make <GameTexture>("RawImage"); bgTexture.RawImage.material = mat; m_HeadCon = Make <GameUIContainer>("Panel:grid"); m_gridValue = m_HeadCon.GetComponent <GridValue>(); float gridWidth = headCount * 150 + m_gridValue.m_spacing * (headCount - 1); m_HeadCon.Widget.sizeDelta = new Vector2(gridWidth, m_HeadCon.Widget.sizeDelta.y); m_HeadCon.EnsureSize <GuidHeadUILogic>(headCount); for (int i = 0; i < headCount; i++) { GuidHeadUILogic head = m_HeadCon.GetChild <GuidHeadUILogic>(i); head.SetData(m_screenX, i, m_gridValue.m_spacing, loginType); head.Visible = true; } } else if (type == GuidStartCartoonType.NAME) { m_InputName = Make <GameInputField>("Panel (1):RawImage:InputField"); m_InputName.Text = "Guest_" + GlobalInfo.MY_PLAYER_ID; m_effect = Make <GameUIEffect>("Panel (1):RawImage:Effect:UI_xinshouyindao_shou"); m_effect.EffectPrefabName = "UI_xinshouyindao_shou.prefab"; m_effect.Visible = true; GameEvents.UIEvents.UI_StartCartoon_Event.OnNextBtnVisible.SafeInvoke(false, 1); m_InputName.AddClickCallBack(InputClick); } }
//GameLabel m_player_id_text; //GameLabel m_invite_text; protected override void OnInit() { //m_title_text = this.Make<GameLabel>("Panel:Text_title"); //m_title_text.Text = LocalizeModule.Instance.GetString("friend_account"); m_input = this.Make <GameInputField>("Panel:Image_back:InputField"); m_input.input.placeholder.GetComponent <Text>().text = LocalizeModule.Instance.GetString("friend_input_ID"); m_add_btn = m_input.Make <GameImage>("Button"); m_add_btn_text = m_add_btn.Make <GameLabel>("Text"); m_add_btn_text.Text = LocalizeModule.Instance.GetString("friend_invite_btn"); //m_facebook_invite_btn = this.Make<GameButton>("Panel:Button2"); //m_player_id_text = this.Make<GameLabel>("Panel:Text_ID"); //m_invite_text = this.Make<GameLabel>("Panel:Text_detail"); //m_invite_text.Text = LocalizeModule.Instance.GetString("friend_invite_ID"); //this.SetCloseBtnID("Panel:Button_close"); }
protected override void OnInit() { this.m_lbParamName = Make <GameLabel>("label_paramName"); this.m_inputParamValue = Make <GameInputField>("InputField"); }
protected override void OnInit() { base.OnInit(); this.m_input = Make <GameInputField>("Panel_animation:InputField"); this.m_effect = Make <GameUIEffect>("UI_zhiwen"); }