Nez.Portable/UI/Widgets/TextField.cs
/// <summary>
/// Focuses the next TextField. If none is found, the keyboard is hidden. Does nothing if the text field is not in a stage
/// up: If true, the TextField with the same or next smallest y coordinate is found, else the next highest.
/// </summary>
/// <param name="up">Up.</param>
Focuses the next TextField. If none is found, the keyboard is hidden. Does nothing if the text field is not in a stage
up: If true, the TextField with the same or next smallest y coordinate is found, else the next highest.
Focuses the next TextField . If none is found the keyboard is hidden . Does nothing if the text field is not in a stage up : If true the TextField with the same or next smallest y coordinate is found else the next highest .
public void next(bool up)
        {
            var stage = getStage();
            if (stage == null)
                return;
            var tmp2 = Vector2.Zero;
            var tmp1 = getParent().localToStageCoordinates(new Vector2(getX(), getY()));
            var textField = findNextTextField(stage.getElements(), null, tmp2, tmp1, up);
            if (textField == null)
            {
                if (up)
                    tmp1 = new Vector2(float.MinValue, float.MinValue);
                else
                    tmp1 = new Vector2(float.MaxValue, float.MaxValue);
                textField = findNextTextField(getStage().getElements(), null, tmp2, tmp1, up);
            }
            if (textField != null)
                stage.setKeyboardFocus(textField);
        }
public void next ( bool up ) { var stage = getStage ( ) ; if ( stage == null ) return ; var tmp2 = Vector2 . Zero ; var tmp1 = getParent ( ) . localToStageCoordinates ( new Vector2 ( getX ( ) , getY ( ) ) ) ; var textField = findNextTextField ( stage . getElements ( ) , null , tmp2 , tmp1 , up ) ; if ( textField == null ) { if ( up ) tmp1 = new Vector2 ( float . MinValue , float . MinValue ) ; else tmp1 = new Vector2 ( float . MaxValue , float . MaxValue ) ; textField = findNextTextField ( getStage ( ) . getElements ( ) , null , tmp2 , tmp1 , up ) ; } if ( textField != null ) stage . setKeyboardFocus ( textField ) ; }
Focuses the next TextField.
Focuses the next TextField .
// Try to wrap around.
up
bool
None