Java Code Examples for com.badlogic.gdx.scenes.scene2d.ui.Skin#getFont()

The following examples show how to use com.badlogic.gdx.scenes.scene2d.ui.Skin#getFont() . 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: ItemTooltip.java    From Unlucky with MIT License 6 votes vote down vote up
public ItemTooltip(Skin skin) {
    super("", skin);
    desc = new Label("", skin);
    desc.setFontScale(0.5f);
    this.getTitleLabel().setFontScale(0.5f);

    common = new Label.LabelStyle(skin.getFont("default-font"), new Color(1, 1, 1, 1));
    rare = new Label.LabelStyle(skin.getFont("default-font"), new Color(0, 200 / 255.f, 0, 1));
    epic = new Label.LabelStyle(skin.getFont("default-font"), new Color(0, 180 / 255.f, 1, 1));
    legendary = new Label.LabelStyle(skin.getFont("default-font"), new Color(164 / 255.f, 80 / 255.f, 1, 1));

    left();
    // fix padding because of scaling
    this.padTop(12);
    this.padLeft(2);
    this.padBottom(4);
    add(desc);
    pack();
    this.setTouchable(Touchable.disabled);
    this.setVisible(false);
    this.setMovable(false);
    this.setOrigin(Align.bottomLeft);
}
 
Example 2
Source File: NoPageHint.java    From gdx-texture-packer-gui with Apache License 2.0 5 votes vote down vote up
public NoPageHint(Skin skin) {
    String text = App.inst().getI18n().get("atlasPreviewNoPageMsg");

    Label lblMessage = new Label(text, new Label.LabelStyle(skin.getFont("default-font"), Color.WHITE));
    lblMessage.setAlignment(Align.center);
    lblMessage.getColor().a = 0.25f;
    setActor(lblMessage);

    setFillParent(true);
    align(Align.center);
    setTouchable(Touchable.disabled);
    setBackground(skin.getDrawable("noPreviewFill"));
}
 
Example 3
Source File: PageGroup.java    From gdx-texture-packer-gui with Apache License 2.0 5 votes vote down vote up
public RegionSpotlight(Skin skin) {
    whiteTex = skin.getRegion("white");
    spotlightBorder = skin.getPatch("custom/white_frame");
    font = skin.getFont("default-font");
    glText = new GlyphLayout();

    colorSpotlight = skin.getColor("orange");
    colorTextFrame = new Color(0x333333aa);
}
 
Example 4
Source File: ScenePointer.java    From bladecoder-adventure-engine with Apache License 2.0 5 votes vote down vote up
public ScenePointer(Skin skin, World w) {
	this.world = w;
	font = skin.getFont("desc");
	pointerIcon = skin.getDrawable(POINTER_ICON);
	leaveIcon = skin.getDrawable(LEAVE_ICON);
	hotspotIcon = skin.getDrawable(HOTSPOT_ICON);
	reset();
}
 
Example 5
Source File: IntValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public IntValueLabel (CharSequence text, int initialValue, Skin skin, String fontName, Color color) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 6
Source File: IntValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public IntValueLabel (CharSequence text, int initialValue, Skin skin, String fontName, String colorName) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}
 
Example 7
Source File: FloatValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public FloatValueLabel (CharSequence text, float initialValue, Skin skin, String fontName, Color color) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 8
Source File: FloatValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public FloatValueLabel (CharSequence text, float initialValue, Skin skin, String fontName, String colorName) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}
 
Example 9
Source File: ObjectValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public ObjectValueLabel (CharSequence text, T initialValue, Skin skin, String fontName, Color color) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 10
Source File: ObjectValueLabel.java    From GdxDemo3D with Apache License 2.0 4 votes vote down vote up
public ObjectValueLabel (CharSequence text, T initialValue, Skin skin, String fontName, String colorName) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}
 
Example 11
Source File: IntValueLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public IntValueLabel (CharSequence text, int initialValue, Skin skin, String fontName, Color color) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 12
Source File: IntValueLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public IntValueLabel (CharSequence text, int initialValue, Skin skin, String fontName, String colorName) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}
 
Example 13
Source File: FloatValueLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public FloatValueLabel (CharSequence text, float initialValue, Skin skin, String fontName, Color color) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 14
Source File: FloatValueLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public FloatValueLabel (CharSequence text, float initialValue, Skin skin, String fontName, String colorName) {
	this(text, initialValue, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}
 
Example 15
Source File: FpsLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public FpsLabel (CharSequence text, Skin skin, String fontName, Color color) {
	this(text, new LabelStyle(skin.getFont(fontName), color));
}
 
Example 16
Source File: FpsLabel.java    From gdx-ai with Apache License 2.0 4 votes vote down vote up
public FpsLabel (CharSequence text, Skin skin, String fontName, String colorName) {
	this(text, new LabelStyle(skin.getFont(fontName), skin.getColor(colorName)));
}