mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fix file paths
This commit is contained in:
@@ -71,13 +71,7 @@ public class GuiMobile implements IGuiBase {
|
||||
case Desktop:
|
||||
return "../forge-gui/";
|
||||
case Android:
|
||||
break;
|
||||
case Applet:
|
||||
break;
|
||||
case WebGL:
|
||||
break;
|
||||
case iOS:
|
||||
break;
|
||||
break; //TODO
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class FSkinFont {
|
||||
String dir = FSkin.getDir();
|
||||
|
||||
//generate .fnt and .png files from .ttf if needed
|
||||
FileHandle ttfFile = Gdx.files.internal(dir + TTF_FILE);
|
||||
FileHandle ttfFile = Gdx.files.local(dir + TTF_FILE);
|
||||
if (ttfFile.exists()) {
|
||||
FreeTypeFontGenerator generator = new FreeTypeFontGenerator(ttfFile);
|
||||
font = generator.generateFont(size);
|
||||
|
||||
@@ -256,7 +256,7 @@ public enum FSkinImage implements FImage {
|
||||
String preferredFile = preferredDir + filename;
|
||||
Texture texture = textures.get(preferredFile);
|
||||
if (texture == null) {
|
||||
FileHandle file = Gdx.files.internal(preferredFile);
|
||||
FileHandle file = Gdx.files.local(preferredFile);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
texture = new Texture(file);
|
||||
@@ -328,7 +328,7 @@ public enum FSkinImage implements FImage {
|
||||
String defaultFile = defaultDir + filename;
|
||||
texture = textures.get(defaultFile);
|
||||
if (texture == null) {
|
||||
FileHandle file = Gdx.files.internal(defaultFile);
|
||||
FileHandle file = Gdx.files.local(defaultFile);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
texture = new Texture(file);
|
||||
|
||||
@@ -22,7 +22,7 @@ public enum FSkinTexture implements FImage {
|
||||
|
||||
public void load(String preferredDir, String defaultDir) {
|
||||
String preferredFile = preferredDir + filename;
|
||||
FileHandle file = Gdx.files.internal(preferredFile);
|
||||
FileHandle file = Gdx.files.local(preferredFile);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
texture = new Texture(file);
|
||||
@@ -35,7 +35,7 @@ public enum FSkinTexture implements FImage {
|
||||
if (texture == null) {
|
||||
//use default file if can't use preferred file
|
||||
String defaultFile = defaultDir + filename;
|
||||
file = Gdx.files.internal(defaultFile);
|
||||
file = Gdx.files.local(defaultFile);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
texture = new Texture(file);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ImageCache {
|
||||
static {
|
||||
Texture defImage = null;
|
||||
try {
|
||||
defImage = new Texture(Gdx.files.internal(ForgeConstants.NO_CARD_FILE));
|
||||
defImage = new Texture(Gdx.files.local(ForgeConstants.NO_CARD_FILE));
|
||||
} catch (Exception ex) {
|
||||
System.err.println("could not load default card image");
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user