Fix: tab color

This commit is contained in:
2019-07-26 22:58:53 +09:00
parent 05418be664
commit 4131f0ccdb
3 changed files with 31 additions and 24 deletions
+8 -7
View File
@@ -67,11 +67,12 @@ BasicTab.prototype.makeActiveLineSprite = function() {
// console.log("strokeWidthPx : " + setting.strokeWidthPx);
// console.log("round : " + setting.roundAmount);
var OFFSET_POS_Y = 7;
var OFFSET_POS_Y = 6;
var ACTIVE_LINE_HEIGHT = 3;
var buttonWidth = setting.width;
var lineWidth = buttonWidth * 3 / 4;
var lineHeight = 5;
var lineHeight = ACTIVE_LINE_HEIGHT;
var texture = null;
texture = new Phaser.Graphics()
@@ -145,8 +146,8 @@ BasicTab.prototype.makeMainText = function() {
var mainText = game.add.text(width, height, "");
mainText.anchor.set(0.5);
mainText.fontSize = this.setting.fontSize;
// mainText.fontWeight = "bolder";
mainText.fontSize = this.setting.mainFontSize;
mainText.fontWeight = "bolder";
mainText.lineSpacing = TabSetting.DEFAULT_TEXT_LINE_SPACING_PX;
return mainText;
@@ -174,7 +175,7 @@ BasicTab.prototype.makeShortcutText = function() {
shortcutText.anchor.set(0.5);
shortcutText.fontSize = BasicTab.SHORTCUT_TEXT_FONTSIZE;
// shortcutText.fontSize = this.setting.shortcutTextSize;
shortcutText.fontSize = this.setting.shortcutFontSize;
shortcutText.fontWeight = "normal";
// shortcutText.addColor(this.setting.textColors.over, 0);
shortcutText.addColor("0xffffff", 0);
@@ -220,7 +221,7 @@ BasicTab.prototype.alignContents = function() {
var offsetRatio = 7;
var offsetMainText = mainTextHeight / offsetRatio;
var offsetShortcutText = shortcutTextHeight / offsetRatio;
var gap = (iconSpriteHeight > 0 ? gap = 0 : BasicTab.SHORTCUT_TEXT_FONTSIZE / 2);
var gap = (iconSpriteHeight > 0 ? 0 : gap = BasicTab.SHORTCUT_TEXT_FONTSIZE / 4);
if(shortcutTextHeight === 0) {
if(mainTextHeight > 0)
@@ -232,7 +233,7 @@ BasicTab.prototype.alignContents = function() {
if(mainTextHeight > 0)
this.mainText.y = this.buttonSprite.height / 2 - shortcutTextHeightHalf + offsetMainText;
else if(iconSpriteHeight > 0)
this.iconSprite.y = this.buttonSprite.height / 2 - shortcutTextHeightHalf; // - gap / 4;
this.iconSprite.y = this.buttonSprite.height / 2 - shortcutTextHeightHalf;
}
this.shortcutText.y = this.buttonSprite.height / 2 + mainContentHeightHalf + offsetShortcutText + gap;