mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Create symbolic links to allow asset files to be shared amongst gui projects
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="assets"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
|
||||
@@ -30,4 +30,11 @@
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>assets</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/forge-gui/res</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
||||
@@ -8,7 +8,7 @@ public class ForgeGame implements ApplicationListener {
|
||||
@Override
|
||||
public void create () {
|
||||
FSkin.loadLight("default", true);
|
||||
FSkin.loadFull(true);
|
||||
//FSkin.loadFull(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.Map;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.badlogic.gdx.Application.ApplicationType;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
@@ -1051,15 +1052,22 @@ public class FSkin {
|
||||
public static ArrayList<String> getSkinDirectoryNames() {
|
||||
final ArrayList<String> mySkins = new ArrayList<String>();
|
||||
|
||||
final FileHandle dir = Gdx.files.internal(FILE_SKINS_DIR);
|
||||
final String[] children = dir.file().list();
|
||||
if (children == null) {
|
||||
final FileHandle dir;
|
||||
if (Gdx.app.getType() == ApplicationType.Desktop) {
|
||||
dir = Gdx.files.internal("./bin/" + FILE_SKINS_DIR); //needed to iterate over directory for Desktop
|
||||
}
|
||||
else {
|
||||
dir = Gdx.files.internal(FILE_SKINS_DIR);
|
||||
}
|
||||
if (!dir.exists() || !dir.isDirectory()) {
|
||||
System.err.println("FSkin > can't find skins directory!");
|
||||
} else {
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
if (children[i].equalsIgnoreCase(".svn")) { continue; }
|
||||
if (children[i].equalsIgnoreCase(".DS_Store")) { continue; }
|
||||
mySkins.add(children[i]);
|
||||
}
|
||||
else {
|
||||
for (FileHandle skinFile : dir.list()) {
|
||||
String skinName = skinFile.name();
|
||||
if (skinName.equalsIgnoreCase(".svn")) { continue; }
|
||||
if (skinName.equalsIgnoreCase(".DS_Store")) { continue; }
|
||||
mySkins.add(skinName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<link>
|
||||
<name>assets</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/forge-m-android/assets</locationURI>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/forge-gui/res</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
||||
Reference in New Issue
Block a user