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

#7 Victory screen buttons disposed font problem fix

parent d1908074
Branches
Tags
No related merge requests found
package cz.nic.tablexia.util.ui.dialog;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
......@@ -16,7 +15,7 @@ import cz.nic.tablexia.util.ui.dialog.text.DialogTextContent;
public abstract class AbstractButtonDialog extends TablexiaDialog {
private static final Color DEFAULT_BUTTON_TEXT_COLOR = Color.BLACK;
private static final BitmapFont DEFAULT_BUTTON_TEXT_FONT = ApplicationFontManager.getInstance().getDefaultApplicationRegularFont();
private static final String DEFAULT_BUTTON_TEXT_FONT = ApplicationFontManager.APPLICATION_DEFAULT_FONT_REGULAR;
private static final String BTN_DISABLED_ATLAS_NAME = "tablexiabutton_disabled";
private static final float BUTTON_WIDTH_RATIO_TO_DIALOG_WIDTH = 0.27f;
......@@ -41,7 +40,7 @@ public abstract class AbstractButtonDialog extends TablexiaDialog {
NinePatch dis = buttonAtlas.createPatch(BTN_DISABLED_ATLAS_NAME);
NinePatchDrawable npdDis = new NinePatchDrawable(dis);
TextButton.TextButtonStyle textButtonStyle = new TextButton.TextButtonStyle(npdUp, npdDown, npdDis, DEFAULT_BUTTON_TEXT_FONT);
TextButton.TextButtonStyle textButtonStyle = new TextButton.TextButtonStyle(npdUp, npdDown, npdDis, ApplicationFontManager.getInstance().getFont(DEFAULT_BUTTON_TEXT_FONT));
textButtonStyle.fontColor = DEFAULT_BUTTON_TEXT_COLOR;
TextButton textButton = new TextButton(buttonText, textButtonStyle);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment