Refactoring
This commit is contained in:
parent
51d7579f8a
commit
1ed50026fd
@ -28,7 +28,7 @@ import com.badlogic.gdx.Gdx;
|
|||||||
import com.pixelgamelibrary.api.PixelException;
|
import com.pixelgamelibrary.api.PixelException;
|
||||||
import com.pixelgamelibrary.api.Platform;
|
import com.pixelgamelibrary.api.Platform;
|
||||||
import com.pixelgamelibrary.api.interfaces.App;
|
import com.pixelgamelibrary.api.interfaces.App;
|
||||||
import com.pixelgamelibrary.api.Game;
|
import com.pixelgamelibrary.api.game.Game;
|
||||||
import com.pixelgamelibrary.api.PixelFeature;
|
import com.pixelgamelibrary.api.PixelFeature;
|
||||||
import com.pixelgamelibrary.api.utils.ClipBoard;
|
import com.pixelgamelibrary.api.utils.ClipBoard;
|
||||||
import com.pixelgamelibrary.api.utils.LogLevel;
|
import com.pixelgamelibrary.api.utils.LogLevel;
|
||||||
|
@ -21,7 +21,7 @@ package com.pixelgamelibrary.backend.libgdx;
|
|||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Graphics;
|
import com.badlogic.gdx.Graphics;
|
||||||
import com.pixelgamelibrary.api.WindowMode;
|
import com.pixelgamelibrary.api.DisplayMode;
|
||||||
import com.pixelgamelibrary.api.PixelException;
|
import com.pixelgamelibrary.api.PixelException;
|
||||||
import com.pixelgamelibrary.api.utils.Monitor;
|
import com.pixelgamelibrary.api.utils.Monitor;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -37,7 +37,7 @@ public class GraphicsLibGDXImpl implements com.pixelgamelibrary.api.interfaces.G
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WindowMode setDisplayMode(boolean fullscreen, boolean window) {
|
public DisplayMode setDisplayMode(boolean fullscreen, boolean window) {
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
Graphics.Monitor currentMonitor = Gdx.graphics.getMonitor();
|
Graphics.Monitor currentMonitor = Gdx.graphics.getMonitor();
|
||||||
@ -67,13 +67,13 @@ public class GraphicsLibGDXImpl implements com.pixelgamelibrary.api.interfaces.G
|
|||||||
Gdx.app.error("InitScreen", "Switching to fullscreen mode failed.");
|
Gdx.app.error("InitScreen", "Switching to fullscreen mode failed.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return WindowMode.FULLSCREEN;
|
return DisplayMode.FULLSCREEN;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (window) {
|
if (window) {
|
||||||
setToOriginalDisplayMode();
|
setToOriginalDisplayMode();
|
||||||
Gdx.graphics.setWindowedMode(640, 480);
|
Gdx.graphics.setWindowedMode(640, 480);
|
||||||
return WindowMode.WINDOW;
|
return DisplayMode.WINDOW;
|
||||||
}
|
}
|
||||||
throw new PixelException("Unsupported DisplayMode: fullscreen=" + fullscreen + " window=" + window);
|
throw new PixelException("Unsupported DisplayMode: fullscreen=" + fullscreen + " window=" + window);
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
package com.pixelgamelibrary.backend.libgdx.game;
|
package com.pixelgamelibrary.backend.libgdx.game;
|
||||||
|
|
||||||
import com.pixelgamelibrary.api.GameWrapper;
|
import com.pixelgamelibrary.api.game.GameWrapper;
|
||||||
import com.pixelgamelibrary.api.OnSetScreenListener;
|
import com.pixelgamelibrary.api.OnSetScreenListener;
|
||||||
import com.pixelgamelibrary.backend.libgdx.screen.LibGdxScreen;
|
import com.pixelgamelibrary.backend.libgdx.screen.LibGdxScreen;
|
||||||
import com.pixelgamelibrary.api.Game;
|
import com.pixelgamelibrary.api.game.Game;
|
||||||
import com.pixelgamelibrary.api.Screen;
|
import com.pixelgamelibrary.api.screen.Screen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
package com.pixelgamelibrary.backend.libgdx.screen;
|
package com.pixelgamelibrary.backend.libgdx.screen;
|
||||||
|
|
||||||
import com.pixelgamelibrary.api.ScreenWrapper;
|
import com.pixelgamelibrary.api.screen.ScreenWrapper;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import com.pixelgamelibrary.api.Screen;
|
import com.pixelgamelibrary.api.screen.Screen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -26,7 +26,7 @@ import com.pixelgamelibrary.api.interfaces.Internal;
|
|||||||
import com.pixelgamelibrary.api.interfaces.Net;
|
import com.pixelgamelibrary.api.interfaces.Net;
|
||||||
import com.pixelgamelibrary.api.interfaces.Utils;
|
import com.pixelgamelibrary.api.interfaces.Utils;
|
||||||
import com.pixelgamelibrary.api.interfaces.App;
|
import com.pixelgamelibrary.api.interfaces.App;
|
||||||
import com.pixelgamelibrary.api.Game;
|
import com.pixelgamelibrary.api.game.Game;
|
||||||
import com.pixelgamelibrary.api.PixelFeature;
|
import com.pixelgamelibrary.api.PixelFeature;
|
||||||
import com.pixelgamelibrary.api.utils.ClipBoard;
|
import com.pixelgamelibrary.api.utils.ClipBoard;
|
||||||
import com.pixelgamelibrary.api.utils.LogLevel;
|
import com.pixelgamelibrary.api.utils.LogLevel;
|
||||||
|
Reference in New Issue
Block a user