mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Merge branch 'master' into 'master'
update StartScene and NewGameScene See merge request core-developers/forge!6307
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package forge.adventure.scene;
|
package forge.adventure.scene;
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
|
import com.badlogic.gdx.Input;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Event;
|
import com.badlogic.gdx.scenes.scene2d.Event;
|
||||||
import com.badlogic.gdx.scenes.scene2d.EventListener;
|
import com.badlogic.gdx.scenes.scene2d.EventListener;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||||
@@ -171,7 +172,13 @@ public class NewGameScene extends UIScene {
|
|||||||
@Override
|
@Override
|
||||||
public void enter() {
|
public void enter() {
|
||||||
Gdx.input.setInputProcessor(stage); //Start taking input from the ui
|
Gdx.input.setInputProcessor(stage); //Start taking input from the ui
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean keyPressed(int keycode) {
|
||||||
|
if (keycode == Input.Keys.ESCAPE || keycode == Input.Keys.BACK) {
|
||||||
|
back();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.badlogic.gdx.Input;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import forge.Forge;
|
import forge.Forge;
|
||||||
import forge.adventure.stage.GameHUD;
|
import forge.adventure.stage.GameHUD;
|
||||||
|
import forge.adventure.stage.MapStage;
|
||||||
import forge.adventure.world.WorldSave;
|
import forge.adventure.world.WorldSave;
|
||||||
import forge.gui.GuiBase;
|
import forge.gui.GuiBase;
|
||||||
|
|
||||||
@@ -39,7 +40,10 @@ public class StartScene extends UIScene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean Resume() {
|
public boolean Resume() {
|
||||||
Forge.switchToLast();
|
if (MapStage.getInstance().isInMap())
|
||||||
|
Forge.switchScene(SceneType.TileMapScene.instance);
|
||||||
|
else
|
||||||
|
Forge.switchScene(SceneType.GameScene.instance);
|
||||||
GameHUD.getInstance().getTouchpad().setVisible(false);
|
GameHUD.getInstance().getTouchpad().setVisible(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user