Class UIUtils
java.lang.Object
net.dermetfan.gdx.scenes.scene2d.ui.UIUtils
Provides useful methods for
com.badlogic.gdx.scenes.scene2d.ui.- Since:
- 0.7.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlayoutSize(com.badlogic.gdx.scenes.scene2d.ui.Widget widget) Deprecated.seems unnecessary and with no known use casestatic com.badlogic.gdx.scenes.scene2d.ui.ButtonnewButton(com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle style) static com.badlogic.gdx.scenes.scene2d.ui.Buttoncreates aButtonaccording to the givenButton.ButtonStyleinstance that may beButton.ButtonStyle,TextButton.TextButtonStyle,ImageButton.ImageButtonStyleorImageTextButton.ImageTextButtonStylestatic com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStylereadButtonStyle(String name, com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonValue) Tries to load aTextButton.TextButtonStyle, thenImageButton.ImageButtonStyle, thenImageTextButton.ImageTextButtonStyleand thenButton.ButtonStyleusingJson.readValue(String, Class, JsonValue)brutally by catching NPEs.
-
Constructor Details
-
UIUtils
public UIUtils()
-
-
Method Details
-
layoutSize
Deprecated.seems unnecessary and with no known use case- Parameters:
widget- the Widget to resize according to its min, pref and max size
-
newButton
public static com.badlogic.gdx.scenes.scene2d.ui.Button newButton(com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle style) - See Also:
-
newButton
public static com.badlogic.gdx.scenes.scene2d.ui.Button newButton(com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle style, String textIfAny) creates aButtonaccording to the givenButton.ButtonStyleinstance that may beButton.ButtonStyle,TextButton.TextButtonStyle,ImageButton.ImageButtonStyleorImageTextButton.ImageTextButtonStyle -
readButtonStyle
public static com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle readButtonStyle(String name, com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonValue) Tries to load aTextButton.TextButtonStyle, thenImageButton.ImageButtonStyle, thenImageTextButton.ImageTextButtonStyleand thenButton.ButtonStyleusingJson.readValue(String, Class, JsonValue)brutally by catching NPEs. Nasty...
-