Add: selected subject name to license time db

This commit is contained in:
2018-12-13 12:51:21 +09:00
parent 7b0664f8d5
commit 4e31886281
8 changed files with 80 additions and 55 deletions
+8 -1
View File
@@ -76,7 +76,7 @@ function InputScore(licenseDataManager, timer, chart) {
InputScore.prototype.initVariables = function() {
this.inputScorePosY = GAME_SCREEN_SIZE.y - InputScore.INPUT_SCORE_GROUP_OFFSET_Y;
this.subjectFullname = "ITQ 파워포인트";
this.subjectFullname = "";
this.recentSubject = this.subjectFullname;
this.companyButtonList = [];
@@ -85,6 +85,11 @@ InputScore.prototype.initVariables = function() {
this.maestroPassword;
}
InputScore.prototype.loadDataFromServer = function(subjectName) {
this.setSubjectFullname(subjectName);
this.recentSubject = this.subjectFullname;
}
InputScore.prototype.makeInputTextSetting = function(width, placeHolder) {
return {
font: "32px Arial",
@@ -271,6 +276,7 @@ InputScore.prototype.onClickCompanySubjectButton = function(subjectFullname) {
this.selectedSubjectData = this.licenseDataManager.getSubjectDataByName(subjectFullname);
// console.log(this.selectedSubjectData);
this.timer.setSubjectName(this.subjectFullname);
this.timer.setStartTime(this.selectedSubjectData.timeLimit * Timer.TIME_SECONDS_FOR_MINUTE);
this.setVisibleCompanyPanel(false);
@@ -325,6 +331,7 @@ InputScore.prototype.addScoreToServer = function(subjectName, score) {
(function(replyJson) {
console.log(replyJson);
this.scoreText.setText("");
this.chart.loadScoreFromServer();
}).bind(this),