disable chaning to polymover when changing from storyboard (close #102)
This commit is contained in:
parent
5e8d218000
commit
c88035a66c
|
@ -18,11 +18,13 @@
|
|||
|
||||
package itdelatrisu.opsu;
|
||||
|
||||
import awlex.ospu.polymover.factory.PolyMoverFactory;
|
||||
import itdelatrisu.opsu.audio.MusicController;
|
||||
import itdelatrisu.opsu.beatmap.Beatmap;
|
||||
import itdelatrisu.opsu.beatmap.TimingPoint;
|
||||
import itdelatrisu.opsu.skins.Skin;
|
||||
import itdelatrisu.opsu.skins.SkinLoader;
|
||||
import itdelatrisu.opsu.states.Game;
|
||||
import itdelatrisu.opsu.ui.Fonts;
|
||||
import itdelatrisu.opsu.ui.UI;
|
||||
|
||||
|
@ -614,6 +616,11 @@ public class Options {
|
|||
|
||||
@Override
|
||||
public void clickListItem(int index) {
|
||||
if (Game.isInGame && Dancer.moverFactories[index] instanceof PolyMoverFactory) {
|
||||
// TODO remove this when #79 is fixed
|
||||
UI.sendBarNotification("This mover is disabled in the storyboard right now");
|
||||
return;
|
||||
}
|
||||
Dancer.instance.setMoverFactoryIndex(index);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ import yugecin.opsudance.ui.SBOverlay;
|
|||
* "Game" state.
|
||||
*/
|
||||
public class Game extends BasicGameState {
|
||||
public static boolean isInGame; // TODO delete this when #79 is fixed
|
||||
/** Game restart states. */
|
||||
public enum Restart {
|
||||
/** No restart. */
|
||||
|
@ -1351,6 +1352,7 @@ public class Game extends BasicGameState {
|
|||
@Override
|
||||
public void enter(GameContainer container, StateBasedGame game)
|
||||
throws SlickException {
|
||||
isInGame = true;
|
||||
if (!skippedToCheckpoint) {
|
||||
UI.enter();
|
||||
}
|
||||
|
@ -1569,6 +1571,7 @@ public class Game extends BasicGameState {
|
|||
@Override
|
||||
public void leave(GameContainer container, StateBasedGame game)
|
||||
throws SlickException {
|
||||
isInGame = false;
|
||||
// container.setMouseGrabbed(false);
|
||||
skippedToCheckpoint = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user