Add option to disable card animation

This commit is contained in:
uecasm 2013-11-14 23:59:56 +13:00
parent 7e7be6c54e
commit 6369f2ab8f
3 changed files with 16 additions and 0 deletions

View File

@ -579,6 +579,19 @@ span.debug, span.admin {
font-weight:700;
}
.checkbox {
margin-right: 4px;
white-space: nowrap;
}
.checkbox input {
vertical-align: middle;
}
.checkbox span {
vertical-align: middle;
}
.nowrap {
white-space: nowrap;
}

View File

@ -262,6 +262,7 @@ HttpSession hSession = request.getSession(true);
<input type="button" class="game_show_last_round game_menu_bar" value="Show Last Round"
disabled="disabled" />
<input type="button" class="game_show_options game_menu_bar" value="Hide Game Options" />
<label class="game_menu_bar checkbox"><input type="checkbox" class="game_animate_cards" checked="checked" /><span> Animate Cards</span></label>
<div class="game_message" role="status">
Waiting for server...
</div>

View File

@ -534,6 +534,7 @@ cah.Game.prototype.addRoundWhiteCard_ = function(cards) {
* @private
*/
cah.Game.prototype.handCardMouseEnter_ = function(e) {
if (!$(".game_animate_cards", this.element_).attr("checked")) return;
$(e.data.card.getElement()).css("z-index", "2").animate({
scale : this.handCardLargeScale_,
width : this.handCardLargeSize_,
@ -567,6 +568,7 @@ cah.Game.prototype.handCardMouseLeave_ = function(e) {
* @private
*/
cah.Game.prototype.roundCardMouseEnter_ = function(e) {
if (!$(".game_animate_cards", this.element_).attr("checked")) return;
$(e.data.card.getElement()).css("z-index", "201").animate({
scale : this.roundCardLargeScale_,
width : this.roundCardLargeSize_,