Skip to content
Snippets Groups Projects
Commit b2023a5f authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#5 Refactored font static access

parent c22675f8
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ public class DebugScreen extends AbstractRobberyScreen {
}
private void displayRule() {
Label label = new Label(RobberyGame.getRobberyData().getRuleMessageText(this), new Label.LabelStyle(RobberyGame.getRobberyRegularFont(), Color.WHITE));
Label label = new Label(RobberyGame.getRobberyData().getRuleMessageText(this), new Label.LabelStyle(getDefaultRegularFont(), Color.WHITE));
label.setWrap(true);
float labelWidth = getStage().getWidth() * RULE_WIDTH_RATIO;
......
......@@ -199,20 +199,6 @@ public class RobberyGame extends AbstractTablexiaGame<GameRule> {
public static void setRobberyActualCreatureNumber(int actualCreatureNumber) {
RobberyGame.actualCreatureNumber = actualCreatureNumber;
}
public static BitmapFont getRobberyRegularFont() {
if (instance != null) {
return instance.getDefaultRegularFont();
}
return null;
}
public static BitmapFont getRobberyBoldFont() {
if (instance != null) {
return instance.getDefaultBoldFont();
}
return null;
}
public static GameRule getRobberyData() {
if (instance != null) {
......
......@@ -103,7 +103,7 @@ public class RuleScreen extends AbstractRobberyScreen {
float labelWidth = paperWidth * CONTENT_PAPER_WIDTH_RATIO;
float labelHeight = paperHeight * CONTENT_PAPER_HEIGHT_RATIO;
Label label = new Label(RobberyGame.getRobberyData().getRuleMessageText(this), new LabelStyle(RobberyGame.getRobberyRegularFont(), TEXT_COLOR));
Label label = new Label(RobberyGame.getRobberyData().getRuleMessageText(this), new LabelStyle(getDefaultRegularFont(), TEXT_COLOR));
label.setWrap(true);
label.setBounds(paperX + (paperWidth / 2) - (labelWidth / 2),
paperY + (paperHeight * LABEL_PAPER_Y_POSITION_RATIO) - labelHeight,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment