Skip to content

Commit

Permalink
Fixes misaligned stats text labels in game view.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stimulant committed May 8, 2024
1 parent c38334a commit 1ff35d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/ui/styles/item/dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@
width: 60.0rem;
left: 50%;
margin-left: -30.0rem;
margin-top: 15.0rem;
margin-top: 25.0rem;
}
}
2 changes: 1 addition & 1 deletion app/view/nodes/cards/BottomDeckCardNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const BottomDeckCardNode = SdkNode.extend({

// mana token
this.manaTokenSprite = BaseSprite.create(RSX.icon_mana.img);
this.manaTokenSprite.setAnchorPoint(0.5, 0.5);
this.manaTokenSprite.setAnchorPoint(0.49, 0.45);
this.manaTokenSprite.setPosition(cc.p(contentSize.width * 0.5, contentSize.height * 0.5 - 50.0));
this.manaTokenSprite.setScale(0.65);

Expand Down
6 changes: 3 additions & 3 deletions app/view/nodes/cards/CardNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ var CardNode = SdkNode.extend({
// mana label
this.manaLabel = new cc.LabelTTF('', RSX.font_bold.name, 24, cc.size(48, 24), cc.TEXT_ALIGNMENT_CENTER);
this.manaLabel.setFontFillColor({ r: 0, g: 33, b: 159 });
this.manaLabel.setAnchorPoint(0.5, 0.5);
this.manaLabel.setAnchorPoint(0.51, 0.65);
this.manaLabel.setVisible(false);
this._staticContainerNodeFront.addChild(this.manaLabel, 2);

Expand Down Expand Up @@ -340,8 +340,8 @@ var CardNode = SdkNode.extend({
// contained elements relative to center
this._manaGemSprite.setPosition(-100, cardBackgroundContentSize.height * 0.5 - 20);
this.manaLabel.setPosition(-100, cardBackgroundContentSize.height * 0.5 - 17);
this.atkLabel.setPosition(-61, -28);
this.hpLabel.setPosition(59, -28);
this.atkLabel.setPosition(-61, -32);
this.hpLabel.setPosition(59, -32);
this.cardNameLabel.setPosition(0.0, 21.0);
this.cardTypeLabel.setPosition(0.0, 4.0);
this.factionNameLabel.setPosition(0.0, -150.0);
Expand Down
4 changes: 2 additions & 2 deletions app/view/nodes/cards/StatsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const StatsNode = EntitySupportNode.extend({
this.atkLabel = new cc.LabelTTF('', RSX.font_regular.name, CONFIG.OVERLAY_STATS_TEXT_SIZE);
this.atkLabel.setFontFillColor(cc.color.WHITE);
this.atkLabel.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
this.atkLabel.setAnchorPoint(cc.p(0.5, 0.5));
this.atkLabel.setAnchorPoint(cc.p(0.5, 0.65));
this.addChild(this.atkLabel);

this.hpLabel = new cc.LabelTTF('', RSX.font_regular.name, CONFIG.OVERLAY_STATS_TEXT_SIZE);
this.hpLabel.setFontFillColor(cc.color.WHITE);
this.hpLabel.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
this.hpLabel.setAnchorPoint(cc.p(0.5, 0.5));
this.hpLabel.setAnchorPoint(cc.p(0.5, 0.65));
this.addChild(this.hpLabel);

// position stats
Expand Down

0 comments on commit 1ff35d0

Please sign in to comment.