com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable Java Examples

The following examples show how to use com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DtdSchemaGenerator.java    From gdx-vfx with Apache License 2.0 5 votes vote down vote up
/** Generates skin with minimum required set of default resources. */
private static Skin createSkin() {
    BitmapFont font = new BitmapFont();
    final BaseDrawable drawable = new BaseDrawable();
    Color color = Color.WHITE;

    Skin skin = new Skin() {
        @Override
        public Drawable getDrawable(String name) {
            return drawable;
        }
    };
    skin.add("default", font);
    skin.add("default", new Label.LabelStyle(font, color));
    skin.add("default-horizontal", new SplitPane.SplitPaneStyle(drawable));
    skin.add("default-vertical", new SplitPane.SplitPaneStyle(drawable));
    skin.add("default", new CheckBox.CheckBoxStyle(drawable, drawable, font, color));
    skin.add("default-horizontal", new ProgressBar.ProgressBarStyle(drawable, drawable));
    skin.add("default-vertical", new ProgressBar.ProgressBarStyle(drawable, drawable));
    skin.add("default", new ScrollPane.ScrollPaneStyle(drawable, drawable, drawable, drawable, drawable));
    skin.add("default", new List.ListStyle(font, color, color, drawable));
    skin.add("default", new SelectBox.SelectBoxStyle(font, color, drawable, skin.get(ScrollPane.ScrollPaneStyle.class), skin.get(List.ListStyle.class)));
    skin.add("default", new Tree.TreeStyle(drawable, drawable, drawable));
    skin.add("default", new TextButton.TextButtonStyle(drawable, drawable, drawable, font));
    skin.add("default-horizontal", new Slider.SliderStyle(drawable, drawable));
    skin.add("default-vertical", new Slider.SliderStyle(drawable, drawable));
    skin.add("default", new TextTooltip.TextTooltipStyle(skin.get(Label.LabelStyle.class), drawable));
    skin.add("default", new ImageButton.ImageButtonStyle(drawable, drawable, drawable, drawable, drawable, drawable));
    skin.add("default", new TextField.TextFieldStyle(font, color, drawable, drawable, drawable));
    skin.add("default", new Window.WindowStyle(font, color, drawable));
    skin.add("default", new Button.ButtonStyle(drawable, drawable, drawable));
    skin.add("default", new Label.LabelStyle(font, color));
    skin.add("default", new Touchpad.TouchpadStyle(drawable, drawable));
    skin.add("default", new ImageTextButton.ImageTextButtonStyle(drawable, drawable, drawable, font));
    return skin;
}