Fixed full screen mode and back
This commit is contained in:
parent
f5f7a0a48b
commit
87ce108bd1
|
@ -129,10 +129,10 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
Gdx.app.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
terminal.registrateScreen(new ScreenDesktop1());
|
||||
terminal.registrateScreen(new ScreenDesktop2());
|
||||
terminal.registrateScreen(new ScreenDesktop3());
|
||||
terminal.registrateScreen(new ScreenDesktop4());
|
||||
terminal.registrateScreen(new ScreenDesktop1(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop2(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop3(bootArgs));
|
||||
terminal.registrateScreen(new ScreenDesktop4(bootArgs));
|
||||
terminal.registrateScreen(new ScreenCredits());
|
||||
terminal.registrateScreen(new ScreenHelp());
|
||||
terminal.registrateScreen(new ScreenIntroMission());
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.badlogic.gdx.Gdx;
|
|||
import imgui.ImGui;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.FontAwesomeIcons;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppLauncher;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
|
@ -28,12 +29,14 @@ import love.distributedrebirth.gdxapp4d.vrgem4.screen.ScreenHelp;
|
|||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskTopScreenMenu {
|
||||
|
||||
private SystemWarpBootArgs bootArgs;
|
||||
private List<GDXAppLauncher> apps;
|
||||
private ImBoolean fileMinimizeSelected = new ImBoolean(false);
|
||||
private ImBoolean fileCloseSelected = new ImBoolean(false);
|
||||
private ImBoolean tosSelfSelected = new ImBoolean(false);
|
||||
|
||||
public DeskTopScreenMenu() {
|
||||
public DeskTopScreenMenu(SystemWarpBootArgs bootArgs) {
|
||||
this.bootArgs = bootArgs;
|
||||
apps = new ArrayList<>();
|
||||
apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp()));
|
||||
apps.add(new GDXAppLauncher("Sys Glyph Set", () -> new SystemBaseGlyphApp()));
|
||||
|
@ -222,11 +225,11 @@ public class DeskTopScreenMenu {
|
|||
ImGui.separator();
|
||||
if (Gdx.graphics.isFullscreen()) {
|
||||
if (ImGui.menuItem(FontAwesomeIcons.Wheelchair + " Window Mode")) {
|
||||
// Gdx.graphics.setWindowedMode(GDXAppVrGem4.INSTANCE.viewWidth, GDXAppVrGem4.INSTANCE.viewHeight);
|
||||
Gdx.graphics.setWindowedMode(bootArgs.getBootWindowWidth(), bootArgs.getBootWindowHeight());
|
||||
}
|
||||
} else {
|
||||
if (ImGui.menuItem(FontAwesomeIcons.FighterJet + " Full Screen")) {
|
||||
// Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
|
||||
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ import imgui.ImGui;
|
|||
import imgui.flag.ImGuiCond;
|
||||
import imgui.flag.ImGuiWindowFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.ImGuiSetup;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppContourSection;
|
||||
|
@ -41,8 +42,8 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
private ModelBatch modelBatch;
|
||||
private Array<ModelInstance> modelInstances = new Array<ModelInstance>();
|
||||
|
||||
public AbstractScreenDesktop(String name) {
|
||||
this.create();
|
||||
public AbstractScreenDesktop(String name, SystemWarpBootArgs bootArgs) {
|
||||
this.create(bootArgs);
|
||||
deskAppScreen = new DeskAppScreen(name);
|
||||
deskAppScreen.addDeskAppListener(new DeskAppScreenListener() {
|
||||
|
||||
|
@ -61,7 +62,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
|
||||
}
|
||||
|
||||
private void create() {
|
||||
private void create(SystemWarpBootArgs bootArgs) {
|
||||
batch = new SpriteBatch();
|
||||
font = new BitmapFont();
|
||||
camera = new OrthographicCamera();
|
||||
|
@ -70,7 +71,7 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
|||
camera.update();
|
||||
batch.setProjectionMatrix(camera.combined);
|
||||
|
||||
screenMenu = new DeskTopScreenMenu();
|
||||
screenMenu = new DeskTopScreenMenu(bootArgs);
|
||||
|
||||
modelBatch = new ModelBatch();
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.screen;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.ScreenAdapter;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
|
||||
import com.badlogic.gdx.graphics.g3d.Material;
|
||||
import com.badlogic.gdx.graphics.g3d.Model;
|
||||
|
@ -12,16 +9,14 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
|
|||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop1 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop1() {
|
||||
super("Desktop1");
|
||||
public ScreenDesktop1(SystemWarpBootArgs bootArgs) {
|
||||
super("Desktop1", bootArgs);
|
||||
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-front.png"));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.screen;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.ScreenAdapter;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
|
||||
import com.badlogic.gdx.graphics.g3d.Material;
|
||||
import com.badlogic.gdx.graphics.g3d.Model;
|
||||
|
@ -12,16 +9,14 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
|
|||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.GDXAppVrGem4;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskAppScreen;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.desktop.DeskTopScreen;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop2 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop2() {
|
||||
super("Desktop2");
|
||||
public ScreenDesktop2(SystemWarpBootArgs bootArgs) {
|
||||
super("Desktop2", bootArgs);
|
||||
//backgroundImage = new Texture(Gdx.files.internal("background/terrydavis-nose.png"));
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@ import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
|
|||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop3 extends AbstractScreenDesktop {
|
||||
private Model grid;
|
||||
|
||||
public ScreenDesktop3() {
|
||||
super("Desktop3");
|
||||
public ScreenDesktop3(SystemWarpBootArgs bootArgs) {
|
||||
super("Desktop3", bootArgs);
|
||||
}
|
||||
|
||||
protected void createModel(ModelBuilder modelBuilder, Array<ModelInstance> modelInstances) {
|
||||
|
|
|
@ -20,6 +20,7 @@ import com.badlogic.gdx.utils.Array;
|
|||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpBootArgs;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class ScreenDesktop4 extends AbstractScreenDesktop {
|
||||
|
@ -35,8 +36,8 @@ public class ScreenDesktop4 extends AbstractScreenDesktop {
|
|||
private float colorFade = 0f;
|
||||
private boolean colorPositive = true;
|
||||
|
||||
public ScreenDesktop4() {
|
||||
super("Desktop4");
|
||||
public ScreenDesktop4(SystemWarpBootArgs bootArgs) {
|
||||
super("Desktop4", bootArgs);
|
||||
shader = new UserColorShader();
|
||||
shader.init();
|
||||
font = new BitmapFont();
|
||||
|
|
Loading…
Reference in a new issue