use of com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle in project Eidolons by IDemiurge.
the class StyleHolder method getSizedColoredLabelStyle.
public static Label.LabelStyle getSizedColoredLabelStyle(float adjustSizeCoef, FONT fontStyle, Integer size, Color color) {
if (adjustSizeCoef > 0)
if (GdxMaster.getFontSizeMod() != 1) {
int mod = Math.round(size * (GdxMaster.getFontSizeMod() - 1) * adjustSizeCoef);
size += mod;
}
Map<Pair<Integer, Color>, LabelStyle> map = getSizedColoredLabelStyleMap(fontStyle, size, color);
ImmutablePair<Integer, Color> pair = new ImmutablePair<>(size, color);
if (!map.containsKey(pair)) {
Label.LabelStyle style = new Label.LabelStyle(getFont(fontStyle, color, size), color);
style.font.getData().markupEnabled = true;
map.put(pair, style);
}
return map.get(pair);
}
use of com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle in project Eidolons by IDemiurge.
the class StyleHolder method getLabelStyle.
public static Label.LabelStyle getLabelStyle(FONT font, Color color) {
Map<Color, LabelStyle> map = getLabelStyleMap(font, color);
if (!map.containsKey(color)) {
Label.LabelStyle style = new Label.LabelStyle(getFont(font, DEFAULT_COLOR, getDefaultSize()), color);
style.font.getData().markupEnabled = true;
map.put(color, style);
}
return map.get(color);
}
Aggregations