mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Fix Portrait mode Exit/Back key
This commit is contained in:
@@ -175,7 +175,7 @@ public class Forge implements ApplicationListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void back() {
|
public static void back() {
|
||||||
if(destroyThis)
|
if(destroyThis && isLandscapeMode())
|
||||||
return;
|
return;
|
||||||
if (screens.size() < 2) {
|
if (screens.size() < 2) {
|
||||||
exit(false); //prompt to exit if attempting to go back from home screen
|
exit(false); //prompt to exit if attempting to go back from home screen
|
||||||
@@ -494,7 +494,7 @@ public class Forge implements ApplicationListener {
|
|||||||
if(keyCode == Keys.BACK){
|
if(keyCode == Keys.BACK){
|
||||||
if (destroyThis)
|
if (destroyThis)
|
||||||
deviceAdapter.exit();
|
deviceAdapter.exit();
|
||||||
else if(onHomeScreen())
|
else if(onHomeScreen() && isLandscapeMode())
|
||||||
back();
|
back();
|
||||||
}
|
}
|
||||||
if (keyInputAdapter == null) {
|
if (keyInputAdapter == null) {
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ public abstract class GuiDownloadService implements Runnable {
|
|||||||
final String filePath = fileDest.getPath();
|
final String filePath = fileDest.getPath();
|
||||||
final String subLastIndex = filePath.contains("pics") ? "\\pics\\" : "\\db\\";
|
final String subLastIndex = filePath.contains("pics") ? "\\pics\\" : "\\db\\";
|
||||||
|
|
||||||
System.out.println(count + "/" + totalCount + " - ..\\" + filePath.substring(filePath.lastIndexOf(subLastIndex)+1));
|
System.out.println(count + "/" + totalCount + " - .." + filePath.substring(filePath.lastIndexOf(subLastIndex)+1));
|
||||||
|
|
||||||
FileOutputStream fos = null;
|
FileOutputStream fos = null;
|
||||||
try {
|
try {
|
||||||
@@ -295,7 +295,7 @@ public abstract class GuiDownloadService implements Runnable {
|
|||||||
conn.disconnect();
|
conn.disconnect();
|
||||||
if(url.contains("/images/")){
|
if(url.contains("/images/")){
|
||||||
isLogged = true;
|
isLogged = true;
|
||||||
System.out.println("File not found: ../" + url.substring(url.lastIndexOf("/images/")+1));
|
System.out.println("File not found: .." + url.substring(url.lastIndexOf("/images/")+1));
|
||||||
}
|
}
|
||||||
url = url.substring(0,url.length() - 4) + ".png";
|
url = url.substring(0,url.length() - 4) + ".png";
|
||||||
imageUrl = new URL(url);
|
imageUrl = new URL(url);
|
||||||
@@ -316,7 +316,7 @@ public abstract class GuiDownloadService implements Runnable {
|
|||||||
case HttpURLConnection.HTTP_NOT_FOUND:
|
case HttpURLConnection.HTTP_NOT_FOUND:
|
||||||
conn.disconnect();
|
conn.disconnect();
|
||||||
if(url.contains("/images/") && !isJPG && !isLogged)
|
if(url.contains("/images/") && !isJPG && !isLogged)
|
||||||
System.out.println("File not found: ../" + url.substring(url.lastIndexOf("/images/")+1));
|
System.out.println("File not found: .." + url.substring(url.lastIndexOf("/images/")+1));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
conn.disconnect();
|
conn.disconnect();
|
||||||
|
|||||||
Reference in New Issue
Block a user