Skip to content
Snippets Groups Projects
Commit c40a773b authored by Drahomír Karchňák's avatar Drahomír Karchňák
Browse files

#324 Step difficulty sound is not played when changing users...

parent c1610b0c
Branches
Tags
No related merge requests found
......@@ -267,6 +267,8 @@ public class GameMenuPage extends MenuPage {
* Creates and prepares Difficulty slider, Difficulty labels and Buttons
*/
public void prepareDifficulty() {
stepSoundsEnabled = false;
final float difficultyY = getScreen().getSceneInnerHeight() * DIFFICULTY_BOTTOM_OFFSET - pagedScrollPaneOffsetY;
// Difficulty bar
......@@ -283,7 +285,6 @@ public class GameMenuPage extends MenuPage {
diffBarImage.setSize(diffBarWidth, diffBarHeight);
addActor(diffBarImage);
//Difficulty Thumb
final TextureRegion diff = getScreen().getScreenTextureRegion(GameMenuAssets.DIFF_THUMB_EASY);
......@@ -401,10 +402,8 @@ public class GameMenuPage extends MenuPage {
}
});
gameDifficulty = UserDifficultySettingsDAO.getUserSettingsByGame(TablexiaSettings.getInstance().getSelectedUser().getId(), game.getGameNumber());
//dragSwitchListener.switchToStep(gameDifficulty.getDifficultyNumber() - 1);
dragSwitchListener.switchToStep(gameDifficulty.getDifficultyNumber() - 1, false);
//Enabling step sounds later
//so it doesn't play 'em when initially setting difficulties from database...
dragSwitchListener.switchToStep(gameDifficulty.getDifficultyNumber() - 1);
stepSoundsEnabled = true;
}
......@@ -569,8 +568,10 @@ public class GameMenuPage extends MenuPage {
@Override
public void run() {
if (selectedUserEvent.isUserSelected()) {
stepSoundsEnabled = false;
gameDifficulty = UserDifficultySettingsDAO.getUserSettingsByGame(TablexiaSettings.getInstance().getSelectedUser().getId(), game.getGameNumber());
dragSwitchListener.switchToStep(gameDifficulty.getDifficultyNumber() - 1);
stepSoundsEnabled = true;
}
}
});
......
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