× ¶ function init(self) msg.post(".", "acquire_input_focus") gui.set_alpha(gui.get_node("startgame_highlight"), 0) gui.set_alpha(gui.get_node("instructions_highlight"), 0) gui.set_alpha(gui.get_node("settings_highlight"), 0) end function on_input(self, action_id, action) if action_id == hash("touch") and action.pressed then if gui.pick_node(gui.get_node("startgame"), action.x, action.y) then msg.post("main:/controller#main", "show level1 screen") elseif gui.pick_node(gui.get_node("instructions"), action.x, action.y) then msg.post("main:/controller#main", "show instructions screen") elseif gui.pick_node(gui.get_node("settings"), action.x, action.y) then msg.post("main:/controller#main", "show settings screen") end elseif action_id == nil then if gui.pick_node(gui.get_node("startgame"), action.x, action.y) then gui.set_alpha(gui.get_node("startgame_highlight"), 1) else gui.set_alpha(gui.get_node("startgame_highlight"), 0) end if gui.pick_node(gui.get_node("instructions"), action.x, action.y) then gui.set_alpha(gui.get_node("instructions_highlight"), 1) else gui.set_alpha(gui.get_node("instructions_highlight"), 0) end if gui.pick_node(gui.get_node("settings"), action.x, action.y) then gui.set_alpha(gui.get_node("settings_highlight"), 1) else gui.set_alpha(gui.get_node("settings_highlight"), 0) end end end @main/startscreen.gui_script"