Package com.github.tommyettinger.textra
Class Styles.TextFieldStyle
java.lang.Object
com.github.tommyettinger.textra.Styles.TextFieldStyle
- Enclosing class:
- Styles
The style for a text field, see
TextraField
.-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.scenes.scene2d.utils.Drawable
com.badlogic.gdx.scenes.scene2d.utils.Drawable
com.badlogic.gdx.scenes.scene2d.utils.Drawable
com.badlogic.gdx.graphics.Color
com.badlogic.gdx.scenes.scene2d.utils.Drawable
com.badlogic.gdx.graphics.Color
com.badlogic.gdx.graphics.Color
com.badlogic.gdx.graphics.Color
com.badlogic.gdx.scenes.scene2d.utils.Drawable
-
Constructor Summary
ConstructorsConstructorDescriptionTextFieldStyle
(com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.Color fontColor, com.badlogic.gdx.scenes.scene2d.utils.Drawable cursor, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, com.badlogic.gdx.scenes.scene2d.utils.Drawable background) Deprecated.Create a Font from your BitmapFont once and pass that to constructors instead.TextFieldStyle
(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle style) Deprecated.Create a Font from your BitmapFont once and pass that to constructors instead.TextFieldStyle
(Font font, com.badlogic.gdx.graphics.Color fontColor, com.badlogic.gdx.scenes.scene2d.utils.Drawable cursor, com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, com.badlogic.gdx.scenes.scene2d.utils.Drawable background) -
Method Summary
-
Field Details
-
font
-
fontColor
public com.badlogic.gdx.graphics.Color fontColor -
focusedFontColor
@Null public com.badlogic.gdx.graphics.Color focusedFontColor -
disabledFontColor
@Null public com.badlogic.gdx.graphics.Color disabledFontColor -
background
@Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable background -
focusedBackground
@Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable focusedBackground -
disabledBackground
@Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable disabledBackground -
cursor
@Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable cursor -
selection
@Null public com.badlogic.gdx.scenes.scene2d.utils.Drawable selection -
messageFontColor
@Null public com.badlogic.gdx.graphics.Color messageFontColor
-
-
Constructor Details
-
TextFieldStyle
public TextFieldStyle() -
TextFieldStyle
public TextFieldStyle(Font font, com.badlogic.gdx.graphics.Color fontColor, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable cursor, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable background) -
TextFieldStyle
@Deprecated public TextFieldStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font, com.badlogic.gdx.graphics.Color fontColor, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable cursor, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable selection, @Null com.badlogic.gdx.scenes.scene2d.utils.Drawable background) Deprecated.Create a Font from your BitmapFont once and pass that to constructors instead.You should almost always avoid calling this constructor directly, because it allocates a new Font object every time (copying information from the given BitmapFont), and it isn't easy to dispose the created Font.- Parameters:
font
- a BitmapFont that will be copied into a new FontfontColor
- the color to tint the given BitmapFontcursor
- may be null to show no cursor; otherwise this will be drawn where text will be enteredselection
- may be null, but is usually a solid block that will be stretched behind a selected areabackground
- may be null; otherwise, drawn behind the widget as its background
-
TextFieldStyle
-
TextFieldStyle
@Deprecated public TextFieldStyle(com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle style) Deprecated.Create a Font from your BitmapFont once and pass that to constructors instead.You should almost always avoid calling this constructor directly, because it allocates a new Font object every time (copying information from the given style), and it isn't easy to dispose the created Font.- Parameters:
style
- a Label.LabelStyle that will have its data and BitmapFont copied into this and its Font
-