Beispiel #1
0
        protected override void OnObjectDoubleClick(IUIObject obj)
        {
            Location_PropertyPageViewModel loc = obj as Location_PropertyPageViewModel;
            Debug.Assert(loc != null);

            AnnotationOverlay.GoToLocation(loc.modelObj);
        }
Beispiel #2
0
Datei: Home.cs Projekt: pocdev/ar
	void onClick(IUIObject obj)
	{
		if(onClickedHomeButton != null)
			onClickedHomeButton();
			
		Application.LoadLevel(0);
	}
Beispiel #3
0
	void onClick(IUIObject obj)
	{
		_panel.Dismiss();
		
		if(onDismissed != null)
			onDismissed();
	}
Beispiel #4
0
	void onClick(IUIObject obj)
	{
		Debug.Log("TOGGLE CLICKED");
		Color tempCameraColor = _cameraText.color;
		_cameraText.SetColor(_targetText.color);
		_targetText.SetColor(tempCameraColor);
	}
Beispiel #5
0
	void onHit(IUIObject obj)
	{
		Debug.Log("Barrel Hit!");
		Vector3 randForce = Random.Range(0,1) > 0 ? Vector3.right : Vector3.left;
		randForce *= Random.Range(-500.0f,500.0f);
		
		obj.transform.rigidbody.AddForce((obj.transform.rigidbody.velocity + randForce) * -200);
		Destroy(this);
	}
Beispiel #6
0
        protected override void OnObjectDoubleClick(IUIObject obj)
        {
            Structure s = obj as Structure;
            Debug.Assert(s != null);

            LocationObj centerLoc = s.Center;
            if(centerLoc != null)
                AnnotationOverlay.GoToLocation(centerLoc);
        }
 /// <summary>
 /// Re-sort the list whenever it changes. (Callback)
 /// </summary>
 /// This is called when we click on a kerbal in the list, or when
 /// the red X next to a kerbal in the vessel crew is clicked.
 /// It is, unfortunately, not called when a kerbal is dragged into,
 /// out of, or within the list. The only way to detect that is to
 /// put an InputListener on each of those items, and that doesn't
 /// seem to give us a hook *after* the kerbal has been placed into
 /// the list, which means ATM we're SOL on really detecting drags.
 /// <param name="obj">?</param>
 protected void OnAvailListValueChanged(IUIObject obj)
 {
     try {
         sortBar.SortRoster();
     }
     catch( Exception e ) {
         Debug.LogError("KerbalSorter: Unexpected error in EditorHook: " + e);
     }
 }
Beispiel #8
0
	void onClick(IUIObject obj)
	{
		if(!animation.IsPlaying(_onClickAnim.animClip.name))
		{
		 	animation.CrossFadeQueued(_onClickAnim.animClip.name,0.3f,QueueMode.PlayNow);
			if(_onClickAnim.audioSource != null)
				_onClickAnim.audioSource.Play();
		}
	}
Beispiel #9
0
        public GenericTreeNode(IUIObject Obj)
            : base(Obj.ToString(), Obj.TreeImageIndex, Obj.TreeSelectedImageIndex)
        {
            this.Tag = Obj;
            Obj.AfterSave += new EventHandler(this.OnObjectSave);
            Obj.BeforeDelete += new EventHandler(this.OnObjectDelete);
            Obj.ChildChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(this.OnChildChanged);

            //Add a dummy node only if the object could have child nodes
            if(this.CanHaveChildren)
                this.Nodes.Add("Temporary Child Node");
        }
Beispiel #10
0
	public void scrollList_OnClick(IUIObject obj)
	{
		Transform parentTransform = list.LastClickedControl.transform.parent;
		parentTransform.FindChild("RadioButton").GetComponent<UIRadioBtn>().Value = true;
		
		if(parentTransform == previouslyClickedTransform)
		{
			LaunchButtonController.Instance.onClick(null);
		}
		else
		{
			previouslyClickedTransform = parentTransform;
		}
	}
Beispiel #11
0
	private void ItemChanged( IUIObject obj)
	{
		IUIListObject data = (IUIListObject)obj;
		curDot.transform.position = dots[ data.Index].transform.position;
		Debug.Log( "Item index : " + data.Index);
		selIndex = data.Index;
		
		AsIntroNoticeDlgItem dlgItem = data.gameObject.GetComponent<AsIntroNoticeDlgItem>();
		Debug.Assert( null != dlgItem);
		if( string.Empty == dlgItem.data)
			detailBtn.SetControlState( UIButton.CONTROL_STATE.DISABLED);
		else
			detailBtn.SetControlState( UIButton.CONTROL_STATE.NORMAL);
	}
Beispiel #12
0
	void onPressed(IUIObject obj)
	{
		_isPlaying = !_isPlaying;
		
		if(_isPlaying)
		{
			Debug.Log("PLAYING ANIMS");
			_scrubListener.startAnim(animationSpeed);
			_zoomPinch.resetScale();
		}
		else
		{
			Debug.Log("PAUSING ANIMS");			
			_scrubListener.stopAnim();
		}
	}
Beispiel #13
0
        protected static VikingForm Show(Dictionary<IUIObject, VikingForm> FormTable, System.Type FormType, IUIObject Object, System.Windows.Forms.Form ParentForm)
        {
            Debug.Assert(Object != null, "Cannot display properties for null object");
            if (Object == null)
                return null;

            VikingForm ShownForm;

            //return PropertySheetForm.Show(Object.Row, ParentForm);
            if (FormTable.ContainsKey(Object))
            {
                ShownForm = FormTable[Object] as VikingForm;
                ShownForm.Focus();
                return ShownForm;
            }

            return null;
        }
Beispiel #14
0
 private void BtnClickQuestList(IUIObject obj)
 {
     TreeView treeView = (TreeView)obj;
     int index = treeView.SelectedItem.GetIndex();
     UIListItemContainer selectedItem = treeView.SelectedItem;
     TreeView.TreeNode treeNode = (TreeView.TreeNode)selectedItem.Data;
     TREE_TYPE tREE_TYPE = treeNode.ObjectData as TREE_TYPE;
     if (tREE_TYPE.bType == 0)
     {
         treeView.ExpandNode(treeNode, index);
     }
     else if (tREE_TYPE.bType == 1)
     {
         if (this.m_eMode == QUESTLIST_TAB_MODE.Total)
         {
             this.m_CurQuestGroup = (CQuestGroup)tREE_TYPE.bData;
         }
         else if (this.m_eMode == QUESTLIST_TAB_MODE.OnGoing)
         {
             this.m_CurQuest = (CQuest)tREE_TYPE.bData;
             this.m_CurQuestGroup = NrTSingleton<NkQuestManager>.Instance.GetQuestGroupByQuestUnique(this.m_CurQuest.GetQuestUnique());
             this.m_QuestListInfo = (base.SetChildForm(G_ID.QUESTLISTINFO_DLG) as QuestListInfo_DLG);
             this.m_QuestListInfo.SetQuestInfo((CQuest)tREE_TYPE.bData);
             this.m_QuestListInfo.Show();
             if (this.m_DramaInfo != null)
             {
                 this.m_DramaInfo.Close();
             }
         }
         treeView.ExpandNode(treeNode, index);
     }
     else if (tREE_TYPE.bType == 2 && this.m_eMode == QUESTLIST_TAB_MODE.Total)
     {
         this.m_CurQuest = (CQuest)tREE_TYPE.bData;
         this.m_CurQuestGroup = NrTSingleton<NkQuestManager>.Instance.GetQuestGroupByQuestUnique(this.m_CurQuest.GetQuestUnique());
         this.m_QuestListInfo = (base.SetChildForm(G_ID.QUESTLISTINFO_DLG) as QuestListInfo_DLG);
         this.m_QuestListInfo.SetQuestInfo((CQuest)tREE_TYPE.bData);
         this.m_QuestListInfo.Show();
         if (this.m_DramaInfo != null)
         {
             this.m_DramaInfo.Close();
         }
     }
 }
Beispiel #15
0
    private void ClickTargetUser(IUIObject obj)
    {
        long num = (long)obj.Data;

        for (int i = 0; i < this.m_TargetInfoList.Count; i++)
        {
            if (this.m_TargetInfoList[i].PersonID == num)
            {
                MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

                if (msgBoxUI != null)
                {
                    string empty = string.Empty;
                    if (this.m_giftCostumeData != null)
                    {
                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("327"),
                            "Product",
                            NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeName(this.m_giftCostumeData.m_costumeUnique),
                            "targetname",
                            this.m_TargetInfoList[i].Name
                        });

                        msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKCostume), this.m_TargetInfoList[i].Name, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("845"), empty, eMsgType.MB_OK_CANCEL);
                    }
                    else
                    {
                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("327"),
                            "Product",
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(this.m_SelectItem.m_strTextKey),
                            "targetname",
                            this.m_TargetInfoList[i].Name
                        });

                        msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKEvent), this.m_TargetInfoList[i].Name, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("845"), empty, eMsgType.MB_OK_CANCEL);
                    }
                }
                return;
            }
        }
    }
Beispiel #16
0
    private void ClickSell(IUIObject obj)
    {
        if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_TICKET)
        {
            GS_POINT_BUY_REQ gS_POINT_BUY_REQ = new GS_POINT_BUY_REQ();
            gS_POINT_BUY_REQ.nAddPointType = 1;
            if (PointManager.HERO_TICKET == this.m_nSelectItemUnique)
            {
                gS_POINT_BUY_REQ.nType = 0;
            }
            else
            {
                gS_POINT_BUY_REQ.nType = 1;
            }
            gS_POINT_BUY_REQ.nItemUnique = this.m_nSelectItemUnique;
            gS_POINT_BUY_REQ.nItemNum    = (long)this.m_nSelectItemNum;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_POINT_BUY_REQ, gS_POINT_BUY_REQ);
        }
        else if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_ITEM)
        {
            GS_EXCHANGE_ITEM_REQ gS_EXCHANGE_ITEM_REQ = new GS_EXCHANGE_ITEM_REQ();
            gS_EXCHANGE_ITEM_REQ.nItemUnique = this.m_nSelectItemUnique;
            gS_EXCHANGE_ITEM_REQ.nItemNum    = (long)this.m_nSelectItemNum;
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2257");

            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("204");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromMessageBox, new object[]
            {
                textFromMessageBox,
                "targetname",
                NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_nSelectItemUnique),
                "count",
                this.m_nSelectItemNum
            });

            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI != null)
            {
                msgBoxUI.SetMsg(new YesDelegate(this.BuyItem), gS_EXCHANGE_ITEM_REQ, null, null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL);
            }
        }
    }
Beispiel #17
0
    private void ClickPlus(IUIObject obj)
    {
        GuildWarExchangeTable guildWarExchangeTable = (GuildWarExchangeTable)this.m_kSelectItem.Data;

        if (guildWarExchangeTable == null)
        {
            return;
        }
        this.m_nSelectItemNum++;
        int num = this.m_nTicketNum / guildWarExchangeTable.m_nNeedNum;

        if (this.m_nSelectItemNum > num)
        {
            this.m_nSelectItemNum = num;
        }
        this.m_nUseTicketNum = this.m_nSelectItemNum * guildWarExchangeTable.m_nNeedNum;
        this.m_kSellNum.Text = this.m_nSelectItemNum.ToString();
        this.SetUsetTicketNum();
    }
        /// <inheritdoc/>
        public virtual void ScrollTo(TimeSpan timeout)
        {
            if (!VisibleOnScreen)
            {
                // find a visible ancestor.
                IUIObject ancestor = this;
                while (!ancestor.VisibleOnScreen)
                {
                    if (ancestor.Parent is IRootObject)
                    {
                        throw new InvalidOperationException("Could not scroll to " + GetType().Name + ". Found no parent object that is visible on screen.");
                    }

                    ancestor = ancestor.Parent;
                }

                (ancestor as IUIObjectInternal).ScrollTo(this, timeout);
            }
        }
 public void HitEffect(IUIObject control, GameObject obj)
 {
     if (control == null || null == obj)
     {
         return;
     }
     for (int i = 0; i < 2; i++)
     {
         for (int j = 0; j < 6; j++)
         {
             if (this.m_obSoldier[i][j].m_dtBG == control)
             {
                 this.m_obSoldier[i][j].m_goHitEffect = obj;
                 this.m_obSoldier[i][j].m_goHitEffect.transform.localScale = new Vector3(1.3f, 1.3f, 1f);
                 this.m_obSoldier[i][j].m_goHitEffect.SetActive(false);
             }
         }
     }
 }
    private void OnClickSol(IUIObject obj)
    {
        Button button = (Button)obj;

        if (null != button)
        {
            NkSoldierInfo soldierInfo = this.m_SolList.GetSoldierInfo(button.TabIndex);
            if (soldierInfo != null)
            {
                DLG_OtherCharEquipment dLG_OtherCharEquipment = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_OTHER_CHAR_EQUIPMENT) as DLG_OtherCharEquipment;

                if (dLG_OtherCharEquipment != null)
                {
                    dLG_OtherCharEquipment.SetSolStatInfo(soldierInfo);
                }
            }
            this.UpdateSoldieInfo(button.TabIndex);
        }
    }
    public void ChatDlg(IUIObject obj)
    {
        if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BABELTOWER_CHAT))
        {
            NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.BABELTOWER_CHAT);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.EMOTICON_DLG);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_COLOR_DLG);
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BABELTOWER_CHAT);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.EMOTICON_DLG);

            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_COLOR_DLG);
        }
    }
    public void ClickMax(IUIObject obj)
    {
        if (this.m_BaseComposeData == null)
        {
            return;
        }
        int num = NrTSingleton <ITEM_COMPOSE_Manager> .Instance.CanComposeItemNum(this.m_BaseComposeData, -1);

        if (num <= 0)
        {
            this.m_NowSelectItemCount = 1;
        }
        else
        {
            this.m_NowSelectItemCount = num;
        }
        this.ReloadSelectItemCount();
        this.ReloadMaterialList();
    }
Beispiel #23
0
    public void ClickList(IUIObject obj)
    {
        if (null == this.m_kParentDropDownList)
        {
            return;
        }
        UIListItemContainer selectedItem = this.m_kListBox.SelectedItem;

        if (null != selectedItem)
        {
            int selectIndex = this.m_kListBox.SelectIndex;
            this.m_kParentDropDownList.SetSelectedItem(selectIndex);
            if (null != this.m_kParentDropDownList.SelectedItem)
            {
                this.m_kParentDropDownList.DidClick(this.m_kParentDropDownList.SelectedItem);
            }
        }
        this.Close();
    }
 private void ClickAutoQuality(IUIObject obj)
 {
     if (this.tabIndex == 1)
     {
         TsQualityManager.Instance.RecoveryCustomSettings();
         int optimizedQualityLevel = (int)NrHardwareIndex.GetOptimizedQualityLevel();
         int num = Mathf.Clamp(optimizedQualityLevel, 0, this.m_Quality.Length - 1);
         this.m_Quality[num].Value = true;
         this.Graphic_Reset();
     }
     else if (this.tabIndex == 2)
     {
         this.Sound_Reset();
     }
     else if (this.tabIndex == 4)
     {
         this.CameraRotate_Reset();
     }
 }
Beispiel #25
0
    private void ListBoxSelect(IUIObject obj)
    {
        ListBox             listBox      = (ListBox)obj;
        UIListItemContainer selectedItem = listBox.SelectedItem;

        if (selectedItem == null)
        {
            return;
        }
        if (selectedItem.Data != null)
        {
            UI_RightClickMenu.callbackData callbackData = (UI_RightClickMenu.callbackData)selectedItem.Data;
            callbackData.callback(callbackData.data);
            if (callbackData.bCloseRightUI)
            {
                this.Close();
            }
        }
    }
Beispiel #26
0
    private void OnItemToolTip(IUIObject a_oObject)
    {
        ItemTexture itemTexture = a_oObject as ItemTexture;

        if (itemTexture != null)
        {
            ITEM iTEM = itemTexture.Data as ITEM;
            if (iTEM != null && iTEM.m_nItemUnique > 0)
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.TOOLTIP_DLG);

                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ITEMTOOLTIP_DLG);

                ItemTooltipDlg itemTooltipDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ITEMTOOLTIP_DLG) as ItemTooltipDlg;

                itemTooltipDlg.Set_Tooltip((G_ID)base.WindowID, iTEM, null, false);
            }
        }
    }
Beispiel #27
0
 private void ClickMinus(IUIObject obj)
 {
     this.m_nSelectItemNum--;
     if (1 >= this.m_nSelectItemNum)
     {
         this.m_nSelectItemNum = 1;
     }
     this.m_kSellNum.Text = this.m_nSelectItemNum.ToString();
     if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_ITEM)
     {
         PointTable pointTable = (PointTable)this.m_kSelectItem.Data;
         if (pointTable == null)
         {
             return;
         }
         this.m_nUseTicketNum = this.m_nSelectItemNum * pointTable.m_nExchangePoint;
         this.SetUsetTicketNum();
     }
 }
Beispiel #28
0
    private void Click_Adventure(IUIObject Obj)
    {
        if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.ADVENTURE_DLG))
        {
            AdventureDlg adventureDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.ADVENTURE_DLG) as AdventureDlg;

            if (adventureDlg != null)
            {
                adventureDlg.DrawAdventure();
            }
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ADVENTURE", "OPEN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.ADVENTURE_DLG);

            TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ADVENTURE", "CLOSE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
    }
    public void OnPlunderStart(IUIObject obj)
    {
        if (!SoldierBatch.SOLDIERBATCH.IsHeroBatch())
        {
            string     empty = string.Empty;
            NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"),
                "charname",
                @char.GetCharName()
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_COOLTIME);
        long dueDateTick = PublicMethod.GetDueDateTick(charSubData);

        if (dueDateTick > 0L)
        {
            string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94");

            string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("24");

            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            msgBoxUI.SetMsg(new YesDelegate(this.OnStartMatch), null, textFromMessageBox, textFromMessageBox2, eMsgType.MB_OK_CANCEL, 2);
            return;
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
        int maxSolArray = SoldierBatch.SOLDIERBATCH.GetMaxSolArray();

        if (solBatchNum < maxSolArray)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnStartMatch), solBatchNum, maxSolArray);
            return;
        }
        this.OnStartMatch(null);
    }
    private void ClickToolBar(IUIObject obj)
    {
        UIPanelTab uIPanelTab = (UIPanelTab)obj;

        if (uIPanelTab.panel.index == uIPanelTab.panelManager.CurrentPanel.index)
        {
            return;
        }
        this.tabIndex = uIPanelTab.panel.index + 1;
        if (this.tabIndex == 6)
        {
            this.tabIndex = 8;
        }
        if (this.tabIndex == 5)
        {
            this.tabIndex = 8;
        }
        base.ShowLayer(this.tabIndex);
    }
Beispiel #31
0
    private void OnClickTab(IUIObject obj)
    {
        UIPanelTab uIPanelTab = obj as UIPanelTab;
        CHAT_TYPE  cHAT_TYPE  = (CHAT_TYPE)uIPanelTab.panel.index;

        if (cHAT_TYPE == this.m_SelectTab)
        {
            return;
        }
        this.m_SelectTab = cHAT_TYPE;
        base.ShowLayer((int)(this.m_SelectTab + 1), 5);
        string arg = string.Empty;

        switch (cHAT_TYPE)
        {
        case CHAT_TYPE.NORMAL:
            arg = this._ChatTabDefine.TabName[0];
            break;

        case CHAT_TYPE.GUILD:
            arg = this._ChatTabDefine.TabName[1];
            break;

        case CHAT_TYPE.PARTY:
            arg = this._ChatTabDefine.TabName[2];
            break;

        case CHAT_TYPE.BATTLE:
            arg = this._ChatTabDefine.TabName[3];
            break;

        case CHAT_TYPE.WATCH:
            arg = this._ChatTabDefine.TabName[6];
            break;
        }
        this.lbChatType.SetText(string.Format("{0}[{1}]", NrTSingleton <CTextParser> .Instance.GetTextColor(MainChatDlg.GetChatColorKey(this.m_SelectTab)), arg));
        if (cHAT_TYPE != CHAT_TYPE.NORMAL && this._Manager.GetUniqueFromMegType(cHAT_TYPE) <= 0)
        {
            this._ToolBar.SetSelectTabIndex((int)this.m_SelectTab);
            return;
        }
        this.ChangeTab(cHAT_TYPE);
    }
    public void OnItemConfirm(IUIObject obj)
    {
        if (this.m_SelectItem != null)
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.REFORGERESULT_DLG);

            ReforgeMainDlg reforgeMainDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.REFORGEMAIN_DLG) as ReforgeMainDlg;

            if (reforgeMainDlg != null)
            {
                reforgeMainDlg.Set_Value(this.m_SelectItem);
                reforgeMainDlg.SetSolID(this.m_SolID);
            }
        }
        else
        {
            TsLog.Log("m_SelectItem == null", new object[0]);
        }
    }
Beispiel #33
0
    public void ClickShareReply(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        INFIBATTLE_RECORDINFO iNFIBATTLE_RECORDINFO = (INFIBATTLE_RECORDINFO)obj.Data;

        if (iNFIBATTLE_RECORDINFO == null)
        {
            return;
        }
        Battle_ShareReplayDlg battle_ShareReplayDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BATTLE_SHAREREPLAY_DLG) as Battle_ShareReplayDlg;

        if (battle_ShareReplayDlg != null)
        {
            battle_ShareReplayDlg.SetReplayInfo(3, iNFIBATTLE_RECORDINFO.i64InfinityBattleRecordID);
        }
    }
Beispiel #34
0
    private void Click_PreViewHero(IUIObject obj)
    {
        if (this.pkSolinfo == null)
        {
            return;
        }
        if (this.pkSolinfo.GetCharKindInfo() == null)
        {
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI == null)
        {
            return;
        }
        msgBoxUI.SetMsg(new YesDelegate(this.MessageBox_PreviewHero), this.pkSolinfo, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3293"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("438"), eMsgType.MB_OK_CANCEL, 2);
        msgBoxUI.Show();
    }
Beispiel #35
0
    public void OnClickTab(IUIObject obj)
    {
        UIPanelTab uIPanelTab = obj as UIPanelTab;

        if (uIPanelTab.panel.index == uIPanelTab.panelManager.CurrentPanel.index)
        {
            return;
        }
        NrTSingleton <MineManager> .Instance.Send_GS_MINE_BATTLE_RESULT_LIST_REQ(uIPanelTab.panel.index == 1, 1, false);

        if (uIPanelTab.panel.index == 1)
        {
            this.m_btAll.Hide(true);
        }
        else
        {
            this.m_btAll.Hide(false);
        }
    }
    private void ClickToolbar(IUIObject obj)
    {
        UIPanelTab uIPanelTab = (UIPanelTab)obj;

        if (uIPanelTab.panel.index == uIPanelTab.panelManager.CurrentPanel.index)
        {
            return;
        }
        if (uIPanelTab.panel.index == 0)
        {
            this.m_ToolBar.SetSelectTabIndex(uIPanelTab.panel.index);
            this.SetLegend();
        }
        else if (uIPanelTab.panel.index == 1)
        {
            this.m_ToolBar.SetSelectTabIndex(uIPanelTab.panel.index);
            this.SetEvolution();
        }
    }
Beispiel #37
0
 private void OnClickPartyRank(IUIObject obj)
 {
     this.isSoloMode       = false;
     this.currentPageIndex = 1;
     this.tb_Rank.Control_Tab[0].spriteText.transform.localPosition       = new Vector3(this.disablePosition[0].x, this.disablePosition[0].y, this.disablePosition[0].z - 0.1f);
     this.tb_Rank.Control_Tab[0].spriteTextShadow.transform.localPosition = this.disablePosition[0];
     this.tb_Rank.Control_Tab[1].spriteText.transform.localPosition       = new Vector3(this.enablePosition[1].x, this.enablePosition[1].y, this.enablePosition[1].z - 0.1f);
     this.tb_Rank.Control_Tab[1].spriteTextShadow.transform.localPosition = this.enablePosition[1];
     this.tb_Rank.Control_Tab[2].spriteText.transform.localPosition       = new Vector3(this.disablePosition[2].x, this.disablePosition[2].y, this.disablePosition[2].z - 0.1f);
     this.tb_Rank.Control_Tab[2].spriteTextShadow.transform.localPosition = this.disablePosition[2];
     this.tb_Rank.Control_Tab[0].SetText(NrTSingleton <CTextParser> .Instance.GetTextColor("1102") + this.tb_Rank.Control_Tab[0].GetText());
     this.tb_Rank.Control_Tab[1].SetText(NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + this.tb_Rank.Control_Tab[1].GetText());
     this.tb_Rank.Control_Tab[2].SetText(NrTSingleton <CTextParser> .Instance.GetTextColor("1102") + this.tb_Rank.Control_Tab[2].GetText());
     this.ShowRank();
     this.SetMyInfo();
     base.SetShowLayer(1, true);
     base.SetShowLayer(2, false);
     base.SetShowLayer(3, false);
 }
Beispiel #38
0
    public void OnEventCreateUser(IUIObject obj)
    {
        Button button = obj as Button;

        if (!this.m_SelectForm.GetShowChar(button.TabIndex))
        {
            this.m_CameraAniPlay.Add(E_CHAR_SELECT_STEP.CREATE_SELECT, new Action <object>(this._OnRaceSelect), new object[]
            {
                E_CAMARA_STATE_ANI.INTRO1,
                E_CAMARA_STATE_ANI.INTROTOCREATE
            });
            NrTSingleton <FormsManager> .Instance.Hide(G_ID.CHAR_SELECT_DLG);

            this.m_isConnectGameServer = false;
            this.m_SelectStep          = E_CHAR_SELECT_STEP.INTRO;
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CUSTOMIZING", "CHAR-CREATION", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
            NmMainFrameWork.RemoveBGM(false);
        }
    }
    public void BtClickSearch(IUIObject obj)
    {
        string text = this.m_lbFloorText.GetText();
        short  num  = short.Parse(text);

        if (num < 1 || num > NrTSingleton <BabelTowerManager> .Instance.GetLastFloor(this.m_nFloorType))
        {
            return;
        }
        this.m_nCurMinFloor = num;
        this.m_nCurMaxFloor = num;
        this.m_nSearchFloor = num;
        GS_BABELTOWER_OPENROOMLIST_GET_REQ gS_BABELTOWER_OPENROOMLIST_GET_REQ = new GS_BABELTOWER_OPENROOMLIST_GET_REQ();

        gS_BABELTOWER_OPENROOMLIST_GET_REQ.search_startfloor  = this.m_nCurMinFloor;
        gS_BABELTOWER_OPENROOMLIST_GET_REQ.search_finishfloor = this.m_nCurMaxFloor;
        gS_BABELTOWER_OPENROOMLIST_GET_REQ.FloorType          = this.m_nFloorType;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_OPENROOMLIST_GET_REQ, gS_BABELTOWER_OPENROOMLIST_GET_REQ);
    }
Beispiel #40
0
    private void ClickDownLoad(IUIObject obj)
    {
        if (!this.bDown)
        {
            NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.CONVER_PLATFORMID_DLG);
        }
        else
        {
            MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

            if (msgBoxUI == null)
            {
                return;
            }
            msgBoxUI.SetMsg(new YesDelegate(this.OnOKDownStart), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2458"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("213"), eMsgType.MB_OK_CANCEL, 2);
            msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("10"));
            msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("11"));
        }
    }
Beispiel #41
0
    private void OnClickUserState(IUIObject obj)
    {
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.WHISPER_WHISPERPOPUPMENU_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_WHISPERPOPUPMENU_DLG);

            base.InteractivePanel.twinFormID = G_ID.NONE;
        }
        else
        {
            WhisperPopupMenu whisperPopupMenu = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.WHISPER_WHISPERPOPUPMENU_DLG) as WhisperPopupMenu;

            if (whisperPopupMenu != null)
            {
                whisperPopupMenu.SetClickType(eWHISPER_POPUP_TYPE.STATE, null);
                base.InteractivePanel.twinFormID = G_ID.WHISPER_WHISPERPOPUPMENU_DLG;
            }
        }
    }
    private void OnClickItemRemove(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        ITEM equipItem = this.pkSolinfo.GetEquipItem((int)this.eEquipItemPos);

        if (equipItem == null)
        {
            return;
        }
        if (this.pkSolinfo == null)
        {
            this.CloseForm(null);
            return;
        }
        Protocol_Item.Send_EquipSol_InvenEquip(equipItem, this.pkSolinfo.GetSolID());
    }
Beispiel #43
0
    public void OnClickOK(IUIObject obj)
    {
        if (!this.bCheck01 && !this.bCheck02)
        {
            return;
        }
        GS_CONSECUTIVELY_ATTENDACNE_REQ gS_CONSECUTIVELY_ATTENDACNE_REQ = new GS_CONSECUTIVELY_ATTENDACNE_REQ();

        if (this.bCheck01)
        {
            gS_CONSECUTIVELY_ATTENDACNE_REQ.i8TotalNum = (byte)this.m_DT_CheckBox01.data;
        }
        else if (this.bCheck02)
        {
            gS_CONSECUTIVELY_ATTENDACNE_REQ.i8TotalNum = (byte)this.m_DT_CheckBox02.data;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CONSECUTIVELY_ATTENDACNE_REQ, gS_CONSECUTIVELY_ATTENDACNE_REQ);
        this.Close();
    }
Beispiel #44
0
	public void onClick(IUIObject obj)
	{
		UIRadioBtn selectedRadioButton = (UIRadioBtn)RadioBtnGroup.GetSelected(0);
		
		if(selectedRadioButton == null)
			return;
		
		string levelName = selectedRadioButton.transform.parent.name;
		levelName = levelName.Substring(0,levelName.IndexOf('('));
		
		Debug.Log(string.Format("levelname is {0}",levelName.ToLower()));
				
		if(_toggle.StateName == "Camera")
		{
			_loadingLogo.enabled = true;
			_noPreviewAvailable.enabled = false;
			ImagePreview.Instance.Hide();
			
			if(levelName.ToLower() == "fandango")
			{
				Handheld.PlayFullScreenMovie("http://poc.bentlight.com/_content/fandango/Fandango/Fandango.mp4");
			}
			else if(levelName.ToLower() == "standalone")
			{
				string URL = (Application.platform == RuntimePlatform.OSXEditor) ? "http://www.google.com" : "POCARStandalone://";
				Application.OpenURL(URL);
			}
			else
			{
				StartCoroutine(doLevelLoad(levelName));
			}
		}
		else
		{
			_loadingLogo.enabled = false;
			ImagePreview.Instance.Show();
			_panelManager.MoveForward();
		}
		
	}
Beispiel #45
0
 public void OnOtherButtonClick(IUIObject obj) //reset EditorPanel if needed
 {
     //only run this if the Action Panel was hidden by other code
     if(AGXShow)
     {
         EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.actions);
     }
     AGEditorSelectedParts.Clear();
     
 }
Beispiel #46
0
 public void OnLoadButtonClick(IUIObject obj)
 {
     EditorSaveToFile();
     checkShipsExist = true;
     //print("ship count1 ");
     //EditorStartPodDialog loadShipWin = FindObjectOfType<EditorStartPodDialog>();
     //print("ship count " + loadShipWin.availablePods.Count);
 }
Beispiel #47
0
 public void OnSaveButtonClick(IUIObject obj)
 {
     EditorSaveToFile();
 }
Beispiel #48
0
	// Is called when the optional slider control
	// is moved.
	public void SliderMoved(IUIObject slider)
	{
		ScrollListTo_Internal(((UISlider)slider).Value);
	}
Beispiel #49
0
	/// <summary>
	/// Empties the contents of the list entirely.
	/// Destroys the items if instructed, otherwise
	/// it just deactivates them.
	/// </summary>
	/// <param name="destroy">When true, the list items are actually destroyed. Otherwise, they are deactivated.</param>
	public void ClearList(bool destroy)
	{
		RemoveItemsFromContainer();

		selectedItem = null;
		lastClickedControl = null;

		for(int i=0; i<items.Count; ++i)
		{
			// Move them out of the mover object
			// and into the root of the scene
			// hierarchy:
			items[i].transform.parent = null;

			if (destroy)
				Destroy(items[i].gameObject);
			else
				items[i].gameObject.SetActiveRecursively(false);
		}

		visibleItems.Clear();
		items.Clear();
		PositionItems();
	}
Beispiel #50
0
	/// <summary>
	/// Removes the item at the specified index.
	/// Remaining items are repositioned to fill
	/// the gap.
	/// The removed item is destroyed if 'destroy'
	/// is true. Otherwise, it is deactivated.
	/// </summary>
	/// <param name="index">Index of the item to remove.</param>
	public void RemoveItem(int index, bool destroy)
	{
		if (index < 0 || index >= items.Count)
			return;

		// Remove the item from our container:
		if (container != null)
			container.RemoveChild(items[index].gameObject);

		// Unselect it, if necessary:
		if(selectedItem == items[index])
		{
			selectedItem = null;
			items[index].selected = false;
		}
		
		// Null out our last clicked control if this is it:
		if (lastClickedControl != null &&
			(lastClickedControl == items[index] || (lastClickedControl.Container != null && lastClickedControl.Container.Equals(items[index]))) )
			lastClickedControl = null;

		// Remove the item from our visible list, if it's there:
		visibleItems.Remove(items[index]);

		if (destroy)
		{
			items[index].Delete();
			Destroy(items[index].gameObject);
		}
		else
		{
			// Move to the root of the hierarchy:
			items[index].transform.parent = null;
			// Deactivate:
			items[index].gameObject.SetActiveRecursively(false);
		}

		items.RemoveAt(index);

		// Reposition our items:
		PositionItems();
	}
Beispiel #51
0
	// Is called when the optional slider control
	// is moved.
	public void SliderMoved(IUIObject slider)
	{
		if (amtOfPlay <= 0)
		{
			if (((UISlider)slider).Value > 0)
				((UISlider)slider).Value = 0;
		}

		ScrollListTo_Internal(((UISlider)slider).Value);
	}
	/// <summary>
	/// Removes a control from being processed by the screen.
	/// </summary>
	/// <param name="obj">The object to be removed.</param>
	public void RemoveControl(IUIObject obj)
	{
		controls.Remove(obj);
		obj.RemoveInputDelegate(InputProcessor);
	}
Beispiel #53
0
	void ChangeVolume(IUIObject volumeSlider)
	{
		Save.Set(PlayerPrefsKeys.VOLUME.ToString(), soundVolumeSlider.Value, true);
	}
	/// <summary>
	/// Adds a control to be processed by the screen.
	/// </summary>
	/// <param name="obj">The control to be processed.</param>
	public void AddControl(IUIObject obj)
	{
		if (obj == null)
			return;

		controls.Add(obj);
		obj.AddInputDelegate(InputProcessor);
	}
	public EZDragDropHelper(IUIObject h)
	{
		host = h;
		dragPosUpdateDel = DefaultDragUpdatePosition;
	}
	/// <summary>
	/// Constructs an EZDragDropParams object.
	/// </summary>
	/// <param name="e">The drag/drop event that occurred.</param>
	/// <param name="obj">The object being dragged.</param>
	/// <param name="p">The pointer involved in the drag/drop operation.</param>
	public EZDragDropParams(EZDragDropEvent e, IUIObject obj, POINTER_INFO p)
	{
		evt = e;
		dragObj = obj;
		ptr = p;
	}
Beispiel #57
0
 public void OnUIChanged(IUIObject obj)
 {
  
     if (EditorLogic.fetch.editorScreen == EditorLogic.EditorScreen.Actions) //we in action groups mode?
     {
         if (AGXShow)
         {
             EditorPanels.Instance.panelManager.Dismiss(); //show AGX? hide panel
         }
         else
         {
             EditorPanels.Instance.panelManager.BringIn(EditorPanels.Instance.actions); //hide AGX? show panel
         }
     }
 }
Beispiel #58
0
	// Called by a list button when it is clicked
	public void DidClick(IUIObject item)
	{
		lastClickedControl = item;

		if (scriptWithMethodToInvoke != null)
			scriptWithMethodToInvoke.Invoke(methodToInvokeOnSelect, 0);
		if (changeDelegate != null)
			changeDelegate(this);
	}
	public void Retarget(IUIObject newTarget)
	{
		UIManager.instance.Retarget(_catcher, newTarget);
	}
Beispiel #60
0
	/// <summary>
	/// Empties the contents of the list entirely.
	/// Destroys the items if instructed, otherwise
	/// it just deactivates them.
	/// </summary>
	/// <param name="destroy">When true, the list items are actually destroyed. Otherwise, they are deactivated.</param>
	public void ClearList(bool destroy)
	{
		RemoveItemsFromContainer();

		selectedItem = null;
		lastClickedControl = null;

		for (int i = 0; i < items.Count; ++i)
		{
			// Move them out of the mover object
			// and into the root of the scene
			// hierarchy:
			items[i].transform.parent = null;

#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
			items[i].gameObject.SetActive(false);
#else
			items[i].gameObject.SetActiveRecursively(false);
#endif

			if (destroy)
			{
				clearQueue.Enqueue(items[i]);
			}
		}

		if (destroy)
			StartCoroutine("ProcessClearQueue");

		visibleItems.Clear();
		items.Clear();
		PositionItems();
	}