private void OnEvent_TeamChange(IEvent ievent) { var e = ievent as TeamChangeEvent; if (e.Type == 10) { //InfotToggle.value = true; //TeamToggle.value = false; InfotToggle.Set(true); TeamToggle.Set(false); EventDispatcher.Instance.DispatchEvent(new Event_MissionTabClick(0)); } }
private void DoClickToggle() { if (m_toggle == null) { return; } if (m_toggle.group != 0) { m_toggle.Set(m_index == m_grid.selectIndex); } else { m_toggle.Set(m_grid.ContainsMultiSelect(m_index)); } }
static int Set(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { UIToggle obj = (UIToggle)ToLua.CheckObject <UIToggle>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.Set(arg0); return(0); } else if (count == 3) { UIToggle obj = (UIToggle)ToLua.CheckObject <UIToggle>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.Set(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UIToggle.Set")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void LoadTransData() { tutorialBattleSeen = ((TransData)transData).tutorialBattleSeen; if (!tutorialBattleSeen) { GhostHelperBattle.SetActive(true); } availableUnits = ((TransData)transData).goingToBattleUnits; if (!((TransData)transData).soundOn) { ((SoundFX)soundFX).ChangeSound(((TransData)transData).soundOn); soundToggle.Start(); soundToggle.Set(false, false); } if (!((TransData)transData).ambientOn) { ((SoundFX)soundFX).ToggleAmbient(); ambientToggle.Start(); ambientToggle.Set(false, false); } if (!((TransData)transData).musicOn) { ((SoundFX)soundFX).ChangeMusic(((TransData)transData).musicOn); musicToggle.Start(); musicToggle.Set(false, false); } }
public void Init(AdventureInfo map_info, System.Action <AdventureInfo> callback) { m_AdvantureInfo = map_info; var detail = AdventureInfoManager.Instance.GetInfo(map_info.IDN); m_Progress.SetActive(false); m_Complete.SetActive(false); if (detail != null && detail.is_rewarded == false) { if (Network.Instance.ServerTime > detail.end_at) { m_Complete.SetActive(true); } else if (detail.is_begin && Network.Instance.ServerTime < detail.end_at) { m_Progress.SetActive(true); m_EndTime = detail.end_at; } } m_labelTitle.text = m_AdvantureInfo.Name; m_ToggleSprite.SetSpriteActive(false); m_Toggle.value = false; m_Toggle.Set(false); this.callback = callback; m_SpriteLock.gameObject.SetActive(m_AdvantureInfo.CheckCondition() != null); }
public void Init(string title, eGuildTabMode mode, System.Action<eGuildTabMode> callback) { m_LabelTitle.text = title; m_Mode = mode; m_Toggle.Set(false); m_Callback = callback; }
/// <summary> /// /// </summary> /// <param name="clearIndex"></param> /// <param name="clearSelectRsId"></param> private void ResetProccess(bool clearIndex = true, bool clearSelectRsId = true) { if (clearIndex) { m_em_selectEquipAttrIndex = ForgingProccessPropertyIndex.None; if (null != m_dic_propCBs) { UIToggle toggle = null; for (ForgingProccessPropertyIndex i = ForgingProccessPropertyIndex.One ; i < ForgingProccessPropertyIndex.Max; i++) { if (m_dic_propCBs.TryGetValue(i, out toggle) && null != toggle && toggle.value) { toggle.Set(false); } } } } if (clearSelectRsId) { m_uint_selectRSBaseId = 0; } }
public void DisableSkillBtn() { // this.skillData.skillConfig.isReleaseSkill = true; _toggle.Set(false); _skillBtn.isEnabled = false; // SkillManager.currentSkillID = "0"; }
//--------------------------------------------------------------------------- public void Init(Rune rune, bool is_lock, OnRuneClickDelegate _del, int slot_index = 0) { gameObject.SetActive(true); //GetComponent<BoxCollider2D>().enabled = (_del != null && rune != null) || is_lock == true; if (rune == null) { GetComponent <UIButtonScale>().enabled = false; } System.Array.ForEach(gameObject.GetComponentsInChildren(typeof(UIWidget), true), o => o.GetComponent <UIWidget>().enabled = true); m_toggle.Set(is_lock || rune == null); slot_number = slot_number != 0 ? slot_number : slot_index; if (rune != null) { m_LabelGrade.text = rune.Info.Grade.ToString(); m_LabelLevel.text = Localization.Format("HeroLevel", rune.Level); m_SpriteIcon.spriteName = rune.Info.IconID; } m_lock_toggle.Set(is_lock); Rune = rune; OnRuneClick = _del; m_Tooltip.span_press_time = OnRuneClick != null ? 0.2f : 0f; gameObject.GetComponent <UIButtonScale>().enabled = OnRuneClick != null; m_Tooltip.SetDisableTooltip(false); }
void Init(bool bBack) { m_Materials = new List <EnchantMaterial>(); for (int i = 0; i < 5; ++i) { EnchantMaterial material = EnchantMaterialPrefabManager.GetNewObject <EnchantMaterial>(m_MaterialGrid.transform, Vector3.zero); m_Materials.Add(material); material.Init(null); } m_MaterialGrid.Reposition(); if (bBack == false && (m_Creature.Grade >= 6 && m_Creature.Enchant >= 5)) { m_ToggleEnchant.Set(false); m_ToggleOverEnchant.Set(true); OverEnchantInit(); } else if (bBack == true && m_ToggleOverEnchant.value == true) { OverEnchantInit(); } else { EnchantInit(); } }
void SetFilterBtnStates(MapScrollItemType activeBtnType) { UIToggle toggle = null; Transform togglets = null; bool visible = (activeBtnType == MapScrollItemType.NPC); if (null != m_btn_npcitem) { togglets = m_btn_npcitem.transform.Find("Toggle"); if (null != togglets) { toggle = togglets.GetComponent <UIToggle>(); if (null != toggle && (toggle.value != visible)) { toggle.Set(visible); } } } visible = (activeBtnType == MapScrollItemType.Monster); if (null != m_btn_monster) { togglets = m_btn_monster.transform.Find("Toggle"); if (null != togglets) { toggle = togglets.GetComponent <UIToggle>(); if (null != toggle && (toggle.value != visible)) { toggle.Set(visible); } } } visible = (activeBtnType == MapScrollItemType.Transmit); if (null != m_btn_transmit) { togglets = m_btn_transmit.transform.Find("Toggle"); if (null != togglets) { toggle = togglets.GetComponent <UIToggle>(); if (null != toggle && (toggle.value != visible)) { toggle.Set(visible); } } } }
public void Init(string emblem, System.Action <string> _del) { OnClickDelegate = _del; m_ToggleSelected.Set(false); m_SpriteEmblem.spriteName = emblem; }
protected override void Start() { int local = PlayerPrefs.GetInt("_LOCAL", 0); localtoggle.Set(local == 1); OnChange(); //UnityMain.Instance.Timers.AddTimer(() => { Logicer.LoginServer(namelabel.text, pwdlabel.text); }, 0.1f); }
static int Set(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); UIToggle obj = (UIToggle)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIToggle"); bool arg0 = LuaScriptMgr.GetBoolean(L, 2); obj.Set(arg0); return(0); }
private void SetToogles(int autoState) { var isSelecte = autoState > -1; FullHouseCheckbox.Set(isSelecte && autoState <= CardTeam.TYPE_HL, false); FourOfKindCheckbox.Set(isSelecte && autoState <= CardTeam.TYPE_ZD, false); StraightFlushCheckbox.Set(isSelecte && autoState <= CardTeam.TYEP_THS, false); RoyalFlushCheckBox.Set(isSelecte && autoState <= CardTeam.TYPE_HJTHS, false); }
public void Init(MapStageDifficulty stage_info, System.Action <MapStageDifficulty> callback) { m_StageInfo = stage_info; m_labelTitle.text = stage_info.Name; m_Toggle.value = false; m_Toggle.Set(false); this.callback = callback; m_SpriteLock.gameObject.SetActive(stage_info.Condition != null && stage_info.Condition.CheckCondition() != null); }
public void Init(MapInfo map_info, System.Action <MapInfo> callback) { m_MapInfo = map_info; m_labelTitle.text = m_MapInfo.Name; //m_ToggleSprite.SetSpriteActive(false); m_Toggle.value = false; m_Toggle.Set(false); this.callback = callback; m_SpriteLock.gameObject.SetActive(m_MapInfo.CheckCondition() != null); }
private void OnEvent_TeamChange(IEvent ievent) { var e = ievent as TeamChangeEvent; if (e.Type == 10) { //InfotToggle.value = true; //TeamToggle.value = false; InfotToggle.Set(true); TeamToggle.Set(false); } }
public void UIShowOption(CircuitTopicNew var) { Debug.Log(var.OptionA); ButtonA.Set(false, false); ButtonB.Set(false, false); ButtonC.Set(false, false); Atrue.spriteName = "transparent"; Btrue.spriteName = "transparent"; Ctrue.spriteName = "transparent"; OptionA.text = "A. " + var.OptionA; OptionB.text = "B. " + var.OptionB; OptionC.text = "C. " + var.OptionC; answer = var.Answers; }
static public int Set(IntPtr l) { try { UIToggle self = (UIToggle)checkSelf(l); System.Boolean a1; checkType(l, 2, out a1); self.Set(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int Set(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIToggle obj = (UIToggle)ToLua.CheckObject <UIToggle>(L, 1); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.Set(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
//--------------------------------------------------------------------------- public void Init(Creature creature, bool is_checked, OnChangedLeaderSkillDelegate LeaderSkillChangedDelegate = null) { m_Toggle.Set(is_checked); m_Creature = creature; OnChangedLeaderSkill = LeaderSkillChangedDelegate; m_TeamSkill = creature.TeamSkill.Info; m_LeaderSkill.Init(m_Creature, PacketEnums.pe_UseLeaderSkillType.Manual); m_LabelName.text = m_TeamSkill.Name; m_LabelDesc.text = m_TeamSkill.Desc; gameObject.SetActive(true); }
private static int Set(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 2); UIToggle uIToggle = (UIToggle)ToLua.CheckObject(L, 1, typeof(UIToggle)); bool state = LuaDLL.luaL_checkboolean(L, 2); uIToggle.Set(state); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
private int mRootId; //上一级id /// <summary> /// 设置数据并显示 /// </summary> /// <param name="rootId">上一级id</param> /// <param name="data">配置表</param> public void SetData(int rootId, CreatRuleData data) { mRootId = rootId; this.ruledata = data; mLabelName.text = ruledata.name; eToggleType _type = (eToggleType)data.optionType; if (_type == eToggleType.toggle)//单选框 { mBackGround.spriteName = "toggle_yuan_di"; mCheckMark.spriteName = "toggle_yuan"; mCheckMark.MakePixelPerfect(); transform.localScale = Vector3.one * 1f; } else//复选框 { mBackGround.spriteName = "toggle_gou_di"; mCheckMark.spriteName = "toggle_gou"; mCheckMark.MakePixelPerfect(); mCheckMark.transform.localPosition = new Vector3(0, -8, 0);//对勾下移 一点 transform.localScale = Vector3.one * 1f; } if (data.none) { toggle.optionCanBeNone = true; } else { toggle.optionCanBeNone = false; } toggle.group = data.group; if (data.isSelected) { toggle.value = true; } else { toggle.Set(false); } }
public void Init(pd_GuildMemberInfoDetail memeber_info) { MemberInfo = memeber_info; m_SpriteProfile.spriteName = MemberInfo.leader_creature.GetProfileName(); m_LabelLevel.text = MemberInfo.player_level.ToString(); m_LabelName.text = MemberInfo.nickname; if (memeber_info.is_connected) { m_LabelTime.text = Localization.Get("UserConnected"); } else { m_LabelTime.text = Network.GetConnectedTimeString(MemberInfo.last_login_at); } m_LabelMemberState.text = Localization.Get(string.Format("GuildMemberState{0}", MemberInfo.member_state)); m_LabelExp.text = Localization.Format("GoodsFormat", MemberInfo.give); m_ToggleSelected.Set(MemberInfo.account_idx == SHSavedData.AccountIdx); }
void SetToggle(bool value) { UIToggle lastToggle = UIToggle.GetActiveToggle(1); int index = getIndexByToggle(lastToggle.name); if (value) { index++; } else { index--; } index = index <= 0 ? 1 : index; index = index >= 4 ? 3 : index; lastToggle.Set(false); UIToggle curToggle = getToggleByIndex(index); curToggle.Set(true); GameManager.Instance.SelectPlayerCount = index; }
/// <summary> /// Fade out or fade in the active sprite and notify the OnChange event listener. /// </summary> void Set(bool state) { if (!mStarted) { mIsActive = state; startsActive = state; if (activeSprite != null) { activeSprite.alpha = state ? 1f : 0f; } } else if (mIsActive != state) { // Uncheck all other toggles if (group != 0 && state) { for (int i = 0, imax = list.size; i < imax;) { UIToggle cb = list[i]; if (cb != this && cb.group == group) { cb.Set(false); } if (list.size != imax) { imax = list.size; i = 0; } else { ++i; } } } // Remember the state mIsActive = state; // Tween the color of the active sprite if (activeSprite != null) { if (instantTween) { activeSprite.alpha = mIsActive ? 1f : 0f; } else { TweenAlpha.Begin(activeSprite.gameObject, 0.15f, mIsActive ? 1f : 0f); } } current = this; if (EventDelegate.IsValid(onChange)) { EventDelegate.Execute(onChange); } else if (eventReceiver != null && !string.IsNullOrEmpty(functionName)) { // Legacy functionality support (for backwards compatibility) eventReceiver.SendMessage(functionName, mIsActive, SendMessageOptions.DontRequireReceiver); } current = null; // Play the checkmark animation if (activeAnimation != null) { ActiveAnimation aa = ActiveAnimation.Play(activeAnimation, state ? Direction.Forward : Direction.Reverse); if (instantTween) { aa.Finish(); } } } }
/// <summary> /// Fade out or fade in the active sprite and notify the OnChange event listener. /// If setting the initial value, call Start() first. /// </summary> public void Set(bool state, bool notify = true) { if (validator != null && !validator(state)) { return; } if (!mStarted) { mIsActive = state; startsActive = state; if (activeSprite != null) { activeSprite.alpha = invertSpriteState ? (state ? 0f : 1f) : (state ? 1f : 0f); } } else if (mIsActive != state) { // Uncheck all other toggles if (group != 0 && state) { for (int i = 0, imax = list.size; i < imax;) { UIToggle cb = list[i]; if (cb != this && cb.group == group) { cb.Set(false); } if (list.size != imax) { imax = list.size; i = 0; } else { ++i; } } } // Remember the state mIsActive = state; // Tween the color of the active sprite if (activeSprite != null) { if (instantTween || !NGUITools.GetActive(this)) { activeSprite.alpha = invertSpriteState ? (mIsActive ? 0f : 1f) : (mIsActive ? 1f : 0f); } else { TweenAlpha.Begin(activeSprite.gameObject, 0.15f, invertSpriteState ? (mIsActive ? 0f : 1f) : (mIsActive ? 1f : 0f)); } } if (notify && current == null) { UIToggle tog = current; current = this; if (EventDelegate.IsValid(onChange)) { EventDelegate.Execute(onChange); } else if (eventReceiver != null && !string.IsNullOrEmpty(functionName)) { // Legacy functionality support (for backwards compatibility) eventReceiver.SendMessage(functionName, mIsActive, SendMessageOptions.DontRequireReceiver); } current = tog; } // Play the checkmark animation if (animator != null) { ActiveAnimation aa = ActiveAnimation.Play(animator, null, state ? Direction.Forward : Direction.Reverse, EnableCondition.IgnoreDisabledState, DisableCondition.DoNotDisable); if (aa != null && (instantTween || !NGUITools.GetActive(this))) { aa.Finish(); } } else if (activeAnimation != null) { ActiveAnimation aa = ActiveAnimation.Play(activeAnimation, null, state ? Direction.Forward : Direction.Reverse, EnableCondition.IgnoreDisabledState, DisableCondition.DoNotDisable); if (aa != null && (instantTween || !NGUITools.GetActive(this))) { aa.Finish(); } } else if (tween != null) { bool isActive = NGUITools.GetActive(this); if (tween.tweenGroup != 0) { UITweener[] tws = tween.GetComponentsInChildren <UITweener>(true); for (int i = 0, imax = tws.Length; i < imax; ++i) { UITweener t = tws[i]; if (t.tweenGroup == tween.tweenGroup) { t.Play(state); if (instantTween || !isActive) { t.tweenFactor = state ? 1f : 0f; } } } } else { tween.Play(state); if (instantTween || !isActive) { tween.tweenFactor = state ? 1f : 0f; } } } } }
private void Set(bool state) { if (!mStarted) { mIsActive = state; startsActive = state; if (activeSprite != null) { activeSprite.alpha = ((!state) ? 0f : 1f); } } else if (mIsActive != state) { if (group != 0 && state) { int num = 0; int size = list.size; while (num < size) { UIToggle uIToggle = list[num]; if (uIToggle != this && uIToggle.group == group) { uIToggle.Set(state: false); } if (list.size != size) { size = list.size; num = 0; } else { num++; } } } mIsActive = state; if (activeSprite != null) { if (instantTween || !NGUITools.GetActive(this)) { activeSprite.alpha = ((!mIsActive) ? 0f : 1f); } else { TweenAlpha.Begin(activeSprite.gameObject, 0.15f, (!mIsActive) ? 0f : 1f); } } if (current == null) { UIToggle uIToggle2 = current; current = this; if (EventDelegate.IsValid(onChange)) { EventDelegate.Execute(onChange); } else if (eventReceiver != null && !string.IsNullOrEmpty(functionName)) { eventReceiver.SendMessage(functionName, mIsActive, SendMessageOptions.DontRequireReceiver); } current = uIToggle2; } if (this.activeAnimation != null) { ActiveAnimation activeAnimation = ActiveAnimation.Play(this.activeAnimation, null, state ? Direction.Forward : Direction.Reverse, EnableCondition.IgnoreDisabledState, DisableCondition.DoNotDisable); if (activeAnimation != null && (instantTween || !NGUITools.GetActive(this))) { activeAnimation.Finish(); } } } }
// Token: 0x060011E3 RID: 4579 RVA: 0x00086B78 File Offset: 0x00084D78 public void Set(bool state, bool notify = true) { if (this.validator != null && !this.validator(state)) { return; } if (!this.mStarted) { this.mIsActive = state; this.startsActive = state; if (this.activeSprite != null) { this.activeSprite.DIIHJCJOKMP = ((!this.invertSpriteState) ? ((!state) ? 0f : 1f) : ((!state) ? 1f : 0f)); } } else if (this.mIsActive != state) { if (this.group != 0 && state) { int i = 0; int bjgmibbegdq = UIToggle.list.BJGMIBBEGDQ; while (i < bjgmibbegdq) { UIToggle uitoggle = UIToggle.list.get_KNPPMKBOGDL(i); if (uitoggle != this && uitoggle.group == this.group) { uitoggle.Set(false, true); } if (UIToggle.list.BJGMIBBEGDQ != bjgmibbegdq) { bjgmibbegdq = UIToggle.list.BJGMIBBEGDQ; i = 0; } else { i++; } } } this.mIsActive = state; if (this.activeSprite != null) { if (!this.instantTween && IKBQNBHOJJB.PBBDNDMELHQ(this)) { EPIJJNOIKEK.FJCEGFKJLCL(this.activeSprite.gameObject, 0.15f, (!this.invertSpriteState) ? ((!this.mIsActive) ? 0f : 1f) : ((!this.mIsActive) ? 1f : 0f), 0f); } else { this.activeSprite.DIIHJCJOKMP = ((!this.invertSpriteState) ? ((!this.mIsActive) ? 0f : 1f) : ((!this.mIsActive) ? 1f : 0f)); } } if (notify && UIToggle.current == null) { UIToggle uitoggle2 = UIToggle.current; UIToggle.current = this; if (EventDelegate.CPPLNKNPLPI(this.onChange)) { EventDelegate.CPGBBDIDOID(this.onChange); } else if (this.eventReceiver != null && !string.IsNullOrEmpty(this.functionName)) { this.eventReceiver.SendMessage(this.functionName, this.mIsActive, SendMessageOptions.DontRequireReceiver); } UIToggle.current = uitoggle2; } if (this.animator != null) { QDBCMHDINGL qdbcmhdingl = QDBCMHDINGL.MLOIHHQMFBN(this.animator, null, (!state) ? QMDFDJEIEMO.Reverse : QMDFDJEIEMO.Forward, GKKIEDPNJIF.IgnoreDisabledState, PNDJHKBEPNM.DoNotDisable); if (qdbcmhdingl != null && (this.instantTween || !IKBQNBHOJJB.PBBDNDMELHQ(this))) { qdbcmhdingl.INNQKLOKBFL(); } } else if (this.activeAnimation != null) { QDBCMHDINGL qdbcmhdingl2 = QDBCMHDINGL.MLOIHHQMFBN(this.activeAnimation, null, (!state) ? QMDFDJEIEMO.Reverse : QMDFDJEIEMO.Forward, GKKIEDPNJIF.IgnoreDisabledState, PNDJHKBEPNM.DoNotDisable); if (qdbcmhdingl2 != null && (this.instantTween || !IKBQNBHOJJB.PBBDNDMELHQ(this))) { qdbcmhdingl2.INNQKLOKBFL(); } } else if (this.tween != null) { bool flag = IKBQNBHOJJB.PBBDNDMELHQ(this); if (this.tween.tweenGroup != 0) { UITweener[] componentsInChildren = this.tween.GetComponentsInChildren <UITweener>(true); int j = 0; int num = componentsInChildren.Length; while (j < num) { UITweener uitweener = componentsInChildren[j]; if (uitweener.tweenGroup == this.tween.tweenGroup) { uitweener.Play(state); if (this.instantTween || !flag) { uitweener.tweenFactor = ((!state) ? 0f : 1f); } } j++; } } else { this.tween.Play(state); if (this.instantTween || !flag) { this.tween.tweenFactor = ((!state) ? 0f : 1f); } } } } }