Example usage for com.badlogic.gdx.graphics Color WHITE

List of usage examples for com.badlogic.gdx.graphics Color WHITE

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics Color WHITE.

Prototype

Color WHITE

To view the source code for com.badlogic.gdx.graphics Color WHITE.

Click Source Link

Usage

From source file:com.explatcreations.sft.graphics.RectSprite.java

License:Open Source License

private static Texture makeTexture() {
    final Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);
    pixmap.setColor(Color.WHITE);
    pixmap.fill();/*from   ww w  .  j a  va2s.  co  m*/
    final Texture result = new Texture(pixmap);
    pixmap.dispose();
    return result;
}

From source file:com.explatcreations.sft.gui.AimWidget.java

License:Open Source License

public AimWidget() {
    this.aimLabel = new ParchmentLabel(HudTop.X, HudTop.AuxWidgetY, "Aim");
    DualControl[] moveControls = Controls.MoveControls;
    for (int i = 0; i < moveControls.length; i += 1) {
        final DualControl control = moveControls[i];
        final ControlIcon icon = control.getIcon(Color.WHITE, false);
        icon.x = aimLabel.bg.x + aimLabel.getWidth() + 10;
        icon.y = HudTop.AuxWidgetY + HudTop.ySpace * i + 5;
        icons.add(icon);/*from  www .  j  a va2  s.c o  m*/

    }

}

From source file:com.explatcreations.sft.gui.Button.java

License:Open Source License

public Button(String labelText, int x, int y, IAction onPress, DualControl shortcut) {
    this.onPress = onPress;
    this.label = new ParchmentLabel(x, y, labelText);

    this.hotkeySprite = shortcut.getIcon(Color.WHITE, false);
    setX(x);//  ww  w. j  a  va 2  s.c o  m
    hotkeySprite.y = label.text.y;

    this.shortcut = shortcut;
}

From source file:com.explatcreations.sft.gui.ChooseWidget.java

License:Open Source License

public ChooseWidget(Inventory inventory) {

    this.label = new ParchmentLabel(HudTop.X, HudTop.AuxWidgetY, "Choose");

    this.orbSprites = new ArrayList<SpriteBase>();
    this.icons = new ArrayList<ControlIcon>();

    final MagicType[] allMagic = MagicType.values();
    for (int i = 0; i < allMagic.length; i += 1) {
        final MagicType magicType = allMagic[i];
        if (inventory.hasMagic(magicType)) {
            final SpriteBase orb = MagicTile.makeSprite(magicType);
            orb.x = label.getWidth() + 5;
            orb.y = HudTop.AuxWidgetY + i * HudTop.ySpace + 5;
            orbSprites.add(orb);/*  w w w.ja  v  a 2  s.  c  om*/
            final Color iconColor = Color.WHITE;
            final ControlIcon icon;
            //fixme put direction <=> magic correspondence in a fixed place
            if (magicType == MagicType.Fire) {
                icon = Controls.Up.getIcon(iconColor, false);
            } else if (magicType == MagicType.Ice) {
                icon = Controls.Right.getIcon(iconColor, false);
            } else if (magicType == MagicType.Earth) {
                icon = Controls.Down.getIcon(iconColor, false);
            } else /*if (magicType == MagicType.Wind)*/ {
                icon = Controls.Left.getIcon(iconColor, false);
            }
            icon.x = orb.x + orb.getWidth() + 9;
            icon.y = orb.y - 4;
            icons.add(icon);
        }
    }
}

From source file:com.explatcreations.sft.gui.NumberStamp.java

License:Open Source License

public static SpriteBase getWhiteSprite(LevelIndex index) {
    final SpriteBase result = new NumberStamp(index.stageName());
    result.setColor(Color.WHITE);
    return result;
}

From source file:com.explatcreations.sft.modes.ending.BaseEndingWidget.java

License:Open Source License

protected final SpriteBase[] makeSprites() {
    final SpriteBase[] result = new SpriteBase[strings.length];
    for (int i = 0; i < strings.length; i += 1) {
        final String string = strings[i];
        final TextSprite nextSprite = makeTextSprite(string);
        nextSprite.setColor(Color.WHITE);
        nextSprite.x = 3;/*from w  w  w .ja v  a  2  s.  c o  m*/
        nextSprite.y = i * 40 + 30;
        result[i] = nextSprite;
    }
    return result;
}

From source file:com.explatcreations.sft.modes.SplashPage.java

License:Open Source License

public SplashPage() {
    final SpriteBase page = Assets.makeStaticSprite(Game.assets.SplashPageGraphic);

    page.x = (Game.RenderWidth - page.getWidth()) / 2;
    page.y = (Game.RenderHeight - page.getHeight()) / 2 - 30;
    sprites.add(page);//from  w  w w  .  j  ava 2 s.  c  o m

    final SpriteBase text = new TextSprite(0, page.y + page.getHeight() + 18, "Presents...");
    text.x = (Game.RenderWidth - text.getWidth()) / 2;
    text.setColor(Color.WHITE);
    sprites.add(text);

}

From source file:com.explatcreations.sft.modes.title.TitleMode.java

License:Open Source License

public TitleMode() {
    if (Game.save.hasShownEnding(Ending.Mid)) {
        flagSprite = MidEndingWidget.makeFlagSprite();
        flagSprite.play(MidEndingWidget.WavingName);
    }/*from w w  w .j  a  v  a  2 s.  c o  m*/
    this.versionText = new TextSprite(2, 0, Game.globals.VersionString);
    versionText.y = Game.RenderHeight - 2 - versionText.getHeight();
    versionText.setColor(Color.WHITE);

    this.flipTripLettering = Assets.makeSpriteFrame(letteringClass, letteringClass.getWidth(),
            letteringClass.getHeight(), 0);
    flipTripLettering.x = Game.RenderWidth / 2 - flipTripLettering.getWidth() / 2;
    flipTripLettering.y = 50;
    this.titleGraphic = Assets.makeSpriteFrame(titleClass, titleClass.getWidth(), titleClass.getHeight(), 0);
    this.sniffyLettering = new SniffyLetterCollection();
    this.tower = Tower.makeTower();
    this.shadow = Tower.makeShadow();
    final Color skyColor = new Color(49f / 256, 19f / 256, 83f / 256, 1);
    this.skyGraphic = new RectSprite(Game.RenderWidth, Game.RenderHeight, skyColor);
    skyGraphic.y = -Height;
    this.floatyBits = new FloatingBitCollection();
    this.stars = new StarCollection();

    final int buttonX = Game.RenderWidth - 80;
    final int buttonY = Game.RenderHeight - 32;
    final IAction toMenu = new IAction() {
        @Override
        public void eval() {
            MusicManager.startFadeOut(60);
            Game.mode.transitionTo(new IFunction1<Mode>() {
                @Override
                public Mode apply() {
                    BackgroundManager.start();
                    return new MenuMode(0);
                }
            });
        }
    };
    this.continueButton = new Button("Continue", buttonX, buttonY, toMenu, Controls.Enter);
    continueButton.setX(Game.RenderWidth - continueButton.getWidth() - 5);

}

From source file:com.flaiker.reaktio.screens.AbstractScreen.java

License:Open Source License

public AbstractScreen(Reaktio reaktio, Skin skin) {
    this.batch = new SpriteBatch();
    this.reaktio = reaktio;
    this.uiStage = new Stage(new StretchViewport(SCREEN_WIDTH, SCREEN_HEIGHT));
    this.skin = skin != null ? skin : new Skin(Gdx.files.internal("skin/uiskin.json"));
    this.fpsLabel = new Label("", this.skin, "arial", Color.WHITE);
    this.backgroundImage = new Image(new Texture((Gdx.files.internal("bg.png"))));
    camera = new OrthographicCamera();
    camera.setToOrtho(false, SCREEN_WIDTH, SCREEN_HEIGHT);
}

From source file:com.flaiker.reaktio.screens.MenuScreen.java

License:Open Source License

@Override
public void show() {
    super.show();

    if (demoGame == null)
        demoGame = new Game(GameSettings.newDemoGameSettings(), SCREEN_WIDTH, SCREEN_HEIGHT, camera);

    Table table = new Table(skin);
    table.setFillParent(true);// ww  w . jav a  2  s  . c o  m
    uiStage.addActor(table);

    table.add().padBottom(50).row();
    Label titleLabel = new Label("Reaktio", skin, "digital7-92", Color.WHITE);
    //titleLabel.setFontScale(2);
    table.add(titleLabel).spaceBottom(5).align(1);
    table.row();
    table.add("A reaction test game").align(1).spaceBottom(20);
    table.row();

    // register the button "Start"
    TextButton startGameButton = new TextButton("START", skin);
    startGameButton.setColor(1, 1, 1, 0.9f);
    startGameButton.addListener(new DefaultActorListener() {
        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            super.touchUp(event, x, y, pointer, button);
            reaktio.setScreen(new ModeSelectionScreen(reaktio, demoGame, skin));
        }
    });
    table.add(startGameButton).expand().fill().pad(100, 100, 100, 100);
    table.row();

    // register the button "Highscore"
    TextButton highscoreButton = new TextButton("HIGHSCORE", skin);
    highscoreButton.setColor(1, 1, 1, 0.9f);
    highscoreButton.addListener(new DefaultActorListener() {
        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            super.touchUp(event, x, y, pointer, button);
            //reaktio.setScreen(new HighscoreScreen(reaktio, demoGame, skin));
        }
    });
    table.add(highscoreButton).expand().fill().pad(0, 100, 100, 100);
    table.row();

    // register the button "Options"
    TextButton optionsButton = new TextButton("OPTIONS", skin);
    optionsButton.setColor(1, 1, 1, 0.9f);
    optionsButton.addListener(new DefaultActorListener() {
        @Override
        public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
            super.touchUp(event, x, y, pointer, button);
            reaktio.setScreen(new OptionsScreen(reaktio, demoGame, skin));
        }
    });
    table.add(optionsButton).expand().fill().pad(0, 100, 100, 100).row();

    table.add(new Label("www.flaiker.com", skin));

    Gdx.input.setInputProcessor(uiStage);
}