Add: RecordUtil
This commit is contained in:
@@ -51,20 +51,22 @@ HistoryBoard.prototype.calcDate = function(daysBefore) {
|
||||
|
||||
|
||||
HistoryBoard.prototype.printRecord = function(index, date, bestRecord) {
|
||||
var posX = 60;
|
||||
var posX = 130;
|
||||
var posY = game.world.height / 2 + 90 + 30 * index;
|
||||
|
||||
var style = { font: "20px Arial", fill: "#ffc", align: "right", boundsAlignH: "right", boundsAlignV: "top" };
|
||||
|
||||
style.boundsAlignH = "center";
|
||||
game.add.text(posX, posY, StringUtil.printMonthDay(date), style)
|
||||
.setTextBounds(0, 0, 100, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
var dateText = game.add.text(posX, posY, StringUtil.printMonthDay(date), style);
|
||||
dateText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
dateText.anchor.set(1, 0);
|
||||
|
||||
style.boundsAlignH = "right";
|
||||
game.add.text(posX + 80, posY, StringUtil.getRecordTextWithoutUnit(bestRecord), style)
|
||||
.setTextBounds(0, 0, 100, 60)
|
||||
.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
var recordText = game.add.text(
|
||||
posX + 120, posY,
|
||||
RecordUtil.getRecordValueWithUnit(bestRecord, sessionStorageManager.getPlayingAppID()),
|
||||
style
|
||||
);
|
||||
recordText.anchor.set(1, 0);
|
||||
recordText.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
||||
}
|
||||
|
||||
HistoryBoard.prototype.printSample = function() {
|
||||
|
||||
Reference in New Issue
Block a user