From be66c44e2b882219c44bcf0de3238f6e3d62cfad Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 30 Sep 2015 16:43:56 +0200 Subject: Add the robot problem screen Mostly a copy of the Python screen, a lot of functionality is missing. --- js/codeq/language.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js/codeq/language.js') diff --git a/js/codeq/language.js b/js/codeq/language.js index aac4e78..0893e33 100644 --- a/js/codeq/language.js +++ b/js/codeq/language.js @@ -6,8 +6,10 @@ var jqScreen = $('#screen_language'), jqProlog = $('#choose-prolog'), jqPython = $('#choose-python'), + jqRobot = $('#choose-robot'), chooseProlog = function () {codeq.globalStateMachine.transition('problem', 'prolog');}, - choosePython = function () {codeq.globalStateMachine.transition('problem', 'python');}; + choosePython = function () {codeq.globalStateMachine.transition('problem', 'python');}, + chooseRobot = function () {codeq.globalStateMachine.transition('problem', 'robot');}; codeq.globalStateMachine.register('language',{ 'enter': function(){ @@ -16,13 +18,15 @@ jqScreen.css('display', ''); jqProlog.on('click', chooseProlog); jqPython.on('click', choosePython); + jqRobot.on('click', chooseRobot); }, 'exit' : function(){ jqProlog.off(); jqPython.off(); + jqRobot.off(); jqScreen.css('display', 'none'); $('#navigation-language').css('display', 'none').removeClass("active"); } }); -})(); \ No newline at end of file +})(); -- cgit v1.2.1