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; } }
private void popup_LostFocus(dfControl control, dfFocusEventArgs args) { if (this.popup != null && !this.popup.ContainsFocus) { this.closePopup(true); } }
public void OnLeaveFocus(dfControl sender, dfFocusEventArgs args) { if (closeOnLostFocus && !host.ContainsFocus && Application.isPlaying) { Close(); } }
protected internal override void OnLostFocus(dfFocusEventArgs args) { base.OnLostFocus(args); // This control needs to redraw itself when it loses focus Invalidate(); }
protected internal override void OnEnterFocus(dfFocusEventArgs args) { if (this.State != dfButton.ButtonState.Pressed) { this.State = dfButton.ButtonState.Focus; } base.OnEnterFocus(args); }
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; } }
protected internal override void OnLostFocus(dfFocusEventArgs args) { base.OnLostFocus(args); if (this.controls.Contains(args.LostFocus)) { this.showSelectedTab(); } }
protected internal override void OnGotFocus(dfFocusEventArgs args) { if (this.controls.Contains(args.GotFocus)) { this.SelectedIndex = args.GotFocus.ZOrder; } base.OnGotFocus(args); }
protected internal override void OnLeaveFocus(dfFocusEventArgs args) { base.OnLeaveFocus(args); this.cursorShown = false; this.ClearSelection(); this.Invalidate(); this.whenGotFocus = 0f; }
public void OnLeaveFocus( dfControl control, dfFocusEventArgs args ) { if( string.IsNullOrEmpty( _textbox.Text ) ) { _textbox.Text = promptText; _textbox.TextColor = promptColor; } }
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(); }
void FilterTextbox_LeaveFocus(dfControl control, dfFocusEventArgs args) { if (FilterTextbox.Text.Equals("")) { FilterText = false; FilterTextbox.Text = "Filter users..."; FilterText = true; } }
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(); } }
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(); } } }
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(); }
public void FocusEventProxy(dfControl control, dfFocusEventArgs args) { callProxyEventHandler(control, args); }
protected override void OnLeaveFocus( dfControl sender, dfFocusEventArgs args ) { base.OnLeaveFocus( sender, args ); updateButtons(); }
public void OnEnterFocus( dfControl control, dfFocusEventArgs args ) { display( "EnterFocus" ); }
protected internal override void OnEnterFocus( dfFocusEventArgs args ) { if( this.State != ButtonState.Pressed ) { this.State = ButtonState.Focus; } base.OnEnterFocus( args ); }
protected internal override void OnGotFocus( dfFocusEventArgs args ) { if( controls.Contains( args.GotFocus ) ) this.SelectedIndex = args.GotFocus.ZOrder; base.OnGotFocus( args ); }
protected internal override void OnLostFocus(dfFocusEventArgs args) { base.OnLostFocus(args); this.Invalidate(); }
protected virtual void EnterFocus( dfControl sender, dfFocusEventArgs args ) { sender.GetRootContainer().BringToFront(); }
private void FocusEventProxy( dfControl control, dfFocusEventArgs args ) { callProxyEventHandler(); }
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; }
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(); } }
protected internal override void OnLeaveFocus(dfFocusEventArgs args) { this.State = ButtonState.Default; base.OnLeaveFocus(args); }
private void scrollbar_GotFocus(dfControl control, dfFocusEventArgs args) { base.Focus(); }
protected internal override void OnGotFocus( dfFocusEventArgs args ) { if( args.Source != 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(); }
protected internal override void OnLostFocus( dfFocusEventArgs args ) { base.OnLostFocus( args ); if( controls.Contains( args.LostFocus ) ) showSelectedTab(); }
protected internal override void OnLostFocus( dfFocusEventArgs args ) { base.OnLostFocus( args ); // This control needs to redraw itself when it loses focus Invalidate(); }
private void FocusEventProxy(dfControl control, dfFocusEventArgs args) { this.callProxyEventHandler(); }
public void OnLeaveFocus( dfControl control, dfFocusEventArgs args ) { display( "LeaveFocus" ); }
public void OnLeaveFocus( dfControl sender, dfFocusEventArgs args ) { if( closeOnLostFocus && !host.ContainsFocus && Application.isPlaying ) { Close(); } }
protected internal override void OnLeaveFocus( dfFocusEventArgs args ) { this.State = ButtonState.Default; base.OnLeaveFocus( args ); }
public void FocusEventProxy( dfControl control, dfFocusEventArgs args ) { callProxyEventHandler( control, args ); }
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(); }