Java Code Examples for com.badlogic.gdx.scenes.scene2d.Stage#setDebugAll()
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.Stage#setDebugAll() .
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: PlayerBattleHUD.java From Norii with Apache License 2.0 | 5 votes |
private void initVariables(Camera camera, Entity[] sortedUnits) { statusUIs = new StatusUI[sortedUnits.length]; actionUIs = new ActionsUI[Player.getInstance().getUnitsSortedByIni().length]; hpBars = new HPBar[sortedUnits.length]; stage = new Stage(new ScreenViewport(camera)); stage.setDebugAll(false); }
Example 2
Source File: BehaviorTreeTests.java From gdx-ai with Apache License 2.0 | 5 votes |
public MainScreen() { Gdx.gl.glClearColor(.3f, .3f, .3f, 1); skin = new Skin(Gdx.files.internal("data/uiskin.json")); stage = new Stage(new ScreenViewport()); stage.setDebugAll(DEBUG_STAGE); // Create split pane List<String> testList = createTestList(); ScrollPane leftScrollPane = new ScrollPane(testList, skin); splitPane = new SplitPane(leftScrollPane, null, false, skin, "default-horizontal"); splitPane.setSplitAmount(Math.min((testList.getPrefWidth() + 10) / stage.getWidth(), splitPane.getSplitAmount())); // Create layout Table t = new Table(skin); t.setFillParent(true); t.add(splitPane).colspan(3).grow(); t.row(); t.add(pauseButton = new PauseButton(skin)).width(90).left(); t.add(new FpsLabel("FPS: ", skin)).left(); t.add(testDescriptionLabel = new Label("", skin)).left(); stage.addActor(t); // Set selected test changeTest(0); }
Example 3
Source File: PathFinderTests.java From gdx-ai with Apache License 2.0 | 5 votes |
@Override public void create () { Gdx.gl.glClearColor(.3f, .3f, .3f, 1); skin = new Skin(Gdx.files.internal("data/uiskin.json")); // Enable color markup BitmapFont font = skin.get("default-font", BitmapFont.class); font.getData().markupEnabled = true; stage = new Stage(); stage.setDebugAll(DEBUG_STAGE); stageWidth = stage.getWidth(); stageHeight = stage.getHeight(); Gdx.input.setInputProcessor(new InputMultiplexer(stage)); Stack stack = new Stack(); stage.addActor(stack); stack.setSize(stageWidth, stageHeight); testsTable = new Table(); stack.add(testsTable); // Create behavior selection window List<String> testList = createTestList(); algorithmSelectionWindow = addBehaviorSelectionWindow("Path Finder Tests", testList, 0, -1); // Set selected test changeTest(0); stage.addActor(new FpsLabel("FPS: ", skin)); }
Example 4
Source File: MessageTests.java From gdx-ai with Apache License 2.0 | 5 votes |
@Override public void create () { Gdx.gl.glClearColor(.3f, .3f, .3f, 1); skin = new Skin(Gdx.files.internal("data/uiskin.json")); stage = new Stage(); stage.setDebugAll(DEBUG_STAGE); stageWidth = stage.getWidth(); stageHeight = stage.getHeight(); Gdx.input.setInputProcessor(stage); // Add translucent panel (it's only visible when AI is paused) final Image translucentPanel = new Image(skin, "translucent"); translucentPanel.setSize(stageWidth, stageHeight); translucentPanel.setVisible(false); stage.addActor(translucentPanel); // Create test selection window List<String> testList = createTestList(); testSelectionWindow = addTestSelectionWindow("Tests", testList, 0, -1); // Create status bar Table statusBar = new Table(skin); statusBar.left().bottom(); statusBar.row().height(26); statusBar.add(pauseButton = new PauseButton(translucentPanel, skin)).width(90).left(); statusBar.add(new FpsLabel("FPS: ", skin)).padLeft(15); statusBar.add(testDescriptionLabel = new Label("", skin)).padLeft(15); stage.addActor(statusBar); // Set selected behavior changeTest(0); }
Example 5
Source File: SteeringBehaviorsTest.java From gdx-ai with Apache License 2.0 | 4 votes |
@Override public void create () { Gdx.gl.glClearColor(.3f, .3f, .3f, 1); greenFish = new TextureRegion(new Texture("data/green_fish.png")); cloud = new TextureRegion(new Texture("data/particle-cloud.png")); badlogicSmall = new TextureRegion(new Texture("data/badlogicsmall.jpg")); target = new TextureRegion(new Texture("data/target.png")); skin = new Skin(Gdx.files.internal("data/uiskin.json")); stage = new Stage(); stage.setDebugAll(DEBUG_STAGE); stageWidth = stage.getWidth(); stageHeight = stage.getHeight(); Gdx.input.setInputProcessor(new InputMultiplexer(stage)); // Add translucent panel (it's only visible when AI is paused) final Image translucentPanel = new Image(skin, "translucent"); translucentPanel.setSize(stageWidth, stageHeight); translucentPanel.setVisible(false); stage.addActor(translucentPanel); // Create test selection window Array<List<String>> engineTests = new Array<List<String>>(); for (int k = 0; k < tests.length; k++) { engineTests.add(createTestList(k)); } testSelectionWindow = addTestSelectionWindow("Behaviors", ENGINES, engineTests, 0, -1); // Create status bar Table statusBar = new Table(skin); statusBar.left().bottom(); statusBar.row().height(26); statusBar.add(pauseButton = new PauseButton(translucentPanel, skin)).width(90).left(); statusBar.add(new FpsLabel("FPS: ", skin)).padLeft(15); statusBar.add(testHelpLabel = new Label("", skin)).padLeft(15); stage.addActor(statusBar); // Set selected behavior changeTest(0, 0); }