Skip to content
Snippets Groups Projects
Commit f96a863c authored by Anton Danilov's avatar Anton Danilov Committed by Anton Danilov
Browse files

#663 Fixed freeze of application after touching multiple games at same time

parent 8f46fc54
Branches feature-test-profile
Tags
No related merge requests found
......@@ -20,6 +20,7 @@ package cz.nic.tablexia.screen.gamemenu.actors;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
......@@ -142,6 +143,7 @@ public class WallOfGames extends Group {
if (event.getListenerActor().getUserObject() != null) {
GameIconDefinition.performIconAction((GameIconDefinition) (event.getListenerActor().getUserObject()));
}
setGameIconButtonsTouchable(Touchable.disabled);
hide();
super.clicked(event, x, y);
}
......@@ -209,6 +211,7 @@ public class WallOfGames extends Group {
if (!stage.getActors().contains(this, false)) stage.addActor(this);
addAction(Actions.fadeIn(SHOW_HIDE_FADE_DURATION));
shown = true;
setGameIconButtonsTouchable(Touchable.enabled);
}
public void hide() {
......@@ -226,6 +229,12 @@ public class WallOfGames extends Group {
return shown;
}
private void setGameIconButtonsTouchable(Touchable touchable) {
for(Actor iconButton : buttonsGroup.getChildren() ) {
iconButton.setTouchable(touchable);
}
}
public enum GameIconDefinition {
ROBBERY(OfficeMenuAssets.WALL_OF_GAMES_ICON_ROBBERY, OfficeMenuAssets.WALL_OF_GAMES_ICON_ROBBERY_PRESSED, 0.1f, 0.65f, GameDefinition.ROBBERY),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment