-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup
1 parent
45e9daa
commit 5634430
Showing
6 changed files
with
10 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 1 addition & 76 deletions
77
RemixedDungeonDesktop/src/libgdx/java/com/nyrds/platform/game/InstallMod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,6 @@ | ||
package com.nyrds.platform.game; | ||
|
||
import com.nyrds.pixeldungeon.game.GameLoop; | ||
import com.nyrds.platform.EventCollector; | ||
import com.nyrds.platform.storage.FileSystem; | ||
|
||
import com.nyrds.util.Unzip; | ||
import com.nyrds.util.UnzipStateListener; | ||
import com.watabou.noosa.InterstitialPoint; | ||
import com.watabou.pixeldungeon.utils.GLog; | ||
import com.watabou.pixeldungeon.utils.Utils; | ||
import com.watabou.pixeldungeon.windows.WndError; | ||
import com.watabou.pixeldungeon.windows.WndMessage; | ||
import com.watabou.pixeldungeon.windows.WndModInstall; | ||
import com.watabou.pixeldungeon.windows.WndModSelect; | ||
|
||
import java.io.FileNotFoundException; | ||
|
||
|
||
import lombok.SneakyThrows; | ||
|
||
public class InstallMod extends RemixedDungeon implements UnzipStateListener, InterstitialPoint{ | ||
|
||
private boolean permissionsRequested = false; | ||
|
||
public InstallMod() { | ||
} | ||
|
||
private String modFileName = Utils.EMPTY_STRING; | ||
|
||
|
||
|
||
public void render() { | ||
super.render(); | ||
} | ||
|
||
private WndMessage unzipProgress; | ||
|
||
@Override | ||
public void UnzipComplete(final Boolean result) { | ||
GameLoop.pushUiTask(() -> { | ||
if(unzipProgress!=null) { | ||
unzipProgress.hide(); | ||
unzipProgress = null; | ||
} | ||
|
||
if (result) { | ||
GameLoop.addToScene(new WndModSelect()); | ||
} else { | ||
GameLoop.addToScene(new WndError(Utils.format("unzipping %s failed", modFileName))); | ||
} | ||
}); | ||
|
||
} | ||
|
||
@Override | ||
public void UnzipProgress(Integer unpacked) { | ||
GameLoop.pushUiTask(() -> { | ||
if (unzipProgress == null) { | ||
unzipProgress = new WndMessage("Unpacking: ...") { | ||
@Override | ||
public void onBackPressed() { } | ||
}; | ||
GameLoop.addToScene(unzipProgress); | ||
} | ||
if (unzipProgress.getParent() == GameLoop.scene()) { | ||
unzipProgress.setText(Utils.format("Unpacking: %d", unpacked)); | ||
} | ||
}); | ||
} | ||
|
||
@SneakyThrows | ||
@Override | ||
public void returnToWork(boolean result) { | ||
GLog.i("Install mod: %b", result); | ||
} | ||
|
||
public class InstallMod extends RemixedDungeon{ | ||
public void installMod() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters