Commit b8ac02f9 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#771 Changed the path of Tablexia assets storage on Desktop.

parent a3cbf591
......@@ -22,11 +22,11 @@ import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.assets.loaders.resolvers.ExternalFileHandleResolver;
import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver;
import com.badlogic.gdx.assets.loaders.resolvers.LocalFileHandleResolver;
import com.badlogic.gdx.files.FileHandle;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.util.Log;
import cz.nic.tablexia.util.TablexiaFileHandleResolver;
public abstract class TablexiaAbstractFileManager extends AssetManager {
......@@ -63,7 +63,7 @@ public abstract class TablexiaAbstractFileManager extends AssetManager {
private enum BuildTypeFileHandler {
EXTERNAL(TablexiaSettings.BuildType.ITEST, new ExternalFileHandleResolver()),
LOCAL(null, new LocalFileHandleResolver());
LOCAL(null, new TablexiaFileHandleResolver());
private TablexiaSettings.BuildType buildType;
private FileHandleResolver fileHandlerResolver;
......
/*
*
* * Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
* *
* * This program is free software: you can redistribute it and/or modify
* * it under the terms of the GNU General Public License as published by
* * the Free Software Foundation, either version 3 of the License, or
* * (at your option) any later version.
* *
* * This program is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
* *
* * You should have received a copy of the GNU General Public License
* * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
*
*/
package cz.nic.tablexia.util;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.FileHandleResolver;
import com.badlogic.gdx.files.FileHandle;
import cz.nic.tablexia.TablexiaSettings;
public class TablexiaFileHandleResolver implements FileHandleResolver {
@Override
public FileHandle resolve(String fileName) {
return TablexiaSettings.getInstance().getPlatform().equals(TablexiaSettings.Platform.DESKTOP) ? Gdx.files.external(fileName) : Gdx.files.internal(fileName);
}
}
Markdown is supported
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