List of usage examples for com.badlogic.gdx.graphics Color MAROON
Color MAROON
To view the source code for com.badlogic.gdx.graphics Color MAROON.
Click Source Link
From source file:com.laststandstudio.space.Levels.Menus.MainMenu.java
License:Open Source License
public MainMenu(Game game) { super(game);//from ww w.j a v a 2 s.c om SpaceShooter.mode = SpaceShooter.GameMode.MENU_MAIN; SpaceShooter.logger.logDebug("Main Menu: Creating Main Menu Screen"); this.batch = new SpriteBatch(); this.titleFont = super.loadFont("fonts/Gtek_Technology_free.ttf", (Gdx.graphics.getHeight() / 12)); SpaceShooter.logger.logDebug("Main Menu: Creating Button Tables & Fonts"); this.menuFont = new BitmapFont(); this.pixmap = new Pixmap((Gdx.graphics.getWidth() / 2) - (Gdx.graphics.getWidth() / 10), (Gdx.graphics.getHeight() / 12), Pixmap.Format.RGB888); this.skin = new Skin(); this.stage = new Stage(); this.table = new Table(); this.labelStyle = new Label.LabelStyle(titleFont, Color.BLACK); this.textButtonStyle = new TextButton.TextButtonStyle(); skin.add("default", menuFont); pixmap.setColor(Color.MAROON); pixmap.fill(); skin.add("background", new Texture(pixmap)); SpaceShooter.logger.logDebug("Main Menu: Building Button Style"); textButtonStyle.up = skin.newDrawable("background", Color.GRAY); textButtonStyle.down = skin.newDrawable("background", Color.DARK_GRAY); textButtonStyle.checked = skin.newDrawable("background", Color.DARK_GRAY); textButtonStyle.over = skin.newDrawable("background", Color.LIGHT_GRAY); textButtonStyle.font = skin.getFont("default"); skin.add("default", textButtonStyle); SpaceShooter.logger.logDebug("Main Menu: Building Buttons"); this.title = new Label("space shooter", labelStyle); this.btnSinglePlayer = new TextButton("Single Player", skin); this.btnMultiplayer = new TextButton("Multiplayer", skin); this.btnOptions = new TextButton("Options", skin); this.btnTexturePacks = new TextButton("Texture Packs", skin); this.btnMods = new TextButton("Mods", skin); this.btnExit = new TextButton("Exit", skin); }
From source file:com.thetruthbeyond.botmaker.gui.tabs.TeachTab.java
License:Open Source License
private void setAnswerAutofillSet() { bot = CurrentBot.instance;//from w ww. ja v a 2 s . c om if (bot != null) { Context context = bot.getContext(); explorer = new BotExplorer(context.getProperty("name")); Set<String> variables = new TreeSet<>(); for (String variable : context.getPropertiesNames()) { if (variable.equals("id")) continue; String bracketVariable = "[" + variable + "]"; variables.add(bracketVariable); answerCMTF.markWildcard(new VariableCard(bracketVariable, Color.MAROON).setReadOnly(true)); } for (String variable : context.getPredicatesNames()) { String bracketVariable = "[" + variable + "]"; variables.add(bracketVariable); answerCMTF.markWildcard(new VariableCard(bracketVariable, Color.MAROON).setReadOnly(false)); } answerCMTF.markRegularExpression("\\[.+\\]"); answerATF.setAutofillSet(variables); } }
From source file:com.thetruthbeyond.gui.objects.controllers.textfield.decorators.WildcardTextField.java
License:Open Source License
@Override public void update(float delta) { super.update(delta); if (hasChanged() && !words.isEmpty()) { int lastIndex = words.size() - 1; String lastWord = words.get(lastIndex); // After altering input new wildcards can be created. boolean tryToMatchNewWildcard = true; if (wildcards.containsKey(lastIndex)) { // Get last wildcard in the field. String name = wildcards.get(lastIndex).getName(); if (name.length() != lastWord.length()) { // Wildcard cannot be valid after one letter had been added or erased. wildcards.remove(lastIndex); if (name.length() > lastWord.length()) { String input = getInput(); // Erase whole wildcard at once if one letter was erased. super.setInput(input.substring(0, input.length() - lastWord.length())); tryToMatchNewWildcard = false; }//from w ww . java 2 s . c om } } if (tryToMatchNewWildcard) { if (queueMap.containsKey(lastWord)) { List<Wildcard> list = queueMap.get(lastWord); int index = counterMap.get(lastWord); wildcards.put(lastIndex, list.get(index)); counterMap.put(lastWord, (index + 1) % list.size()); } else { for (String regular : regulars) { if (lastWord.matches(regular)) { wildcards.put(lastIndex, new VariableCard(lastWord, Color.MAROON)); break; } } } } } }
From source file:com.thetruthbeyond.gui.objects.controllers.textfield.decorators.WildcardTextField.java
License:Open Source License
private void updateWildcards(int beginWordIndex) { for (int i = beginWordIndex, size = words.size(); i != size; i++) { String word = words.get(i); if (queueMap.containsKey(word)) { List<Wildcard> list = queueMap.get(word); int index = counterMap.get(word); wildcards.put(i, list.get(index)); counterMap.put(word, (index + 1) % list.size()); } else {//from w w w . j a v a2s.c om for (String regular : regulars) { if (word.matches(regular)) { wildcards.put(i, new VariableCard(word, Color.MAROON)); break; } } } } }
From source file:non.plugins.graphics.java
public Color color(String name) { if (name.startsWith("#")) return Color.valueOf(name.replace("#", "")); if ("clear".equalsIgnoreCase(name)) return Color.CLEAR; else if ("white".equalsIgnoreCase(name)) return Color.WHITE; else if ("black".equalsIgnoreCase(name)) return Color.BLACK; else if ("red".equalsIgnoreCase(name)) return Color.RED; else if ("green".equalsIgnoreCase(name)) return Color.GREEN; else if ("blue".equalsIgnoreCase(name)) return Color.BLUE; else if ("lightgray".equalsIgnoreCase(name)) return Color.LIGHT_GRAY; else if ("gray".equalsIgnoreCase(name)) return Color.GRAY; else if ("darkgray".equalsIgnoreCase(name)) return Color.DARK_GRAY; else if ("pink".equalsIgnoreCase(name)) return Color.PINK; else if ("orange".equalsIgnoreCase(name)) return Color.ORANGE; else if ("yellow".equalsIgnoreCase(name)) return Color.YELLOW; else if ("magenta".equalsIgnoreCase(name)) return Color.MAGENTA; else if ("cyan".equalsIgnoreCase(name)) return Color.CYAN; else if ("olive".equalsIgnoreCase(name)) return Color.OLIVE; else if ("purple".equalsIgnoreCase(name)) return Color.PURPLE; else if ("maroon".equalsIgnoreCase(name)) return Color.MAROON; else if ("teal".equalsIgnoreCase(name)) return Color.TEAL; else if ("navy".equalsIgnoreCase(name)) return Color.NAVY; return Color.CLEAR; }
From source file:org.catrobat.catroid.stage.StageListener.java
License:Open Source License
public void drawDebugCollisionPolygons() { boolean drawPolygons = true; boolean drawBoundingBoxes = false; boolean drawPolygonPoints = false; boolean drawTouchingAreas = true; Color colorPolygons = Color.MAGENTA; Color colorBoundingBoxes = Color.MAROON; Color colorPolygonPoints = Color.BLACK; Color colorTouchingAreas = Color.RED; int lineWidth = 5; Gdx.gl20.glLineWidth(lineWidth / camera.zoom); collisionPolygonDebugRenderer.setAutoShapeType(true); collisionPolygonDebugRenderer.begin(); for (Sprite sprite : sprites.subList(1, sprites.size())) { Polygon[] polygonsForSprite = sprite.look.getCurrentCollisionPolygon(); if (polygonsForSprite != null) { for (Polygon polygonToDraw : polygonsForSprite) { if (drawPolygons) { collisionPolygonDebugRenderer.setColor(colorPolygons); collisionPolygonDebugRenderer.polygon(polygonToDraw.getTransformedVertices()); }// w w w.ja v a 2 s .com if (drawBoundingBoxes) { Rectangle r = polygonToDraw.getBoundingRectangle(); collisionPolygonDebugRenderer.setColor(colorBoundingBoxes); collisionPolygonDebugRenderer.rect(r.getX(), r.getY(), r.getWidth(), r.getHeight(), Color.CYAN, Color.CYAN, Color.CYAN, Color.CYAN); } if (drawPolygonPoints) { collisionPolygonDebugRenderer.setColor(colorPolygonPoints); float[] points = polygonToDraw.getTransformedVertices(); for (int i = 0; i < points.length; i += 2) { collisionPolygonDebugRenderer.circle(points[i], points[i + 1], 10); } } } if (drawTouchingAreas) { ArrayList<PointF> touchingPoints = TouchUtil.getCurrentTouchingPoints(); collisionPolygonDebugRenderer.setColor(colorTouchingAreas); for (PointF point : touchingPoints) { collisionPolygonDebugRenderer.circle(point.x, point.y, Constants.COLLISION_WITH_FINGER_TOUCH_RADIUS); } } } } collisionPolygonDebugRenderer.end(); }