1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-10-31 10:36:53 +00:00

realign strength display

This commit is contained in:
exane 2015-06-30 12:34:57 +02:00
parent 2f605767ec
commit 4863e0e634
4 changed files with 26 additions and 17 deletions

View File

@ -120,9 +120,7 @@ $game-height: 800px;
margin: 3px; margin: 3px;
height: 90px; height: 90px;
overflow: hidden; overflow: hidden;
/*img {
height: 120px;
}*/
i { i {
display: block; display: block;
@ -139,29 +137,32 @@ $game-height: 800px;
font-size: 20px; font-size: 20px;
color: black; color: black;
}*/ }*/
.card-attr-positive { .card-attr-positive span {
color: #00b000; color: #00b000 !important;
} }
span { .card-attr-power {
color: #ff2d00;
font-weight: bold;
font-size: 16px;
position: absolute; position: absolute;
text-shadow: 1px 1px 1px #101010; margin-top: -3px;
text-align: center; margin-left: -4px;
//margin-top: 62px;
//margin-left: 3px;
//margin-top: 2px; //margin-top: 2px;
cursor: default; cursor: default;
//background: #ffffff;
//border-radius: 10px;
//padding: 2px;
padding-top: 4px; padding-top: 4px;
//padding-left: -4px; //padding-left: -4px;
height: 37px; height: 37px;
width: 30px; width: 30px;
background: url("../../assets/card_strength_border.png") no-repeat; background: url("../../assets/card_strength_border.png") no-repeat;
span {
color: #ff2d00;
text-shadow: 1px 1px 1px #101010;
text-align: center;
font-weight: bold;
font-size: 16px;
width: 30px;
display: block;
margin-left: -2px;
}
} }
&.disabled { &.disabled {
@ -305,6 +306,7 @@ $game-height: 800px;
z-index: 200; z-index: 200;
width: 100%; width: 100%;
} }
.notification { .notification {
height: 0; height: 0;
margin-left: 250px; margin-left: 250px;

View File

@ -1,6 +1,10 @@
{{#each this}} {{#each this}}
<div class="card{{#if _disabled}} disabled{{/if}}" data-key="{{_key}}" data-id="{{_id}}"> <div class="card{{#if _disabled}} disabled{{/if}}" data-key="{{_key}}" data-id="{{_id}}">
{{#if diff}}<span class="card-attr-power {{#if diffPos}}card-attr-positive{{/if}}">{{power}}</span>{{/if}} {{#if diff}}
<span class="card-attr-power {{#if diffPos}}card-attr-positive{{/if}}">
<span>{{power}}</span>
</span>
{{/if}}
<i class="card-sm-{{_data.faction}} card-sm-{{_data.faction}}-{{_data.img}}"></i> <i class="card-sm-{{_data.faction}} card-sm-{{_data.faction}}-{{_data.img}}"></i>
</div> </div>
{{/each}} {{/each}}

View File

@ -62,6 +62,7 @@ var Battle = (function(){
this.p2.draw(10); this.p2.draw(10);
this.update(); this.update();

View File

@ -10,6 +10,7 @@ var CardManager = (function(){
*/ */
this._id = 0; this._id = 0;
this._cards = {};
}; };
var r = CardManager.prototype; var r = CardManager.prototype;
/** /**
@ -19,6 +20,7 @@ var CardManager = (function(){
*/ */
r._id = null; r._id = null;
r._cards = null;
r.create = function(key, owner) { r.create = function(key, owner) {
return this._cards[this._id] = Card(key, owner, this._id++); return this._cards[this._id] = Card(key, owner, this._id++);