Java Code Examples for com.kotcrab.vis.ui.VisUI#getSkin()
The following examples show how to use
com.kotcrab.vis.ui.VisUI#getSkin() .
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: CalibrationScreen.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Adds exit button with listener in right bottom corner */ private void createBackButton() { // Create Button backButton = new TextButton("EXIT", VisUI.getSkin()); // Set position in bottom right corner backButton.setX(Gdx.graphics.getWidth()-60); backButton.setY(0); backButton.setWidth(60); backButton.setHeight(60); backButton.setVisible(true); // Add Listener that sets the screen to the start screen of the game when button is clicked backButton.addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { StandardizedInterface.getInstance().StimuliSystem.stopStimulus(); frameCounter = 0; game.setScreen(new MainMenuScreen(game)); } }); // Add Button to stage stage.addActor(backButton); }
Example 2
Source File: TestVertical.java From vis-ui with Apache License 2.0 | 6 votes |
private void addNormalWidgets () { ProgressBar progressbar = new ProgressBar(0, 100, 1, true, VisUI.getSkin()); Slider slider = new Slider(0, 100, 1, true, VisUI.getSkin()); Slider sliderDisabled = new Slider(0, 100, 1, true, VisUI.getSkin()); progressbar.setValue(50); slider.setValue(50); sliderDisabled.setValue(50); sliderDisabled.setDisabled(true); VisTable progressbarTable = new VisTable(true); progressbarTable.add(progressbar); progressbarTable.add(slider); progressbarTable.add(sliderDisabled); add(progressbarTable); }
Example 3
Source File: VisUITest.java From libgdx-inGameConsole with Apache License 2.0 | 5 votes |
@Override public void create () { VisUI.load(); Gdx.gl.glClearColor(0, 0, 0, 1); console = new GUIConsole(VisUI.getSkin(), false, 0, VisWindow.class, VisTable.class, "default-pane", TextField.class, VisTextButton.class, VisLabel.class, VisScrollPane.class); console.setCommandExecutor(new MyCommandExecutor()); console.setSizePercent(100, 100); console.setPosition(0, 0); console.setVisible(true); console.enableSubmitButton(true); console.resetInputProcessing(); }
Example 4
Source File: VisDialog.java From vis-ui with Apache License 2.0 | 4 votes |
public VisDialog (String title) { super(title); this.skin = VisUI.getSkin(); setSkin(skin); initialize(); }
Example 5
Source File: VisSelectBox.java From vis-ui with Apache License 2.0 | 4 votes |
public VisSelectBox () { super(VisUI.getSkin()); init(); }
Example 6
Source File: VisSelectBox.java From vis-ui with Apache License 2.0 | 4 votes |
public VisSelectBox (String styleName) { super(VisUI.getSkin(), styleName); init(); }
Example 7
Source File: VisList.java From vis-ui with Apache License 2.0 | 4 votes |
public VisList (String styleName) { super(VisUI.getSkin(), styleName); init(); }
Example 8
Source File: SettingsScreen.java From buffer_bci with GNU General Public License v3.0 | 4 votes |
public SettingsScreen(Game game) { this.game = game; this.camera = new OrthographicCamera(); this.viewport = new ExtendViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), this.camera); this.stage = new Stage(viewport); // Buttons this.statusButton = new TextButton("Connect", VisUI.getSkin()); this.backButton = new TextButton("Back", VisUI.getSkin()); // IP this.ipLabel = new Label("IP Address:", VisUI.getSkin()); this.ipField = new TextField("", VisUI.getSkin()); // Port this.portLabel = new Label("Port:", VisUI.getSkin()); this.portField = new TextField("", VisUI.getSkin()); // Server connection status label this.statusLabel = new Label("No Information to see yet.", VisUI.getSkin()); // BCI Modes // Stimuli ON and OFF this.stimuliOff = new CheckBox("Stimuli OFF", VisUI.getSkin()); this.stimuliOn = new CheckBox("Stimuli ON", VisUI.getSkin()); // Synchronous and asynchronous this.synchronous = new CheckBox("Synchronous", VisUI.getSkin()); this.asynchronous = new CheckBox("Asynchronous", VisUI.getSkin()); // Controls: direct/sticky keys this.gamePlayModeSelectorLabel = new Label("Game play mode", VisUI.getSkin()); this.gamePlayModeSelector= new SelectBox<>(VisUI.getSkin()); this.gamePlayModeSelector.setItems("Direct","Sticky"); // Decay -> Not implemented this.keyCommandDecayField = new TextField("", VisUI.getSkin()); keyCommandDecayField .setMessageText("default : 200 ms "); keyCommandDecayField .needsLayout(); this.keyCommandDecayLabel = new Label("Key command decay (/millisecond):", VisUI.getSkin()); // File choosers // Game stimuli chooser this.stimuliLabel = new Label("Stimuli file:", VisUI.getSkin()); this.fileChooser = new FileChooser("Choose Stimuli File", FileChooser.Mode.OPEN); fileChooser.setSize(stage.getWidth(), stage.getHeight()); this.fileField = new TextField("", VisUI.getSkin() ); fileField.setMessageText("no file chosen"); // Calibration stimuli chooser this.calibrationLabel = new Label("Calibration file:", VisUI.getSkin() ); this.calibrationChooser = new FileChooser("Choose Calibration File", FileChooser.Mode.OPEN); calibrationChooser.setSize(stage.getWidth(), stage.getHeight()); this.calibrationField = new TextField("", VisUI.getSkin() ); calibrationField.setMessageText("no file chosen"); // Timeout this.timeoutField = new TextField("", VisUI.getSkin()); timeoutField.setMessageText("100"); timeoutField.needsLayout(); this.timeoutLabel = new Label("Timeout after (ms):", VisUI.getSkin()); // Game step this.gameStepLabel = new Label("Game step time:", VisUI.getSkin()); this.gameStepField = new TextField("", VisUI.getSkin()); gameStepField.setMessageText(""+StandardizedInterface.getInstance().getGameStepLength()); }
Example 9
Source File: VisTree.java From vis-ui with Apache License 2.0 | 4 votes |
public VisTree () { super(VisUI.getSkin()); init(); }
Example 10
Source File: VisTree.java From vis-ui with Apache License 2.0 | 4 votes |
public VisTree (String styleName) { super(VisUI.getSkin(), styleName); init(); }
Example 11
Source File: VisTable.java From vis-ui with Apache License 2.0 | 4 votes |
/** @param setVisDefaults if true default vis spacing defaults will be set */ public VisTable (boolean setVisDefaults) { super(VisUI.getSkin()); if (setVisDefaults) TableUtils.setSpacingDefaults(this); }
Example 12
Source File: VisTable.java From vis-ui with Apache License 2.0 | 4 votes |
public VisTable () { super(VisUI.getSkin()); }
Example 13
Source File: VisDialog.java From vis-ui with Apache License 2.0 | 4 votes |
public VisDialog (String title, WindowStyle windowStyle) { super(title, windowStyle); this.skin = VisUI.getSkin(); setSkin(skin); initialize(); }
Example 14
Source File: VisLabel.java From vis-ui with Apache License 2.0 | 4 votes |
public VisLabel (CharSequence text, String fontName, String colorName) { super(text, VisUI.getSkin(), fontName, colorName); }
Example 15
Source File: VisLabel.java From vis-ui with Apache License 2.0 | 4 votes |
public VisLabel (CharSequence text, String fontName, Color color) { super(text, VisUI.getSkin(), fontName, color); }
Example 16
Source File: VisLabel.java From vis-ui with Apache License 2.0 | 4 votes |
public VisLabel (CharSequence text, String styleName) { super(text, VisUI.getSkin(), styleName); }
Example 17
Source File: VisLabel.java From vis-ui with Apache License 2.0 | 4 votes |
public VisLabel (CharSequence text) { super(text, VisUI.getSkin()); }
Example 18
Source File: VisLabel.java From vis-ui with Apache License 2.0 | 4 votes |
public VisLabel (CharSequence text, Color textColor) { super(text, VisUI.getSkin()); setColor(textColor); }
Example 19
Source File: VisWindow.java From vis-ui with Apache License 2.0 | 4 votes |
public VisWindow (String title, String styleName) { super(title, VisUI.getSkin(), styleName); getTitleLabel().setAlignment(VisUI.getDefaultTitleAlign()); }
Example 20
Source File: TestTextAreaAndScroll.java From vis-ui with Apache License 2.0 | 4 votes |
private void addNormalWidgets () { Skin skin = VisUI.getSkin(); TextArea textArea = new TextArea("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis odio.", skin); textArea.setPrefRows(5); // --- VisTable table = new VisTable(); for (int i = 0; i < 20; i++) table.add(new Label("Label #" + (i + 1), skin)).expand().fill().row(); ScrollPane scrollPane = new ScrollPane(table, skin, "list"); scrollPane.setFlickScroll(false); scrollPane.setFadeScrollBars(false); // --- add(textArea).row(); add(scrollPane).spaceTop(8).fillX().expandX().row(); }