Add: TypingAppButton - showEmptyDisabled
This commit is contained in:
@@ -36,7 +36,7 @@ function BackButton(clickEvent) {
|
||||
|
||||
this.addIcon("home");
|
||||
this.setIconSize(30);
|
||||
this.setShortcutText("돌아가기");
|
||||
this.setShortcutText("[ESC]");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -311,7 +311,6 @@ BasicButton.prototype.setActive = function(flag) {
|
||||
this.buttonSprite.alpha = 0;
|
||||
this.strokeSprite.alpha = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BasicButton.prototype.getPosX = function() {
|
||||
@@ -338,11 +337,10 @@ BasicButton.prototype.setInputEnabled = function(isEnabled) {
|
||||
this.strokeSprite.inputEnabled = isEnabled;
|
||||
this.buttonSprite.inputEnabled = isEnabled;
|
||||
|
||||
if(isEnabled === true) {
|
||||
if(isEnabled === true)
|
||||
this.mouseOut();
|
||||
} else {
|
||||
else
|
||||
this.buttonDisabled();
|
||||
}
|
||||
}
|
||||
|
||||
BasicButton.prototype.setLineSpacing = function(spacingInPixels) {
|
||||
|
||||
@@ -40,32 +40,60 @@ function TypingAppButton(x, y) {
|
||||
TypingAppButton.TEXT_COLOR_DISABLED_HEX
|
||||
);
|
||||
|
||||
|
||||
BasicButton.call(this, setting, this.clickEvent);
|
||||
|
||||
// this.setMainText(this.appData.koreanName);
|
||||
this.setMainText("타자 앱 버튼");
|
||||
// this.setMainText("");
|
||||
// this.addIcon("tile_choco");
|
||||
// this.setIconSize(40);
|
||||
// this.setShortcutText("[단축키]");
|
||||
// this.setShortcutText("Setting");
|
||||
|
||||
// this.setInputEnabled(this.appData.activated);
|
||||
|
||||
this.animalSprite = new Animal(
|
||||
Animal.TYPE_ICON, 0,
|
||||
Animal.SPRITE_WIDTH / 2, TypingAppButton.HEIGHT / 2
|
||||
TypingAppButton.WIDTH - Animal.SPRITE_WIDTH / 2, TypingAppButton.HEIGHT / 2
|
||||
);
|
||||
this.buttonSprite.addChild(this.animalSprite.sprite);
|
||||
}
|
||||
|
||||
TypingAppButton.prototype.updateAnimalSprite = function(highestRecord) {
|
||||
// console.log("highestRecord : " + highestRecord + ", appType : " + this.appType);
|
||||
var animalIndex = Animal.animalIndexByRecord(highestRecord, this.appType);
|
||||
// console.log("animalIndex : " + animalIndex);
|
||||
this.animalSprite.chagneStandAnimation(animalIndex);
|
||||
}
|
||||
|
||||
TypingAppButton.prototype.setInputEnabled = function(isEnabled) {
|
||||
this.strokeSprite.inputEnabled = isEnabled;
|
||||
this.buttonSprite.inputEnabled = isEnabled;
|
||||
|
||||
if(isEnabled === true) {
|
||||
this.mouseOut();
|
||||
this.animalSprite.sprite.tint = MainColor.WHITE_HEX;
|
||||
} else {
|
||||
this.buttonDisabled();
|
||||
this.animalSprite.sprite.tint = MainColor.DIM_GRAY_HEX;
|
||||
}
|
||||
}
|
||||
|
||||
TypingAppButton.prototype.setActive = function(flag) {
|
||||
this.setInputEnabled(flag);
|
||||
|
||||
if(flag) {
|
||||
this.buttonSprite.alpha = 1;
|
||||
this.strokeSprite.alpha = 1;
|
||||
this.animalSprite.sprite.alpha = 1;
|
||||
} else {
|
||||
this.buttonSprite.alpha = 0;
|
||||
this.strokeSprite.alpha = 0;
|
||||
this.animalSprite.sprite.alpha = 0;
|
||||
}
|
||||
}
|
||||
|
||||
TypingAppButton.prototype.showEmptyDisabled = function() {
|
||||
this.setInputEnabled(false);
|
||||
|
||||
this.buttonSprite.alpha = 0;
|
||||
this.strokeSprite.alpha = 1;
|
||||
this.strokeSprite.tint = MainColor.SADDLE_BROWN_HEX;
|
||||
this.animalSprite.sprite.alpha = 0;
|
||||
}
|
||||
|
||||
TypingAppButton.prototype.updateAppData = function(appData) {
|
||||
this.appData = appData;
|
||||
|
||||
Reference in New Issue
Block a user