List of usage examples for com.badlogic.gdx.graphics Color Color
public Color(float r, float g, float b, float a)
From source file:com.trueMagic.object.enviroment.EnviromentObject.java
public EnviromentObject(TrueMagicWorld world, List<EnviromentPoint> edgePoints) { super(world, GroundFactory.buildGroundBody(world.getPhysicsWorld(), edgePoints), GroundFactory.buildComplexGroundFixture(edgePoints)); float r = rand.nextFloat(); float g = rand.nextFloat(); float b = rand.nextFloat(); color = new Color(r, g, b, 0); this.edgePoints = edgePoints; }
From source file:com.turbogerm.helljump.game.GameAreaUtils.java
License:Open Source License
public static Array<ColorPositionPair> getBackgroundColorSpectrum() { Array<ColorPositionPair> colorPositionPairs = new Array<ColorPositionPair>(true, 5); colorPositionPairs.add(new ColorPositionPair(new Color(0.1f, 0.0f, 0.0f, 1.0f), 0.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.6f, 0.0f, 0.0f, 1.0f), 5.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.91f, 0.6f, 0.09f, 1.0f), 10.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.91f, 0.6f, 0.09f, 1.0f), 18.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.0f, 0.6f, 0.0f, 1.0f), 20.0f)); return colorPositionPairs; }
From source file:com.turbogerm.helljump.screens.general.ScreenBackground.java
License:Open Source License
private static Array<ColorPositionPair> getBackgroundColorSpectrum() { Array<ColorPositionPair> colorPositionPairs = new Array<ColorPositionPair>(true, 4); colorPositionPairs.add(new ColorPositionPair(new Color(0.3f, 0.0f, 0.0f, 1.0f), 0.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.6f, 0.0f, 0.0f, 1.0f), 5.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.91f, 0.6f, 0.09f, 1.0f), 10.0f)); colorPositionPairs.add(new ColorPositionPair(new Color(0.1f, 1.0f, 0.00f, 1.0f), 15.0f)); return colorPositionPairs; }
From source file:com.uwsoft.editor.gdx.actors.basic.PixelRect.java
License:Apache License
public PixelRect(float width, float height) { TextureManager tm = DataManager.getInstance().textureManager; lines[0] = new PixelLine(tm, 0, 0, width, 0); lines[1] = new PixelLine(tm, 0, 0, 0, height); lines[2] = new PixelLine(tm, width, 0, width, height); lines[3] = new PixelLine(tm, 0, height, width, height); fill = new Image(tm.getEditorAsset("pixel")); fill.setColor(new Color(0, 0, 0, 0)); addActor(fill);/* w w w .ja v a 2s.c o m*/ addActor(lines[0]); addActor(lines[1]); addActor(lines[2]); addActor(lines[3]); super.setWidth(width); super.setHeight(height); setOrigin(getWidth() / 2, getHeight() / 2); fill.setScaleX(getWidth()); fill.setScaleY(getHeight()); }
From source file:com.uwsoft.editor.gdx.actors.GridView.java
License:Apache License
public GridView(BaseStage s) { float gridSize = 50; float gridLinesCount = 200; for (int i = 0; i < gridLinesCount; i++) { PixelLine tmp = new PixelLine(s.textureManager, i * gridSize, 0, i * gridSize, gridSize * gridLinesCount); opacityHandler(i, tmp);/*w w w. jav a 2s. c o m*/ addActor(tmp); tmp.setX(tmp.getX() - (gridLinesCount / 2 - 1) * gridSize); tmp.setY(tmp.getY() - (gridLinesCount / 2 - 1) * gridSize); } for (int i = 0; i < gridLinesCount; i++) { PixelLine tmp = new PixelLine(s.textureManager, 0, i * gridSize, gridSize * gridLinesCount, i * gridSize); opacityHandler(i, tmp); addActor(tmp); tmp.setX(tmp.getX() - (gridLinesCount / 2 - 1) * gridSize); tmp.setY(tmp.getY() - (gridLinesCount / 2 - 1) * gridSize); } this.setWidth(gridSize * gridLinesCount); this.setHeight(gridSize * gridLinesCount); Label lbl = new Label("0.0", s.textureManager.editorSkin); lbl.setX(-5 - lbl.getWidth()); lbl.setY(-lbl.getHeight()); lbl.setColor(new Color(1, 1, 1, 0.4f)); addActor(lbl); }
From source file:com.uwsoft.editor.gdx.actors.SelectionRectangle.java
License:Apache License
private Image getMiniRect() { Image rect = new Image(tm.getEditorAsset("pixel")); rect.setScale(6);//from w w w .j ava 2 s . c o m rect.setColor(new Color(1, 1, 1, 1)); transformGroup.addActor(rect); return rect; }
From source file:com.uwsoft.editor.gdx.mediators.SceneControlMediator.java
License:Apache License
public void setAmbienceInfo(SceneVO vo) { Color clr = new Color(vo.ambientColor[0], vo.ambientColor[1], vo.ambientColor[2], vo.ambientColor[3]); essentials.rayHandler.setAmbientLight(clr); }
From source file:com.uwsoft.editor.gdx.stage.SandboxStage.java
License:Apache License
public void initView() { if (mainBox != null) mainBox.clear();/* w w w .j a va 2s . c o m*/ clear(); getCamera().position.set(0, 0, 0); frontUI = new Group(); ui = new SandboxUI(this); addActor(ui); selectionRec = new PixelRect(0, 0); selectionRec.setFillColor(new Color(1, 1, 1, 0.1f)); selectionRec.setOpacity(0.0f); selectionRec.setTouchable(Touchable.disabled); frontUI.addActor(selectionRec); addActor(mainBox); addActor(frontUI); }
From source file:com.uwsoft.editor.gdx.ui.dialogs.ItemPhysicsDialog.java
License:Apache License
private void buildUI() { mainLayer.setWidth(getWidth() - 2);// w ww . j a va 2 s . co m mainLayer.setHeight(getHeight() - topImg.getHeight()); buildControlPanel(); buildPropertyPanel(); mainLayer.addActor(controlPanel); PixelRect pixelRect = new PixelRect(mainLayer.getWidth() - propertyPanel.getWidth() - 12, mainLayer.getHeight() - controlPanel.getHeight() - 27); pixelRect.setFillColor(new Color(0, 0, 0, 0.4f)); pixelRect.setBorderColor(new Color(0, 0, 0, 0.7f)); mainLayer.addActor(pixelRect); itemPhysicsEditor = new ItemPhysicsEditor(stage, pixelRect.getWidth(), pixelRect.getHeight()); itemPhysicsEditor.setX(controlPanel.getX()); itemPhysicsEditor.setY(10); mainLayer.addActor(itemPhysicsEditor); pixelRect.setX(itemPhysicsEditor.getX()); pixelRect.setY(itemPhysicsEditor.getY()); }
From source file:com.uwsoft.editor.gdx.ui.dialogs.SimpleDialog.java
License:Apache License
@Override public void initPanel() { super.initPanel(); ButtonStyle stl = new ButtonStyle(); stl.down = new TextureRegionDrawable( DataManager.getInstance().textureManager.getEditorAsset("closeBtnClicked")); stl.up = new TextureRegionDrawable(DataManager.getInstance().textureManager.getEditorAsset("closeBtn")); stl.over = new TextureRegionDrawable( DataManager.getInstance().textureManager.getEditorAsset("closeHoverBtn")); Button closeBtn = new Button(stl); addActor(closeBtn);/*from w w w . j av a 2 s. c o m*/ closeBtn.setX(getWidth() - closeBtn.getWidth() - 4); closeBtn.setY(getHeight() - closeBtn.getHeight() - 4); closeBtn.addListener(new ClickListener() { public void touchUp(InputEvent event, float x, float y, int pointer, int button) { super.touchUp(event, x, y, pointer, button); instance.remove(); } }); titleLabel = new Label("Default Title", DataManager.getInstance().textureManager.editorSkin); titleLabel.setX(6); titleLabel.setY(topImg.getY() + 2); titleLabel.setColor(new Color(1, 1, 1, 0.6f)); addActor(titleLabel); initDragDrop(); }