com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle Java Examples

The following examples show how to use com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle. 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: MainListener.java    From skin-composer with MIT License 6 votes vote down vote up
@Override
public void stylePropertyChanged(StyleProperty styleProperty,
        Actor styleActor) {
    if (styleProperty.type == Drawable.class) {
        dialogFactory.showDialogDrawables(styleProperty, dialogListener);
    } else if (styleProperty.type == Color.class) {
        dialogFactory.showDialogColors(styleProperty, dialogListener);
    } else if (styleProperty.type == BitmapFont.class) {
        dialogFactory.showDialogFonts(styleProperty, dialogListener);
    } else if (styleProperty.type == Float.TYPE) {
        main.getUndoableManager().addUndoable(new UndoableManager.DoubleUndoable(main, styleProperty, ((Spinner) styleActor).getValue()), false);
    } else if (styleProperty.type == ScrollPaneStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    } else if (styleProperty.type == LabelStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    } else if (styleProperty.type == ListStyle.class) {
        main.getUndoableManager().addUndoable(new UndoableManager.SelectBoxUndoable(root, styleProperty, (SelectBox) styleActor), true);
    }
}
 
Example #2
Source File: FilteredSelectBox.java    From bladecoder-adventure-engine with Apache License 2.0 5 votes vote down vote up
public FilteredSelectBoxStyle(BitmapFont font, Color fontColor, Drawable background,
		ScrollPaneStyle scrollStyle, ListStyle listStyle, TextFieldStyle textFieldStyle) {
	this.font = font;
	this.fontColor.set(fontColor);
	this.background = background;
	this.scrollStyle = scrollStyle;
	this.listStyle = listStyle;
	this.textFieldStyle = textFieldStyle;
}
 
Example #3
Source File: FilteredSelectBox.java    From bladecoder-adventure-engine with Apache License 2.0 5 votes vote down vote up
public FilteredSelectBoxStyle(FilteredSelectBoxStyle style) {
	this.font = style.font;
	this.fontColor.set(style.fontColor);
	if (style.disabledFontColor != null)
		this.disabledFontColor = new Color(style.disabledFontColor);
	this.background = style.background;
	this.backgroundOver = style.backgroundOver;
	this.backgroundOpen = style.backgroundOpen;
	this.backgroundDisabled = style.backgroundDisabled;
	this.scrollStyle = new ScrollPaneStyle(style.scrollStyle);
	this.listStyle = new ListStyle(style.listStyle);
	this.textFieldStyle = new TextFieldStyle(style.textFieldStyle);
}
 
Example #4
Source File: StyleData.java    From skin-composer with MIT License 4 votes vote down vote up
public void resetProperties() {
    properties.clear();
    parent = null;
    
    if (clazz.equals(Button.class)) {
        newStyleProperties(ButtonStyle.class);
    } else if (clazz.equals(CheckBox.class)) {
        newStyleProperties(CheckBoxStyle.class);
        properties.get("checkboxOn").optional = false;
        properties.get("checkboxOff").optional = false;
        properties.get("font").optional = false;
    } else if (clazz.equals(ImageButton.class)) {
        newStyleProperties(ImageButtonStyle.class);
    } else if (clazz.equals(ImageTextButton.class)) {
        newStyleProperties(ImageTextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(Label.class)) {
        newStyleProperties(LabelStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(List.class)) {
        newStyleProperties(ListStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColorSelected").optional = false;
        properties.get("fontColorUnselected").optional = false;
        properties.get("selection").optional = false;
    } else if (clazz.equals(ProgressBar.class)) {
        newStyleProperties(ProgressBarStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(ScrollPane.class)) {
        newStyleProperties(ScrollPaneStyle.class);
    } else if (clazz.equals(SelectBox.class)) {
        newStyleProperties(SelectBoxStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
        properties.get("scrollStyle").optional = false;
        properties.get("scrollStyle").value = "default";
        properties.get("listStyle").optional = false;
        properties.get("listStyle").value = "default";
    } else if (clazz.equals(Slider.class)) {
        newStyleProperties(SliderStyle.class);
        
        //Though specified as optional in the doc, there are bugs without "background" being mandatory
        properties.get("background").optional = false;
    } else if (clazz.equals(SplitPane.class)) {
        newStyleProperties(SplitPaneStyle.class);
        properties.get("handle").optional = false;
    } else if (clazz.equals(TextButton.class)) {
        newStyleProperties(TextButtonStyle.class);
        properties.get("font").optional = false;
    } else if (clazz.equals(TextField.class)) {
        newStyleProperties(TextFieldStyle.class);
        properties.get("font").optional = false;
        properties.get("fontColor").optional = false;
    } else if (clazz.equals(TextTooltip.class)) {
        newStyleProperties(TextTooltipStyle.class);
        properties.get("label").optional = false;
        properties.get("label").value = "default";
    } else if (clazz.equals(Touchpad.class)) {
        newStyleProperties(TouchpadStyle.class);
    } else if (clazz.equals(Tree.class)) {
        newStyleProperties(TreeStyle.class);
        properties.get("plus").optional = false;
        properties.get("minus").optional = false;
    } else if (clazz.equals(Window.class)) {
        newStyleProperties(WindowStyle.class);
        properties.get("titleFont").optional = false;
    }
}