Beispiel #1
0
 private void BottomOptionFocused(dfControl control, dfFocusEventArgs args)
 {
     m_lastSelectedBottomRowControl = control;
     if (TabAudio.IsVisible)
     {
         TabAudio.Controls[TabAudio.Controls.Count - 1].GetComponent <BraveOptionsMenuItem>().down = m_lastSelectedBottomRowControl;
     }
     else if (TabVideo.IsVisible)
     {
         TabVideo.Controls[TabVideo.Controls.Count - 1].GetComponent <BraveOptionsMenuItem>().down = m_lastSelectedBottomRowControl;
     }
     else if (TabControls.IsVisible)
     {
         TabControls.Controls[TabControls.Controls.Count - 2].GetComponent <BraveOptionsMenuItem>().down = m_lastSelectedBottomRowControl;
     }
     else if (TabGameplay.IsVisible)
     {
         TabGameplay.Controls[TabGameplay.Controls.Count - 1].GetComponent <BraveOptionsMenuItem>().down = m_lastSelectedBottomRowControl;
     }
     else if (TabModTheGungeon.IsVisible)
     {
         TabModTheGungeon.Controls[TabModTheGungeon.Controls.Count - 2].GetComponent <BraveOptionsMenuItem>().down = m_lastSelectedBottomRowControl;
     }
     else if (TabKeyboardBindings.IsVisible)
     {
         TabKeyboardBindings.Controls[TabKeyboardBindings.Controls.Count - 1].GetComponent <KeyboardBindingMenuOption>().KeyButton.GetComponent <UIKeyControls>().down    = m_lastSelectedBottomRowControl;
         TabKeyboardBindings.Controls[TabKeyboardBindings.Controls.Count - 1].GetComponent <KeyboardBindingMenuOption>().AltKeyButton.GetComponent <UIKeyControls>().down = m_lastSelectedBottomRowControl;
     }
 }
Beispiel #2
0
 private void popup_LostFocus(dfControl control, dfFocusEventArgs args)
 {
     if (this.popup != null && !this.popup.ContainsFocus)
     {
         this.closePopup(true);
     }
 }
Beispiel #3
0
 public void OnLeaveFocus(dfControl sender, dfFocusEventArgs args)
 {
     if (closeOnLostFocus && !host.ContainsFocus && Application.isPlaying)
     {
         Close();
     }
 }
Beispiel #4
0
    protected internal override void OnLostFocus(dfFocusEventArgs args)
    {
        base.OnLostFocus(args);

        // This control needs to redraw itself when it loses focus
        Invalidate();
    }
Beispiel #5
0
 protected internal override void OnEnterFocus(dfFocusEventArgs args)
 {
     if (this.State != dfButton.ButtonState.Pressed)
     {
         this.State = dfButton.ButtonState.Focus;
     }
     base.OnEnterFocus(args);
 }
Beispiel #6
0
	public void OnEnterFocus( dfControl control, dfFocusEventArgs args )
	{
		if( _textbox.Text == promptText )
		{
			_textbox.Text = "";
		}
		_textbox.TextColor = textColor;
	}
 public void OnEnterFocus(dfControl control, dfFocusEventArgs args)
 {
     if (_textbox.Text == promptText)
     {
         _textbox.Text = "";
     }
     _textbox.TextColor = textColor;
 }
 public void OnLeaveFocus(dfControl control, dfFocusEventArgs args)
 {
     if (string.IsNullOrEmpty(_textbox.Text))
     {
         _textbox.Text      = promptText;
         _textbox.TextColor = promptColor;
     }
 }
Beispiel #9
0
 protected internal override void OnLostFocus(dfFocusEventArgs args)
 {
     base.OnLostFocus(args);
     if (this.controls.Contains(args.LostFocus))
     {
         this.showSelectedTab();
     }
 }
Beispiel #10
0
 protected internal override void OnGotFocus(dfFocusEventArgs args)
 {
     if (this.controls.Contains(args.GotFocus))
     {
         this.SelectedIndex = args.GotFocus.ZOrder;
     }
     base.OnGotFocus(args);
 }
Beispiel #11
0
 protected internal override void OnLeaveFocus(dfFocusEventArgs args)
 {
     base.OnLeaveFocus(args);
     this.cursorShown = false;
     this.ClearSelection();
     this.Invalidate();
     this.whenGotFocus = 0f;
 }
Beispiel #12
0
	public void OnLeaveFocus( dfControl control, dfFocusEventArgs args )
	{
		if( string.IsNullOrEmpty( _textbox.Text ) )
		{
			_textbox.Text = promptText;
			_textbox.TextColor = promptColor;
		}
	}
Beispiel #13
0
 protected internal override void OnGotFocus(dfFocusEventArgs args)
 {
     if (args.Source != this)
     {
         this.ScrollIntoView(args.Source);
     }
     base.OnGotFocus(args);
 }
 void scrollbar_GotFocus(dfControl control, dfFocusEventArgs args)
 {
     // We don't want the Listbox to lose focus just because the user
     // clicks on the scrollbar. The scrollbar will function just fine
     // without retaining focus, whereas the Listbox will not respond
     // to keys unless it has focus.
     this.Focus();
 }
Beispiel #15
0
 void FilterTextbox_LeaveFocus(dfControl control, dfFocusEventArgs args)
 {
     if (FilterTextbox.Text.Equals(""))
     {
         FilterText         = false;
         FilterTextbox.Text = "Filter users...";
         FilterText         = true;
     }
 }
Beispiel #16
0
    private void popup_LostFocus(dfControl control, dfFocusEventArgs args)
    {
        // TODO: Revisit popup_LostFocus() when non-mouse control of focus is enabled

        if (popup != null && !popup.ContainsFocus)
        {
            ClosePopup();
        }
    }
Beispiel #17
0
    void OnGotFocus( dfControl sender, dfFocusEventArgs args )
    {
        if( sender == Control )
        {

            var control =
                GetComponentsInChildren<dfControl>()
                .Where( c => c != Control && c.CanFocus )
                .OrderBy( c => c.RenderOrder )
                .FirstOrDefault();

            if( control != null )
            {
                control.Focus();
            }

        }
    }
Beispiel #18
0
 protected internal override void OnEnterFocus(dfFocusEventArgs args)
 {
     base.OnEnterFocus(args);
     this.undoText = this.Text;
     if (!this.ReadOnly)
     {
         this.whenGotFocus = Time.realtimeSinceStartup;
         base.StartCoroutine(this.doCursorBlink());
         if (!this.selectOnFocus)
         {
             int num  = 0;
             int num1 = num;
             this.selectionEnd   = num;
             this.selectionStart = num1;
         }
         else
         {
             this.selectionStart = 0;
             this.selectionEnd   = this.text.Length;
         }
     }
     this.Invalidate();
 }
Beispiel #19
0
 public void FocusEventProxy(dfControl control, dfFocusEventArgs args)
 {
     callProxyEventHandler(control, args);
 }
Beispiel #20
0
 protected override void OnLeaveFocus( dfControl sender, dfFocusEventArgs args )
 {
     base.OnLeaveFocus( sender, args );
     updateButtons();
 }
 public void OnEnterFocus( dfControl control, dfFocusEventArgs args )
 {
     display( "EnterFocus" );
 }
Beispiel #22
0
    protected internal override void OnEnterFocus( dfFocusEventArgs args )
    {
        if( this.State != ButtonState.Pressed )
        {
            this.State = ButtonState.Focus;
        }

        base.OnEnterFocus( args );
    }
Beispiel #23
0
    protected internal override void OnGotFocus( dfFocusEventArgs args )
    {
        if( controls.Contains( args.GotFocus ) )
            this.SelectedIndex = args.GotFocus.ZOrder;

        base.OnGotFocus( args );
    }
Beispiel #24
0
 protected internal override void OnLostFocus(dfFocusEventArgs args)
 {
     base.OnLostFocus(args);
     this.Invalidate();
 }
Beispiel #25
0
 protected internal override void OnEnterFocus(dfFocusEventArgs args)
 {
     base.OnEnterFocus(args);
     this.undoText = this.Text;
     if (!this.ReadOnly)
     {
         this.whenGotFocus = Time.realtimeSinceStartup;
         base.StartCoroutine(this.doCursorBlink());
         if (!this.selectOnFocus)
         {
             int num = 0;
             int num1 = num;
             this.selectionEnd = num;
             this.selectionStart = num1;
         }
         else
         {
             this.selectionStart = 0;
             this.selectionEnd = this.text.Length;
         }
     }
     this.Invalidate();
 }
Beispiel #26
0
 protected virtual void EnterFocus( dfControl sender, dfFocusEventArgs args )
 {
     sender.GetRootContainer().BringToFront();
 }
Beispiel #27
0
 protected internal override void OnLeaveFocus(dfFocusEventArgs args)
 {
     base.OnLeaveFocus(args);
     this.cursorShown = false;
     this.ClearSelection();
     this.Invalidate();
     this.whenGotFocus = 0f;
 }
Beispiel #28
0
 private void FocusEventProxy( dfControl control, dfFocusEventArgs args )
 {
     callProxyEventHandler();
 }
Beispiel #29
0
    protected internal override void OnLeaveFocus( dfFocusEventArgs args )
    {
        base.OnLeaveFocus( args );

        #if UNITY_IPHONE || UNITY_ANDROID || UNITY_BLACKBERRY || UNITY_WP8 || UNITY_EDITOR
        if( mobileKeyboard != null )
        {
            mobileKeyboard.active = false;
            mobileKeyboard = null;
        }
        #endif

        StopAllCoroutines();
        cursorShown = false;

        ClearSelection();

        Invalidate();

        whenGotFocus = 0f;
    }
Beispiel #30
0
	private void popup_LostFocus( dfControl control, dfFocusEventArgs args )
	{

		// TODO: Revisit popup_LostFocus() when non-mouse control of focus is enabled

		if( popup != null && !popup.ContainsFocus )
		{
			ClosePopup();
		}

	}
Beispiel #31
0
 protected internal override void OnLostFocus(dfFocusEventArgs args)
 {
     base.OnLostFocus(args);
     this.Invalidate();
 }
 protected internal override void OnLeaveFocus(dfFocusEventArgs args)
 {
     this.State = ButtonState.Default;
     base.OnLeaveFocus(args);
 }
Beispiel #33
0
 private void scrollbar_GotFocus(dfControl control, dfFocusEventArgs args)
 {
     base.Focus();
 }
Beispiel #34
0
    protected internal override void OnGotFocus( dfFocusEventArgs args )
    {
        if( args.Source != this )
        {
            ScrollIntoView( args.Source );
        }

        base.OnGotFocus( args );
    }
Beispiel #35
0
 void scrollbar_GotFocus( dfControl control, dfFocusEventArgs args )
 {
     // We don't want the Listbox to lose focus just because the user
     // clicks on the scrollbar. The scrollbar will function just fine
     // without retaining focus, whereas the Listbox will not respond
     // to keys unless it has focus.
     this.Focus();
 }
Beispiel #36
0
    protected internal override void OnLostFocus( dfFocusEventArgs args )
    {
        base.OnLostFocus( args );

        if( controls.Contains( args.LostFocus ) )
            showSelectedTab();
    }
Beispiel #37
0
 private void scrollbar_GotFocus(dfControl control, dfFocusEventArgs args)
 {
     base.Focus();
 }
    protected internal override void OnLostFocus( dfFocusEventArgs args )
    {
        base.OnLostFocus( args );

        // This control needs to redraw itself when it loses focus
        Invalidate();
    }
Beispiel #39
0
 private void FocusEventProxy(dfControl control, dfFocusEventArgs args)
 {
     this.callProxyEventHandler();
 }
 public void OnLeaveFocus( dfControl control, dfFocusEventArgs args )
 {
     display( "LeaveFocus" );
 }
Beispiel #41
0
 public void OnLeaveFocus( dfControl sender, dfFocusEventArgs args )
 {
     if( closeOnLostFocus && !host.ContainsFocus && Application.isPlaying )
     {
         Close();
     }
 }
Beispiel #42
0
 protected internal override void OnLeaveFocus( dfFocusEventArgs args )
 {
     this.State = ButtonState.Default;
     base.OnLeaveFocus( args );
 }
 public void FocusEventProxy( dfControl control, dfFocusEventArgs args )
 {
     callProxyEventHandler( control, args );
 }
Beispiel #44
0
    protected internal override void OnEnterFocus( dfFocusEventArgs args )
    {
        base.OnEnterFocus( args );

        this.undoText = this.Text;

        if( !ReadOnly )
        {

            whenGotFocus = Time.realtimeSinceStartup;
            StopAllCoroutines();
            StartCoroutine( doCursorBlink() );

            if( selectOnFocus )
            {
                selectionStart = 0;
                selectionEnd = text.Length;
            }
            else
            {
                selectionStart = selectionEnd = 0;
            }

        #if ( UNITY_IPHONE || UNITY_ANDROID || UNITY_BLACKBERRY || UNITY_WP8 ) && !UNITY_EDITOR
        if( useMobileKeyboard && mobileKeyboard == null && this.mobileKeyboardTrigger == dfMobileKeyboardTrigger.ShowOnFocus )
        {
            ClearSelection();
            SelectToEnd();
            TouchScreenKeyboard.hideInput = mobileHideInputField;
            mobileKeyboard = TouchScreenKeyboard.Open( this.text, (TouchScreenKeyboardType)mobileKeyboardType, mobileAutoCorrect, false, IsPasswordField );
        }
        #endif

        }

        Invalidate();
    }
Beispiel #45
0
 private void popup_LostFocus(dfControl control, dfFocusEventArgs args)
 {
     if (this.popup != null && !this.popup.ContainsFocus)
     {
         this.closePopup(true);
     }
 }