Commit 0c870a06 authored by Drahomír Karchňák's avatar Drahomír Karchňák

Revert "Merge branch 'feature-desktop-runes' into 'V3.5.1'"

This reverts merge request !586
parent f5e50d1d
......@@ -142,18 +142,16 @@ public class RunesGame extends AbstractTablexiaGame<RunesGameState> {
setActorToFullScene(background);
// click listener to fold all holders on click on background
if(TablexiaSettings.getInstance().getPlatform() != TablexiaSettings.Platform.DESKTOP) {
getStage().addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
if (event.getTarget().equals(background)) {
holderManager.foldAll();
}
Log.debug(getClass(), "Clicked x:" + x / getSceneWidth() + ", y:" + y / getSceneInnerHeight());
super.clicked(event, x, y);
getStage().addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
if (event.getTarget().equals(background)) {
holderManager.foldAll();
}
});
}
Log.debug(getClass(),"Clicked x:" + x/getSceneWidth() + ", y:" + y/getSceneInnerHeight());
super.clicked(event, x, y);
}
});
}
......@@ -272,21 +270,16 @@ public class RunesGame extends AbstractTablexiaGame<RunesGameState> {
private void initHolders() {
int maxGroups = PositionDefinition.getGroupsCount(getData().getRound(), getGameDifficulty());
TablexiaSettings settings = TablexiaSettings.getInstance();
for (int i = 0; i < maxGroups; i++) {
final RunesHolder runesHolder = HolderManager.createHolder(targetPlate.getActiveTargetsDescriptions(),runesDifficultyDefinition);
runesHolder.init();
if(settings.getPlatform() != TablexiaSettings.Platform.DESKTOP) {
runesHolder.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
holderManager.switchFolded(runesHolder);
super.clicked(event, x, y);
}
});
}
runesHolder.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
holderManager.switchFolded(runesHolder);
super.clicked(event, x, y);
}
});
holderManager.getHolders().add(runesHolder);
runesGroup.addActor(runesHolder);
}
......@@ -327,10 +320,7 @@ public class RunesGame extends AbstractTablexiaGame<RunesGameState> {
holderManager.moveHolders(newPositions, getSceneWidth(), getSceneInnerHeight());
holderManager.updateHolders(targetPlate.getActiveTargetsDescriptions(), getData().getRound());
holderManager.addHoldersActors(runesLibrary, correctRuneListener);
if(TablexiaSettings.getInstance().getPlatform() != TablexiaSettings.Platform.DESKTOP) {
holderManager.foldAll();
}
holderManager.foldAll();
}
......
Markdown is supported
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