Fix: hand position
This commit is contained in:
@@ -27,13 +27,17 @@ function Hand(keyMapper) {
|
||||
this.little_finger.alpha = 0.5;
|
||||
this.hand.addChild(this.little_finger);
|
||||
|
||||
this.offsetY = 0;
|
||||
if(isTypingTestApp())
|
||||
this.offsetY = 80;
|
||||
|
||||
var maskOffsetY = 0;
|
||||
if(isTypingTestApp())
|
||||
maskOffsetY = 40;
|
||||
|
||||
var mask = game.add.graphics();
|
||||
mask.beginFill(0xffffff);
|
||||
mask.drawRect(100, 300 + maskOffsetY, 1028, 360);
|
||||
mask.drawRect(100, 300 + maskOffsetY, 828, 360);
|
||||
this.hand.mask = mask;
|
||||
}
|
||||
|
||||
@@ -53,7 +57,7 @@ Hand.prototype.moveToDefaultPosition = function() {
|
||||
|
||||
Hand.prototype.moveRow = function(rowNo, key) {
|
||||
var rowIndex = rowNo - 1;
|
||||
this.hand.y = Hand.DEFAULT_Y_PX + Keyboard.DEFAULT_KEY_SIZE_PX * rowIndex;
|
||||
this.hand.y = Hand.DEFAULT_Y_PX + Keyboard.DEFAULT_KEY_SIZE_PX * rowIndex + this.offsetY;
|
||||
|
||||
this.moveColumn(rowNo, key);
|
||||
}
|
||||
|
||||
@@ -282,6 +282,7 @@ Keyboard.prototype.initKeyData = function(keyMapper) {
|
||||
var row1offsetY = 0;
|
||||
if(isTypingTestApp())
|
||||
row1offsetY = 80;
|
||||
|
||||
// row 1
|
||||
this.addFunctionKeyData(
|
||||
"Backquote",
|
||||
|
||||
Reference in New Issue
Block a user