Пример #1
0
    private void OnClickColor(IUIObject obj)
    {
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.WHISPER_COLOR_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_COLOR_DLG);

            return;
        }
        WhisperColorDlg whisperColorDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.WHISPER_COLOR_DLG) as WhisperColorDlg;

        if (whisperColorDlg == null)
        {
            return;
        }
        float num = 1f;

        if (TsPlatform.IsMobile)
        {
            whisperColorDlg.SetLocation(base.GetLocation().x + (this.m_btChatColorChange.GetLocation().x + 50f) * num - whisperColorDlg.GetSizeX(), base.GetLocationY() + this.m_btChatColorChange.GetLocationY() * num - 5f - whisperColorDlg.GetSizeY());
        }
        else
        {
            whisperColorDlg.SetLocation(base.GetLocation().x + this.m_btChatColorChange.GetLocation().x, base.GetLocationY() + base.GetSize().y);
        }
    }
Пример #2
0
    private void OnClickColor(IUIObject obj)
    {
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.WHISPER_COLOR_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.WHISPER_COLOR_DLG);

            base.InteractivePanel.twinFormID = G_ID.NONE;
            return;
        }
        WhisperColorDlg whisperColorDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.WHISPER_COLOR_DLG) as WhisperColorDlg;

        if (whisperColorDlg == null)
        {
            return;
        }
        float num = 1f;

        if (TsPlatform.IsWeb)
        {
            num = 0.7f;
        }
        whisperColorDlg.SetLocation(base.GetLocation().x + (this.m_btSelectColor.GetLocation().x + 50f) * num - whisperColorDlg.GetSizeX(), base.GetLocationY() + this.m_btSelectColor.GetLocationY() * num - 5f - whisperColorDlg.GetSizeY());
        base.InteractivePanel.twinFormID = G_ID.WHISPER_COLOR_DLG;
    }