Per-unit cap (still broken)

This commit is contained in:
Anuken
2020-07-21 15:43:02 -04:00
parent 4ef0143928
commit 5c9e005397
20 changed files with 3758 additions and 1996 deletions

View File

@@ -28,6 +28,7 @@ import java.util.*;
public class Fonts{
private static ObjectIntMap<String> unicodeIcons = new ObjectIntMap<>();
private static ObjectMap<String, String> stringIcons = new ObjectMap<>();
public static BitmapFont def;
public static BitmapFont outline;
@@ -39,6 +40,10 @@ public class Fonts{
return unicodeIcons.get(content, 0);
}
public static String getUnicodeStr(String content){
return stringIcons.get(content, "");
}
/** Called from a static context to make the cursor appear immediately upon startup.*/
public static void loadSystemCursors(){
SystemCursor.arrow.set(Core.graphics.newCursor("cursor", cursorScale()));
@@ -86,6 +91,7 @@ public class Fonts{
}
unicodeIcons.put(nametex[0], ch);
stringIcons.put(nametex[0], ((char)ch) + "");
Glyph glyph = new Glyph();
glyph.id = ch;