com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle Java Examples
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle.
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: FilteredSelectBox.java From bladecoder-adventure-engine with Apache License 2.0 | 5 votes |
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 #2
Source File: FilteredSelectBox.java From bladecoder-adventure-engine with Apache License 2.0 | 5 votes |
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 #3
Source File: StyleData.java From skin-composer with MIT License | 4 votes |
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; } }
Example #4
Source File: ServerConnectGUI.java From Radix with MIT License | 4 votes |
@Override public void init() { stage = new Stage(); // TODO memory manage background = new Texture(Gdx.files.internal("textures/block/obsidian.png")); background.setWrap(TextureWrap.Repeat, TextureWrap.Repeat); errorLabel = new Label(null, new LabelStyle(new BitmapFont(), Color.RED)); TextFieldStyle fieldStyle = new TextFieldStyle(); fieldStyle.font = new BitmapFont(); fieldStyle.fontColor = Color.WHITE; TextField ipField = new TextField("IP:Port", fieldStyle); ImageTextButtonStyle btnStyle = RadixClient.getInstance().getSceneTheme().getButtonStyle(); TextButton connectButton = new TextButton("Connect", btnStyle); connectButton.addListener(new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { String[] ipPort = ipField.getText().split(":"); if(ipPort.length != 2) { invalidIpSyntax(); return; } try { RadixClient.getInstance().enterRemoteWorld(ipPort[0], Short.parseShort(ipPort[1])); } catch (NumberFormatException ex) { invalidPort(); } } }); Table table = new Table(); table.setFillParent(true); table.add(ipField); table.row(); table.add(errorLabel); table.row(); table.add(connectButton); stage.addActor(table); }