diff --git a/android/assets/font/roboto-bold.fnt b/android/assets/font/roboto-bold.fnt index e3ac72372cd9c817b628e044fe8c885902e88268..46f4e163e437202dc8a015c7e529e0c6c5b4b1ed 100644 --- a/android/assets/font/roboto-bold.fnt +++ b/android/assets/font/roboto-bold.fnt @@ -200,4 +200,6 @@ char id=366 x=457 y=0 width=35 height=46 xoffset=-8 yoffset=-8 xad char id=367 x=351 y=138 width=32 height=41 xoffset=-8 yoffset=-3 xadvance=18 page=0 chnl=0 char id=381 x=312 y=93 width=34 height=45 xoffset=-8 yoffset=-7 xadvance=19 page=0 chnl=0 char id=382 x=40 y=262 width=31 height=40 xoffset=-8 yoffset=-2 xadvance=16 page=0 chnl=0 +char id=8220 x=207 y=487 width=27 height=24 xoffset=-8 yoffset=-2 xadvance=13 page=0 chnl=0 +char id=8222 x=179 y=487 width=28 height=25 xoffset=-8 yoffset=18 xadvance=13 page=0 chnl=0 char id=8230 x=0 y=489 width=37 height=21 xoffset=-8 yoffset=17 xadvance=24 page=0 chnl=0 diff --git a/android/assets/font/roboto-bold.png b/android/assets/font/roboto-bold.png index 825ced713d546006108b3c9d7f2f8012d7544575..bc30d0a40b3b3c7412085fc2252164868333b382 100644 Binary files a/android/assets/font/roboto-bold.png and b/android/assets/font/roboto-bold.png differ diff --git a/android/assets/font/roboto-regular.fnt b/android/assets/font/roboto-regular.fnt index d83664e06cb25230afb7042bfb19a2ac1226e00b..4c938b4e86536a0f3e6e56d9921a1e25e769234d 100644 --- a/android/assets/font/roboto-regular.fnt +++ b/android/assets/font/roboto-regular.fnt @@ -199,4 +199,6 @@ char id=366 x=305 y=0 width=33 height=47 xoffset=-8 yoffset=-9 xad char id=367 x=297 y=140 width=30 height=41 xoffset=-8 yoffset=-3 xadvance=18 page=0 chnl=0 char id=381 x=431 y=95 width=33 height=45 xoffset=-8 yoffset=-7 xadvance=19 page=0 chnl=0 char id=382 x=180 y=382 width=30 height=39 xoffset=-8 yoffset=-1 xadvance=16 page=0 chnl=0 +char id=8220 x=457 y=475 width=26 height=23 xoffset=-8 yoffset=-2 xadvance=11 page=0 chnl=0 +char id=8222 x=431 y=475 width=26 height=25 xoffset=-8 yoffset=18 xadvance=11 page=0 chnl=0 char id=8230 x=340 y=454 width=33 height=20 xoffset=-8 yoffset=18 xadvance=21 page=0 chnl=0 diff --git a/android/assets/font/roboto-regular.png b/android/assets/font/roboto-regular.png index ce5555e227f6589fcda14084a672adfebe7c9cf3..e99f24536618c2d031101372ac4dc3d8bce080f3 100644 Binary files a/android/assets/font/roboto-regular.png and b/android/assets/font/roboto-regular.png differ diff --git a/core/src/cz/nic/tablexia/debug/DebugInfo.java b/core/src/cz/nic/tablexia/debug/DebugInfo.java index ef726f3f2746ec69853b97872c6a65360dcab43d..54b7ecd033977c867670adffa60f353203857a2c 100644 --- a/core/src/cz/nic/tablexia/debug/DebugInfo.java +++ b/core/src/cz/nic/tablexia/debug/DebugInfo.java @@ -2,12 +2,9 @@ package cz.nic.tablexia.debug; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; -import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Cell; import com.badlogic.gdx.scenes.scene2d.ui.Container; -import com.badlogic.gdx.scenes.scene2d.ui.Label; -import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; import com.badlogic.gdx.utils.Disposable; @@ -22,8 +19,10 @@ import cz.nic.tablexia.TablexiaApplication.ScreenChangedEvent; import cz.nic.tablexia.TablexiaSettings; import cz.nic.tablexia.bus.ApplicationBus; import cz.nic.tablexia.loader.application.ApplicationAtlasManager; +import cz.nic.tablexia.loader.application.ApplicationFontManager; import cz.nic.tablexia.shared.model.User; import cz.nic.tablexia.screen.AbstractTablexiaScreen.ScreenInfoEvent; +import cz.nic.tablexia.util.ui.TablexiaLabel; import static com.badlogic.gdx.scenes.scene2d.actions.Actions.alpha; @@ -36,18 +35,18 @@ public class DebugInfo extends Table implements Disposable { private static class DebugInfoComponent extends Table { - private Map<String, Label> infoLabelMap; - private LabelStyle labelStyle; + private Map<String, TablexiaLabel> infoLabelMap; + private TablexiaLabel.TablexiaLabelStyle labelStyle; public DebugInfoComponent() { - infoLabelMap = new HashMap<String, Label>(); + infoLabelMap = new HashMap<String, TablexiaLabel>(); setBackground(new TextureRegionDrawable(ApplicationAtlasManager.getInstance().getColorTextureRegion(BACKGROUND_COLOR))); addAction(alpha(BACKGROUND_ALPHA)); - labelStyle = new LabelStyle(new BitmapFont(), FONT_COLOR); + labelStyle = new TablexiaLabel.TablexiaLabelStyle(ApplicationFontManager.FontType_NEW.REGULAR_12, FONT_COLOR); } public synchronized void setInfoValue(String infoKey, String infoValue) { - Label label = infoLabelMap.get(infoKey); + TablexiaLabel label = infoLabelMap.get(infoKey); if (label == null) { createInfoLabel(infoKey, infoValue); } else { @@ -61,12 +60,12 @@ public class DebugInfo extends Table implements Disposable { } private void createInfoLabel(String infoKey, String infoValue) { - Label infoLabel = new Label(infoKey + KEY_COLON + infoValue, labelStyle); + TablexiaLabel infoLabel = new TablexiaLabel(infoKey + KEY_COLON + infoValue, labelStyle); infoLabelMap.put(infoKey, infoLabel); clearChildren(); - for (Label label : infoLabelMap.values()) { - Cell<Label> cell = add(label); + for (TablexiaLabel label : infoLabelMap.values()) { + Cell<TablexiaLabel> cell = add(label); if (getCells().size > 1) { cell.pad(0, INFO_PADDING, 0, 0); } @@ -138,7 +137,7 @@ public class DebugInfo extends Table implements Disposable { public void update() { if (applicationDebugInfo != null) { User selectedUser = TablexiaSettings.getInstance().getSelectedUser(); - applicationDebugInfo.setInfoValue(USER, selectedUser == null ? NO_VALUE : selectedUser.getName() + "[" + selectedUser.getId() + "]"); + applicationDebugInfo.setInfoValue(USER, selectedUser == null ? NO_VALUE : selectedUser.getName() + " (" + selectedUser.getId() + ")"); applicationDebugInfo.setInfoValue(FPS, "" + Gdx.graphics.getFramesPerSecond()); applicationDebugInfo.setInfoValue(JAVA_HEAP, ("" + Gdx.app.getJavaHeap() / MB_SIZE) + UNIT_MB); applicationDebugInfo.setInfoValue(NATIVE_HEAP, ("" + Gdx.app.getNativeHeap() / MB_SIZE) + UNIT_MB); diff --git a/core/src/cz/nic/tablexia/loader/application/ApplicationFontManager.java b/core/src/cz/nic/tablexia/loader/application/ApplicationFontManager.java index 50372d530ffe97c93b62763bccc6b3ffef0f0b87..354d3812208cb12c1bc3ea36dd9676ebff703ae3 100644 --- a/core/src/cz/nic/tablexia/loader/application/ApplicationFontManager.java +++ b/core/src/cz/nic/tablexia/loader/application/ApplicationFontManager.java @@ -143,5 +143,8 @@ public class ApplicationFontManager implements IApplicationLoader { @Override public synchronized void dispose() { instance = null; + robotoRegularFont.dispose(); + robotoBoldFont.dispose(); + distanceFieldShader.dispose(); } } \ No newline at end of file