├── resources ├── button.png ├── textbox.png ├── background.png ├── button-red.png ├── bg.atlas ├── menu.font ├── text.font └── objects.atlas ├── input └── game.input_binding ├── .gitignore ├── scenes ├── win │ ├── win.script │ ├── win.gui_script │ ├── win.collection │ └── win.gui ├── fail │ ├── fail.script │ ├── fail.gui_script │ ├── fail.collection │ └── fail.gui ├── help │ ├── help.script │ ├── help.gui_script │ ├── help.collection │ └── help.gui ├── gameplay │ ├── gameplay.script │ ├── gameplay.gui_script │ ├── gameplay.collection │ └── gameplay.gui ├── settings │ ├── settings.script │ ├── settings.gui_script │ ├── settings.collection │ └── settings.gui ├── main_menu │ ├── main_menu.script │ ├── main_menu.gui_script │ ├── main_menu.collection │ └── main_menu.gui ├── help_chapter │ ├── help_chapter.script │ ├── help_chapter.gui_script │ ├── help_chapter.collection │ └── help_chapter.gui └── level_selector │ ├── level_selector.script │ ├── level_selector.collection │ ├── level_selector.gui_script │ └── level_selector.gui ├── game.project ├── main ├── loader.gui_script ├── main.script ├── loader.gui ├── scenes.lua └── main.collection ├── .luacheckrc ├── common ├── button.lua ├── fade_transition.lua ├── menu_transition.lua ├── label.gui └── button.gui ├── wh_router └── router.lua └── README.md /resources/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Megus/defold-router/HEAD/resources/button.png -------------------------------------------------------------------------------- /resources/textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Megus/defold-router/HEAD/resources/textbox.png -------------------------------------------------------------------------------- /input/game.input_binding: -------------------------------------------------------------------------------- 1 | mouse_trigger { 2 | input: MOUSE_BUTTON_1 3 | action: "mouse" 4 | } 5 | -------------------------------------------------------------------------------- /resources/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Megus/defold-router/HEAD/resources/background.png -------------------------------------------------------------------------------- /resources/button-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Megus/defold-router/HEAD/resources/button-red.png -------------------------------------------------------------------------------- /resources/bg.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/resources/background.png" 3 | } 4 | margin: 0 5 | extrude_borders: 0 6 | inner_padding: 0 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .externalToolBuilders 3 | .DS_Store 4 | .lock-wscript 5 | build 6 | *.pyc 7 | .project 8 | .cproject 9 | builtins 10 | .internal 11 | -------------------------------------------------------------------------------- /resources/menu.font: -------------------------------------------------------------------------------- 1 | font: "/builtins/fonts/vera_mo_bd.ttf" 2 | material: "/builtins/fonts/font.material" 3 | size: 28 4 | outline_alpha: 1.0 5 | outline_width: 2.0 6 | -------------------------------------------------------------------------------- /resources/text.font: -------------------------------------------------------------------------------- 1 | font: "/builtins/fonts/vera_mo_bd.ttf" 2 | material: "/builtins/fonts/font.material" 3 | size: 20 4 | outline_alpha: 1.0 5 | outline_width: 1.0 6 | -------------------------------------------------------------------------------- /resources/objects.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/resources/button.png" 3 | } 4 | images { 5 | image: "/resources/textbox.png" 6 | } 7 | images { 8 | image: "/resources/button-red.png" 9 | } 10 | margin: 0 11 | extrude_borders: 1 12 | inner_padding: 0 13 | -------------------------------------------------------------------------------- /scenes/win/win.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/fail/fail.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/help/help.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/gameplay/gameplay.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/settings/settings.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/main_menu/main_menu.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/help_chapter/help_chapter.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /scenes/level_selector/level_selector.script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | function on_message(_, message_id, message, _) 7 | msg.post("gui", message_id, message) 8 | end 9 | -------------------------------------------------------------------------------- /game.project: -------------------------------------------------------------------------------- 1 | [project] 2 | title = Defold Router Demo 3 | version = 0.1 4 | 5 | [bootstrap] 6 | main_collection = /main/main.collectionc 7 | 8 | [input] 9 | game_binding = /input/game.input_bindingc 10 | 11 | [display] 12 | width = 800 13 | height = 600 14 | high_dpi = 1 15 | 16 | [physics] 17 | scale = 0.02 18 | 19 | [script] 20 | shared_state = 1 21 | 22 | [library] 23 | include_dirs = wh_router 24 | 25 | -------------------------------------------------------------------------------- /main/loader.gui_script: -------------------------------------------------------------------------------- 1 | local router = require("wh_router.router") 2 | 3 | function on_message(_, message_id, message, _) 4 | if message_id == router.messages.loader_start then 5 | gui.set_color(gui.get_node("loading"), vmath.vector4(1, 1, 1, 1)) 6 | elseif message_id == router.messages.loader_stop then 7 | gui.set_color(gui.get_node("loading"), vmath.vector4(1, 1, 1, 1)) 8 | gui.animate(gui.get_node("loading"), "color.w", 0, gui.EASING_LINEAR, 0.3, 0, function() 9 | router.stopped_loader(message.router) 10 | end) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /.luacheckrc: -------------------------------------------------------------------------------- 1 | max_comment_line_length = false 2 | max_code_line_length = 120 3 | 4 | std = "max" 5 | files['.luacheckrc'].global = false 6 | 7 | globals = { 8 | "sys", 9 | "go", 10 | "gui", 11 | "label", 12 | "render", 13 | "crash", 14 | "sprite", 15 | "sound", 16 | "tilemap", 17 | "spine", 18 | "particlefx", 19 | "physics", 20 | "factory", 21 | "collectionfactory", 22 | "iac", 23 | "msg", 24 | "vmath", 25 | "url", 26 | "http", 27 | "image", 28 | "json", 29 | "zlib", 30 | "iap", 31 | "push", 32 | "facebook", 33 | "hash", 34 | "hash_to_hex", 35 | "pprint", 36 | "init", 37 | "final", 38 | "update", 39 | "on_input", 40 | "on_message", 41 | "on_reload" 42 | } -------------------------------------------------------------------------------- /scenes/settings/settings.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.menu_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function init(_) 13 | gui.set_render_order(1) 14 | end 15 | 16 | function on_message(_, message_id, message) 17 | if message_id == router.messages.scene_input then 18 | rid = message.router 19 | else 20 | transition(message_id, message) 21 | end 22 | end 23 | 24 | function on_input(_, action_id, action) 25 | button("close", action_id, action, function() 26 | router.close(rid) 27 | end) 28 | end 29 | -------------------------------------------------------------------------------- /scenes/help_chapter/help_chapter.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function on_message(_, message_id, message) 13 | if message_id == router.messages.scene_input then 14 | rid = message.router 15 | gui.set_text(gui.get_node("title/text"), "Chapter " .. message.input.chapter) 16 | else 17 | transition(message_id, message) 18 | end 19 | end 20 | 21 | function on_input(_, action_id, action) 22 | button("back", action_id, action, function() 23 | router.close(rid) 24 | end) 25 | end 26 | -------------------------------------------------------------------------------- /main/main.script: -------------------------------------------------------------------------------- 1 | -- Defold Router: The main script with all routing methods implementation 2 | -- 3 | -- © 2016 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local router = require("wh_router.router") 7 | local scenes = require("main.scenes") 8 | 9 | function init(self) 10 | msg.post(".", "acquire_input_focus") 11 | -- Create the router with the main routing table. It will automatically load the first scene 12 | self.router_id = router.new(scenes, "main:/scenes#router", "controller#script", "main:/loader") 13 | end 14 | 15 | function on_message(self, message_id, message, sender) 16 | -- Handle router messages 17 | router.on_message(self.router_id, message_id, message, sender) 18 | -- You can continue to handle other messages here, of course 19 | end 20 | -------------------------------------------------------------------------------- /scenes/fail/fail.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function on_message(_, message_id, message, _) 13 | if message_id == router.messages.scene_input then 14 | rid = message.router 15 | local world, level = message.input.world, message.input.level 16 | gui.set_text(gui.get_node("text/text"), "You've failed level " .. world .. "-" .. level) 17 | else 18 | transition(message_id, message) 19 | end 20 | end 21 | 22 | function on_input(_, action_id, action) 23 | button("ok", action_id, action, function() 24 | router.close(rid) 25 | end) 26 | end 27 | -------------------------------------------------------------------------------- /scenes/win/win.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function on_message(_, message_id, message, _) 13 | if message_id == router.messages.scene_input then 14 | rid = message.router 15 | local world, level = message.input.world, message.input.level 16 | gui.set_text(gui.get_node("text/text"), "You've completed level " .. world .. "-" .. level) 17 | else 18 | transition(message_id, message) 19 | end 20 | end 21 | 22 | function on_input(_, action_id, action) 23 | button("ok", action_id, action, function() 24 | router.close(rid, {win = true}) 25 | end) 26 | end 27 | -------------------------------------------------------------------------------- /common/button.lua: -------------------------------------------------------------------------------- 1 | -- Defold Router: Sample routing table implementation 2 | -- 3 | -- Simple GUI button component 4 | -- 5 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 6 | -- https://wisehedgehog.studio, https://megus.org 7 | 8 | local pressed = vmath.vector4(0, 0, 0, 0.5) 9 | local unpressed = vmath.vector4(0, 0, 0, 0) 10 | local msgMouse = hash("mouse") 11 | 12 | local function input(nodeId, actionId, action, onClick) 13 | if actionId == msgMouse then 14 | if action.pressed then 15 | if gui.pick_node(gui.get_node(nodeId .."/box"), action.x, action.y) then 16 | gui.set_color(gui.get_node(nodeId .. "/pressed"), pressed) 17 | end 18 | elseif action.released then 19 | gui.set_color(gui.get_node(nodeId .. "/pressed"), unpressed) 20 | if gui.pick_node(gui.get_node(nodeId .. "/box"), action.x, action.y) then 21 | onClick() 22 | end 23 | end 24 | end 25 | end 26 | 27 | return input 28 | -------------------------------------------------------------------------------- /scenes/main_menu/main_menu.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function on_message(_, message_id, message) 13 | if message_id == router.messages.scene_input then 14 | rid = message.router 15 | elseif message_id == router.messages.transition then 16 | transition(message_id, message) 17 | elseif message_id == router.messages.scene_popped then 18 | msg.post(".", "acquire_input_focus") 19 | end 20 | end 21 | 22 | function on_input(_, action_id, action) 23 | button("start", action_id, action, function() 24 | router.close(rid) 25 | end) 26 | 27 | button("settings", action_id, action, function() 28 | msg.post(".", "release_input_focus") 29 | router.popup(rid, "settings") 30 | end) 31 | end 32 | -------------------------------------------------------------------------------- /common/fade_transition.lua: -------------------------------------------------------------------------------- 1 | local router = require("wh_router.router") 2 | 3 | local black = vmath.vector4(0, 0, 0, 1) 4 | local transparent = vmath.vector4(0, 0, 0, 0) 5 | 6 | local function on_message(message_id, message) 7 | if message_id == router.messages.transition then 8 | local fader = gui.get_node("fader") 9 | if message.t_type == router.transition_types.t_in or message.t_type == router.transition_types.t_back_in then 10 | gui.set_color(fader, black) 11 | gui.animate(fader, "color.w", 0, gui.EASING_LINEAR, 0.2, 0, function() 12 | msg.post("controller#script", "acquire_input_focus") 13 | msg.post(".", "acquire_input_focus") 14 | router.finished_transition(message.router) 15 | end) 16 | else 17 | msg.post(".", "release_input_focus") 18 | msg.post("controller#script", "release_input_focus") 19 | gui.set_color(fader, transparent) 20 | gui.animate(fader, "color.w", 1, gui.EASING_LINEAR, 0.2, 0, function() 21 | router.finished_transition(message.router) 22 | end) 23 | end 24 | end 25 | end 26 | 27 | return on_message 28 | -------------------------------------------------------------------------------- /scenes/settings/settings.collection: -------------------------------------------------------------------------------- 1 | name: "settings" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "controller" 5 | data: "components {\n id: \"script\"\n component: \"/scenes/settings/settings.script\"\n position {\n x: 0.0\n y: 0.0\n z: 0.0\n }\n rotation {\n x: 0.0\n y: 0.0\n z: 0.0\n w: 1.0\n }\n}\n" 6 | position { 7 | x: 0.0 8 | y: 0.0 9 | z: 0.0 10 | } 11 | rotation { 12 | x: 0.0 13 | y: 0.0 14 | z: 0.0 15 | w: 1.0 16 | } 17 | scale3 { 18 | x: 1.0 19 | y: 1.0 20 | z: 1.0 21 | } 22 | } 23 | embedded_instances { 24 | id: "gui" 25 | data: "components {\n id: \"gui\"\n component: \"/scenes/settings/settings.gui\"\n position {\n x: 0.0\n y: 0.0\n z: 0.0\n }\n rotation {\n x: 0.0\n y: 0.0\n z: 0.0\n w: 1.0\n }\n}\n" 26 | position { 27 | x: 0.0 28 | y: 0.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /scenes/help/help.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | function on_message(_, message_id, message) 13 | if message_id == router.messages.scene_input then 14 | rid = message.router 15 | elseif message_id == router.messages.transition then 16 | transition(message_id, message) 17 | elseif message_id == router.messages.scene_popped then 18 | rid = message.router 19 | end 20 | end 21 | 22 | function on_input(_, action_id, action) 23 | button("back", action_id, action, function() 24 | router.close(rid) 25 | end) 26 | 27 | button("chapter1", action_id, action, function() 28 | router.push(rid, "help_chapter", {chapter = 1}) 29 | end) 30 | 31 | button("chapter2", action_id, action, function() 32 | router.push(rid, "help_chapter", {chapter = 2}) 33 | end) 34 | end 35 | -------------------------------------------------------------------------------- /common/menu_transition.lua: -------------------------------------------------------------------------------- 1 | local router = require("wh_router.router") 2 | 3 | local black = vmath.vector4(0, 0, 0, 0.5) 4 | local transparent = vmath.vector4(0, 0, 0, 0) 5 | 6 | local function on_message(message_id, message) 7 | if message_id == router.messages.transition then 8 | local container = gui.get_node("container") 9 | local shadow = gui.get_node("shadow") 10 | if message.t_type == router.transition_types.t_in or message.t_type == router.transition_types.t_back_in then 11 | gui.set_position(container, vmath.vector3(0, -600, 0)) 12 | gui.set_color(shadow, transparent) 13 | gui.animate(shadow, "color.w", 0.5, go.EASING_LINEAR, 0.2) 14 | gui.animate(container, "position", vmath.vector3(0, 0, 0), go.EASING_OUTBACK, 0.4, 0, function() 15 | msg.post("controller#script", "acquire_input_focus") 16 | msg.post(".", "acquire_input_focus") 17 | router.finished_transition(message.router) 18 | end) 19 | else 20 | msg.post(".", "release_input_focus") 21 | msg.post("controller#script", "release_input_focus") 22 | gui.set_color(shadow, black) 23 | gui.animate(shadow, "color.w", 0, go.EASING_LINEAR, 0.2, 0.2) 24 | gui.animate(container, "position", vmath.vector3(0, -600, 0.5), go.EASING_INCUBIC, 0.4, 0, function() 25 | router.finished_transition(message.router) 26 | end) 27 | end 28 | end 29 | end 30 | 31 | return on_message -------------------------------------------------------------------------------- /main/loader.gui: -------------------------------------------------------------------------------- 1 | script: "/main/loader.gui_script" 2 | fonts { 3 | name: "menu" 4 | font: "/resources/menu.font" 5 | } 6 | background_color { 7 | x: 0.0 8 | y: 0.0 9 | z: 0.0 10 | w: 0.0 11 | } 12 | nodes { 13 | position { 14 | x: 400.0 15 | y: 300.0 16 | z: 0.0 17 | w: 1.0 18 | } 19 | rotation { 20 | x: 0.0 21 | y: 0.0 22 | z: 0.0 23 | w: 1.0 24 | } 25 | scale { 26 | x: 1.0 27 | y: 1.0 28 | z: 1.0 29 | w: 1.0 30 | } 31 | size { 32 | x: 200.0 33 | y: 100.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | color { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | w: 1.0 42 | } 43 | type: TYPE_TEXT 44 | blend_mode: BLEND_MODE_ALPHA 45 | text: "Loading..." 46 | font: "menu" 47 | id: "loading" 48 | xanchor: XANCHOR_NONE 49 | yanchor: YANCHOR_NONE 50 | pivot: PIVOT_CENTER 51 | outline { 52 | x: 0.0 53 | y: 0.0 54 | z: 0.0 55 | w: 1.0 56 | } 57 | shadow { 58 | x: 1.0 59 | y: 1.0 60 | z: 1.0 61 | w: 1.0 62 | } 63 | adjust_mode: ADJUST_MODE_FIT 64 | line_break: false 65 | layer: "" 66 | inherit_alpha: true 67 | alpha: 1.0 68 | outline_alpha: 1.0 69 | shadow_alpha: 1.0 70 | template_node_child: false 71 | text_leading: 1.0 72 | text_tracking: 0.0 73 | } 74 | material: "/builtins/materials/gui.material" 75 | adjust_reference: ADJUST_REFERENCE_PARENT 76 | max_nodes: 512 77 | -------------------------------------------------------------------------------- /scenes/gameplay/gameplay.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | local function show_level_number(world, level) 13 | gui.set_text(gui.get_node("level/text"), "Level " .. world .. "-" .. level) 14 | end 15 | 16 | function on_message(self, message_id, message) 17 | if message_id == router.messages.scene_input then 18 | rid = message.router 19 | self.world = message.input.world 20 | self.level = message.input.level 21 | show_level_number(self.world, self.level) 22 | elseif message_id == router.messages.transition then 23 | transition(message_id, message) 24 | elseif message_id == router.messages.scene_popped then 25 | msg.post(".", "acquire_input_focus") 26 | end 27 | end 28 | 29 | function on_input(self, action_id, action) 30 | button("settings", action_id, action, function() 31 | msg.post(".", "release_input_focus") 32 | router.popup(rid, "settings") 33 | end) 34 | 35 | button("help", action_id, action, function() 36 | router.push_modal(rid, "help") 37 | end) 38 | 39 | button("win", action_id, action, function() 40 | router.close(rid, {win = true, world = self.world, level = self.level}) 41 | end) 42 | 43 | button("fail", action_id, action, function() 44 | router.close(rid, {win = false, world = self.world, level = self.level}) 45 | end) 46 | end 47 | -------------------------------------------------------------------------------- /scenes/level_selector/level_selector.collection: -------------------------------------------------------------------------------- 1 | name: "level_selector" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "bg" 5 | data: "embedded_components {\n id: \"sprite\"\n type: \"sprite\"\n data: \"tile_set: \\\"/resources/bg.atlas\\\"\\ndefault_animation: \\\"background\\\"\\nmaterial: \\\"/builtins/materials/sprite.material\\\"\\nblend_mode: BLEND_MODE_ALPHA\\n\"\n position {\n x: 0.0\n y: 0.0\n z: 0.0\n }\n rotation {\n x: 0.0\n y: 0.0\n z: 0.0\n w: 1.0\n }\n}\n" 6 | position { 7 | x: 400.0 8 | y: 300.0 9 | z: 0.0 10 | } 11 | rotation { 12 | x: 0.0 13 | y: 0.0 14 | z: 0.0 15 | w: 1.0 16 | } 17 | scale3 { 18 | x: 1.0 19 | y: 1.0 20 | z: 1.0 21 | } 22 | } 23 | embedded_instances { 24 | id: "controller" 25 | data: "components {\n id: \"script\"\n component: \"/scenes/level_selector/level_selector.script\"\n position {\n x: 0.0\n y: 0.0\n z: 0.0\n }\n rotation {\n x: 0.0\n y: 0.0\n z: 0.0\n w: 1.0\n }\n}\n" 26 | position { 27 | x: 0.0 28 | y: 0.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | embedded_instances { 44 | id: "gui" 45 | data: "components {\n id: \"gui\"\n component: \"/scenes/level_selector/level_selector.gui\"\n position {\n x: 0.0\n y: 0.0\n z: 0.0\n }\n rotation {\n x: 0.0\n y: 0.0\n z: 0.0\n w: 1.0\n }\n}\n" 46 | position { 47 | x: 243.62788 48 | y: 345.52594 49 | z: 0.0 50 | } 51 | rotation { 52 | x: 0.0 53 | y: 0.0 54 | z: 0.0 55 | w: 1.0 56 | } 57 | scale3 { 58 | x: 1.0 59 | y: 1.0 60 | z: 1.0 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /main/scenes.lua: -------------------------------------------------------------------------------- 1 | -- Defold Router: Sample routing table implementation 2 | -- 3 | -- This table works like a simple state machine. 4 | -- 5 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 6 | -- https://wisehedgehog.studio, https://megus.org 7 | 8 | local M = { 9 | info = { 10 | -- Regular scenes 11 | main_menu = { 12 | sync_load = true, 13 | has_transitions = true, 14 | }, 15 | level_selector = { 16 | has_transitions = true, 17 | show_loading = true, 18 | }, 19 | gameplay = { 20 | has_transitions = true, 21 | show_loading = true 22 | }, 23 | fail = { 24 | has_transitions = true, 25 | }, 26 | win = { 27 | has_transitions = true, 28 | }, 29 | -- Popups 30 | help = { 31 | has_transitions = true, 32 | }, 33 | help_chapter = { 34 | has_transitions = true, 35 | }, 36 | settings = { 37 | has_transitions = true, 38 | } 39 | }, 40 | 41 | first_scene = "main_menu", 42 | routing = { 43 | -- Go to Level Selector from the Main Menu screen 44 | main_menu = "level_selector", 45 | 46 | -- Depending on the output, go to Gameplay or back to Main Menu 47 | level_selector = function (output) 48 | if output and output.world then 49 | return "gameplay", {world = output.world, level = output.level} 50 | else 51 | return "main_menu" 52 | end 53 | end, 54 | 55 | gameplay = function (output) 56 | if output.win then 57 | return "win", {world = output.world, level = output.level} 58 | else 59 | return "fail", {world = output.world, level = output.level} 60 | end 61 | end, 62 | 63 | fail = {"level_selector", {win = false}}, 64 | win = {"level_selector", {win = true}} 65 | } 66 | } 67 | 68 | return M 69 | -------------------------------------------------------------------------------- /scenes/win/win.collection: -------------------------------------------------------------------------------- 1 | name: "win" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "bg" 5 | data: "embedded_components {\n" 6 | " id: \"sprite\"\n" 7 | " type: \"sprite\"\n" 8 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 9 | "default_animation: \\\"background\\\"\\n" 10 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 11 | "blend_mode: BLEND_MODE_ALPHA\\n" 12 | "\"\n" 13 | " position {\n" 14 | " x: 400.0\n" 15 | " y: 300.0\n" 16 | " z: 0.0\n" 17 | " }\n" 18 | " rotation {\n" 19 | " x: 0.0\n" 20 | " y: 0.0\n" 21 | " z: 0.0\n" 22 | " w: 1.0\n" 23 | " }\n" 24 | "}\n" 25 | "" 26 | position { 27 | x: 0.0 28 | y: 0.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | embedded_instances { 44 | id: "controller" 45 | data: "components {\n" 46 | " id: \"script\"\n" 47 | " component: \"/scenes/win/win.script\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/win/win.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 0.0 98 | y: 0.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/fail/fail.collection: -------------------------------------------------------------------------------- 1 | name: "fail" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "bg" 5 | data: "embedded_components {\n" 6 | " id: \"sprite\"\n" 7 | " type: \"sprite\"\n" 8 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 9 | "default_animation: \\\"background\\\"\\n" 10 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 11 | "blend_mode: BLEND_MODE_ALPHA\\n" 12 | "\"\n" 13 | " position {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " }\n" 18 | " rotation {\n" 19 | " x: 0.0\n" 20 | " y: 0.0\n" 21 | " z: 0.0\n" 22 | " w: 1.0\n" 23 | " }\n" 24 | "}\n" 25 | "" 26 | position { 27 | x: 400.0 28 | y: 300.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | embedded_instances { 44 | id: "controller" 45 | data: "components {\n" 46 | " id: \"script\"\n" 47 | " component: \"/scenes/fail/fail.script\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/fail/fail.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 0.0 98 | y: 0.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/help/help.collection: -------------------------------------------------------------------------------- 1 | name: "help" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "bg" 5 | data: "embedded_components {\n" 6 | " id: \"sprite\"\n" 7 | " type: \"sprite\"\n" 8 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 9 | "default_animation: \\\"background\\\"\\n" 10 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 11 | "blend_mode: BLEND_MODE_ALPHA\\n" 12 | "\"\n" 13 | " position {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " }\n" 18 | " rotation {\n" 19 | " x: 0.0\n" 20 | " y: 0.0\n" 21 | " z: 0.0\n" 22 | " w: 1.0\n" 23 | " }\n" 24 | "}\n" 25 | "" 26 | position { 27 | x: 400.0 28 | y: 300.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | embedded_instances { 44 | id: "controller" 45 | data: "components {\n" 46 | " id: \"script\"\n" 47 | " component: \"/scenes/help/help.script\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/help/help.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 0.0 98 | y: 0.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/gameplay/gameplay.collection: -------------------------------------------------------------------------------- 1 | name: "gameplay" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "controller" 5 | data: "components {\n" 6 | " id: \"script\"\n" 7 | " component: \"/scenes/gameplay/gameplay.script\"\n" 8 | " position {\n" 9 | " x: 0.0\n" 10 | " y: 0.0\n" 11 | " z: 0.0\n" 12 | " }\n" 13 | " rotation {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " w: 1.0\n" 18 | " }\n" 19 | "}\n" 20 | "" 21 | position { 22 | x: 0.0 23 | y: 0.0 24 | z: 0.0 25 | } 26 | rotation { 27 | x: 0.0 28 | y: 0.0 29 | z: 0.0 30 | w: 1.0 31 | } 32 | scale3 { 33 | x: 1.0 34 | y: 1.0 35 | z: 1.0 36 | } 37 | } 38 | embedded_instances { 39 | id: "bg" 40 | data: "embedded_components {\n" 41 | " id: \"sprite\"\n" 42 | " type: \"sprite\"\n" 43 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 44 | "default_animation: \\\"background\\\"\\n" 45 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 46 | "blend_mode: BLEND_MODE_ALPHA\\n" 47 | "\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 400.0 63 | y: 300.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/gameplay/gameplay.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 0.0 98 | y: 0.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/main_menu/main_menu.collection: -------------------------------------------------------------------------------- 1 | name: "main_menu" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "controller" 5 | data: "components {\n" 6 | " id: \"script\"\n" 7 | " component: \"/scenes/main_menu/main_menu.script\"\n" 8 | " position {\n" 9 | " x: 0.0\n" 10 | " y: 0.0\n" 11 | " z: 0.0\n" 12 | " }\n" 13 | " rotation {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " w: 1.0\n" 18 | " }\n" 19 | "}\n" 20 | "" 21 | position { 22 | x: 0.0 23 | y: 0.0 24 | z: 0.0 25 | } 26 | rotation { 27 | x: 0.0 28 | y: 0.0 29 | z: 0.0 30 | w: 1.0 31 | } 32 | scale3 { 33 | x: 1.0 34 | y: 1.0 35 | z: 1.0 36 | } 37 | } 38 | embedded_instances { 39 | id: "bg" 40 | data: "embedded_components {\n" 41 | " id: \"sprite\"\n" 42 | " type: \"sprite\"\n" 43 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 44 | "default_animation: \\\"background\\\"\\n" 45 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 46 | "blend_mode: BLEND_MODE_ALPHA\\n" 47 | "\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 400.0 63 | y: 300.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/main_menu/main_menu.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 400.0 98 | y: 300.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/help_chapter/help_chapter.collection: -------------------------------------------------------------------------------- 1 | name: "help_chapter" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "bg" 5 | data: "embedded_components {\n" 6 | " id: \"sprite\"\n" 7 | " type: \"sprite\"\n" 8 | " data: \"tile_set: \\\"/resources/bg.atlas\\\"\\n" 9 | "default_animation: \\\"background\\\"\\n" 10 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 11 | "blend_mode: BLEND_MODE_ALPHA\\n" 12 | "\"\n" 13 | " position {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " }\n" 18 | " rotation {\n" 19 | " x: 0.0\n" 20 | " y: 0.0\n" 21 | " z: 0.0\n" 22 | " w: 1.0\n" 23 | " }\n" 24 | "}\n" 25 | "" 26 | position { 27 | x: 400.0 28 | y: 300.0 29 | z: 0.0 30 | } 31 | rotation { 32 | x: 0.0 33 | y: 0.0 34 | z: 0.0 35 | w: 1.0 36 | } 37 | scale3 { 38 | x: 1.0 39 | y: 1.0 40 | z: 1.0 41 | } 42 | } 43 | embedded_instances { 44 | id: "controller" 45 | data: "components {\n" 46 | " id: \"script\"\n" 47 | " component: \"/scenes/help_chapter/help_chapter.script\"\n" 48 | " position {\n" 49 | " x: 0.0\n" 50 | " y: 0.0\n" 51 | " z: 0.0\n" 52 | " }\n" 53 | " rotation {\n" 54 | " x: 0.0\n" 55 | " y: 0.0\n" 56 | " z: 0.0\n" 57 | " w: 1.0\n" 58 | " }\n" 59 | "}\n" 60 | "" 61 | position { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | } 66 | rotation { 67 | x: 0.0 68 | y: 0.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | scale3 { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | } 77 | } 78 | embedded_instances { 79 | id: "gui" 80 | data: "components {\n" 81 | " id: \"gui\"\n" 82 | " component: \"/scenes/help_chapter/help_chapter.gui\"\n" 83 | " position {\n" 84 | " x: 0.0\n" 85 | " y: 0.0\n" 86 | " z: 0.0\n" 87 | " }\n" 88 | " rotation {\n" 89 | " x: 0.0\n" 90 | " y: 0.0\n" 91 | " z: 0.0\n" 92 | " w: 1.0\n" 93 | " }\n" 94 | "}\n" 95 | "" 96 | position { 97 | x: 0.0 98 | y: 0.0 99 | z: 0.0 100 | } 101 | rotation { 102 | x: 0.0 103 | y: 0.0 104 | z: 0.0 105 | w: 1.0 106 | } 107 | scale3 { 108 | x: 1.0 109 | y: 1.0 110 | z: 1.0 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /scenes/level_selector/level_selector.gui_script: -------------------------------------------------------------------------------- 1 | -- Defold Router Demo Project 2 | -- 3 | -- © 2016-2018 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | local button = require("common.button") 7 | local router = require("wh_router.router") 8 | local transition = require("common.fade_transition") 9 | 10 | local rid -- Router ID 11 | 12 | local function set_state(self, state) 13 | if state then 14 | self.state = state 15 | else 16 | self.state = {world = 1, wins = 0, fails = 0} 17 | end 18 | end 19 | 20 | local function highlight_world(world) 21 | for i = 1,3 do 22 | local animation = (i == world) and "button-red" or "button" 23 | gui.play_flipbook(gui.get_node("world" .. i .. "/box"), animation) 24 | gui.play_flipbook(gui.get_node("world" .. i .. "/pressed"), animation) 25 | end 26 | end 27 | 28 | local function set_info(wins, fails) 29 | gui.set_text(gui.get_node("info/text"), "Wins: " .. wins .. ", Fails: " .. fails) 30 | end 31 | 32 | 33 | function on_message(self, message_id, message, _) 34 | if message_id == router.messages.scene_input then 35 | rid = message.router 36 | set_state(self, message.state) 37 | if message.input and message.input.win ~= nil then 38 | if message.input.win then 39 | self.state.wins = self.state.wins + 1 40 | else 41 | self.state.fails = self.state.fails + 1 42 | end 43 | end 44 | highlight_world(self.state.world) 45 | set_info(self.state.wins, self.state.fails) 46 | elseif message_id == router.messages.transition then 47 | transition(message_id, message) 48 | elseif message_id == router.messages.scene_popped then 49 | msg.post(".", "acquire_input_focus") 50 | end 51 | end 52 | 53 | function on_input(self, action_id, action) 54 | button("back", action_id, action, function() 55 | router.close(rid, nil, self.state) 56 | end) 57 | 58 | button("settings", action_id, action, function() 59 | msg.post(".", "release_input_focus") 60 | router.popup(rid, "settings") 61 | end) 62 | 63 | for i = 1,3 do 64 | button("world" .. i, action_id, action, function() 65 | self.state.world = i 66 | highlight_world(i) 67 | end) 68 | end 69 | 70 | for i = 1,3 do 71 | button("level" .. i, action_id, action, function() 72 | router.close(rid, {world = self.state.world, level = i}, self.state) 73 | end) 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /common/label.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "menu" 4 | font: "/resources/menu.font" 5 | } 6 | fonts { 7 | name: "text" 8 | font: "/resources/text.font" 9 | } 10 | textures { 11 | name: "objects" 12 | texture: "/resources/objects.atlas" 13 | } 14 | background_color { 15 | x: 0.0 16 | y: 0.0 17 | z: 0.0 18 | w: 1.0 19 | } 20 | nodes { 21 | position { 22 | x: 0.0 23 | y: 0.0 24 | z: 0.0 25 | w: 1.0 26 | } 27 | rotation { 28 | x: 0.0 29 | y: 0.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | scale { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | size { 40 | x: 200.0 41 | y: 100.0 42 | z: 0.0 43 | w: 1.0 44 | } 45 | color { 46 | x: 1.0 47 | y: 1.0 48 | z: 1.0 49 | w: 1.0 50 | } 51 | type: TYPE_BOX 52 | blend_mode: BLEND_MODE_ALPHA 53 | texture: "objects/textbox" 54 | id: "box" 55 | xanchor: XANCHOR_NONE 56 | yanchor: YANCHOR_NONE 57 | pivot: PIVOT_CENTER 58 | adjust_mode: ADJUST_MODE_FIT 59 | layer: "" 60 | inherit_alpha: true 61 | slice9 { 62 | x: 8.0 63 | y: 8.0 64 | z: 8.0 65 | w: 8.0 66 | } 67 | clipping_mode: CLIPPING_MODE_NONE 68 | clipping_visible: true 69 | clipping_inverted: false 70 | alpha: 1.0 71 | template_node_child: false 72 | size_mode: SIZE_MODE_MANUAL 73 | } 74 | nodes { 75 | position { 76 | x: 0.0 77 | y: 0.0 78 | z: 0.0 79 | w: 1.0 80 | } 81 | rotation { 82 | x: 0.0 83 | y: 0.0 84 | z: 0.0 85 | w: 1.0 86 | } 87 | scale { 88 | x: 1.0 89 | y: 1.0 90 | z: 1.0 91 | w: 1.0 92 | } 93 | size { 94 | x: 200.0 95 | y: 100.0 96 | z: 0.0 97 | w: 1.0 98 | } 99 | color { 100 | x: 1.0 101 | y: 1.0 102 | z: 1.0 103 | w: 1.0 104 | } 105 | type: TYPE_TEXT 106 | blend_mode: BLEND_MODE_ALPHA 107 | text: "text" 108 | font: "menu" 109 | id: "text" 110 | xanchor: XANCHOR_NONE 111 | yanchor: YANCHOR_NONE 112 | pivot: PIVOT_CENTER 113 | outline { 114 | x: 0.0 115 | y: 0.0 116 | z: 0.0 117 | w: 1.0 118 | } 119 | shadow { 120 | x: 1.0 121 | y: 1.0 122 | z: 1.0 123 | w: 1.0 124 | } 125 | adjust_mode: ADJUST_MODE_FIT 126 | line_break: true 127 | parent: "box" 128 | layer: "" 129 | inherit_alpha: true 130 | clipping_mode: CLIPPING_MODE_NONE 131 | clipping_visible: true 132 | clipping_inverted: false 133 | alpha: 1.0 134 | outline_alpha: 1.0 135 | shadow_alpha: 1.0 136 | template_node_child: false 137 | text_leading: 1.0 138 | text_tracking: 0.0 139 | size_mode: SIZE_MODE_AUTO 140 | } 141 | material: "/builtins/materials/gui.material" 142 | adjust_reference: ADJUST_REFERENCE_PARENT 143 | max_nodes: 512 144 | -------------------------------------------------------------------------------- /common/button.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "font" 4 | font: "/resources/menu.font" 5 | } 6 | textures { 7 | name: "buttons" 8 | texture: "/resources/objects.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 1.0 15 | } 16 | nodes { 17 | position { 18 | x: 0.0 19 | y: 0.0 20 | z: 0.0 21 | w: 1.0 22 | } 23 | rotation { 24 | x: 0.0 25 | y: 0.0 26 | z: 0.0 27 | w: 1.0 28 | } 29 | scale { 30 | x: 1.0 31 | y: 1.0 32 | z: 1.0 33 | w: 1.0 34 | } 35 | size { 36 | x: 450.0 37 | y: 141.0 38 | z: 0.0 39 | w: 1.0 40 | } 41 | color { 42 | x: 1.0 43 | y: 1.0 44 | z: 1.0 45 | w: 1.0 46 | } 47 | type: TYPE_BOX 48 | blend_mode: BLEND_MODE_ALPHA 49 | texture: "buttons/button" 50 | id: "box" 51 | xanchor: XANCHOR_NONE 52 | yanchor: YANCHOR_NONE 53 | pivot: PIVOT_CENTER 54 | adjust_mode: ADJUST_MODE_FIT 55 | layer: "" 56 | inherit_alpha: true 57 | slice9 { 58 | x: 20.0 59 | y: 20.0 60 | z: 40.0 61 | w: 40.0 62 | } 63 | clipping_mode: CLIPPING_MODE_NONE 64 | clipping_visible: true 65 | clipping_inverted: false 66 | alpha: 1.0 67 | template_node_child: false 68 | size_mode: SIZE_MODE_MANUAL 69 | } 70 | nodes { 71 | position { 72 | x: 0.0 73 | y: 0.0 74 | z: 0.0 75 | w: 1.0 76 | } 77 | rotation { 78 | x: 0.0 79 | y: 0.0 80 | z: 0.0 81 | w: 1.0 82 | } 83 | scale { 84 | x: 1.0 85 | y: 1.0 86 | z: 1.0 87 | w: 1.0 88 | } 89 | size { 90 | x: 450.0 91 | y: 141.0 92 | z: 0.0 93 | w: 1.0 94 | } 95 | color { 96 | x: 0.0 97 | y: 0.0 98 | z: 0.0 99 | w: 1.0 100 | } 101 | type: TYPE_BOX 102 | blend_mode: BLEND_MODE_ALPHA 103 | texture: "buttons/button" 104 | id: "pressed" 105 | xanchor: XANCHOR_NONE 106 | yanchor: YANCHOR_NONE 107 | pivot: PIVOT_CENTER 108 | adjust_mode: ADJUST_MODE_FIT 109 | parent: "box" 110 | layer: "" 111 | inherit_alpha: true 112 | slice9 { 113 | x: 20.0 114 | y: 20.0 115 | z: 40.0 116 | w: 40.0 117 | } 118 | clipping_mode: CLIPPING_MODE_NONE 119 | clipping_visible: true 120 | clipping_inverted: false 121 | alpha: 0.0 122 | template_node_child: false 123 | size_mode: SIZE_MODE_MANUAL 124 | } 125 | nodes { 126 | position { 127 | x: 0.0 128 | y: 0.0 129 | z: 0.0 130 | w: 1.0 131 | } 132 | rotation { 133 | x: 0.0 134 | y: 0.0 135 | z: 0.0 136 | w: 1.0 137 | } 138 | scale { 139 | x: 1.0 140 | y: 1.0 141 | z: 1.0 142 | w: 1.0 143 | } 144 | size { 145 | x: 200.0 146 | y: 100.0 147 | z: 0.0 148 | w: 1.0 149 | } 150 | color { 151 | x: 1.0 152 | y: 1.0 153 | z: 1.0 154 | w: 1.0 155 | } 156 | type: TYPE_TEXT 157 | blend_mode: BLEND_MODE_ALPHA 158 | text: "Hi, I\'m a button" 159 | font: "font" 160 | id: "text" 161 | xanchor: XANCHOR_NONE 162 | yanchor: YANCHOR_NONE 163 | pivot: PIVOT_CENTER 164 | outline { 165 | x: 0.0 166 | y: 0.0 167 | z: 0.0 168 | w: 1.0 169 | } 170 | shadow { 171 | x: 1.0 172 | y: 1.0 173 | z: 1.0 174 | w: 1.0 175 | } 176 | adjust_mode: ADJUST_MODE_FIT 177 | line_break: false 178 | layer: "" 179 | inherit_alpha: true 180 | alpha: 1.0 181 | outline_alpha: 1.0 182 | shadow_alpha: 1.0 183 | template_node_child: false 184 | text_leading: 1.0 185 | text_tracking: 0.0 186 | } 187 | material: "/builtins/materials/gui.material" 188 | adjust_reference: ADJUST_REFERENCE_PARENT 189 | max_nodes: 512 190 | -------------------------------------------------------------------------------- /main/main.collection: -------------------------------------------------------------------------------- 1 | name: "main" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "scenes" 5 | data: "components {\n" 6 | " id: \"router\"\n" 7 | " component: \"/main/main.script\"\n" 8 | " position {\n" 9 | " x: 0.0\n" 10 | " y: 0.0\n" 11 | " z: 0.0\n" 12 | " }\n" 13 | " rotation {\n" 14 | " x: 0.0\n" 15 | " y: 0.0\n" 16 | " z: 0.0\n" 17 | " w: 1.0\n" 18 | " }\n" 19 | "}\n" 20 | "embedded_components {\n" 21 | " id: \"fail\"\n" 22 | " type: \"collectionproxy\"\n" 23 | " data: \"collection: \\\"/scenes/fail/fail.collection\\\"\\n" 24 | "exclude: false\\n" 25 | "\"\n" 26 | " position {\n" 27 | " x: 0.0\n" 28 | " y: 0.0\n" 29 | " z: 0.0\n" 30 | " }\n" 31 | " rotation {\n" 32 | " x: 0.0\n" 33 | " y: 0.0\n" 34 | " z: 0.0\n" 35 | " w: 1.0\n" 36 | " }\n" 37 | "}\n" 38 | "embedded_components {\n" 39 | " id: \"gameplay\"\n" 40 | " type: \"collectionproxy\"\n" 41 | " data: \"collection: \\\"/scenes/gameplay/gameplay.collection\\\"\\n" 42 | "exclude: false\\n" 43 | "\"\n" 44 | " position {\n" 45 | " x: 0.0\n" 46 | " y: 0.0\n" 47 | " z: 0.0\n" 48 | " }\n" 49 | " rotation {\n" 50 | " x: 0.0\n" 51 | " y: 0.0\n" 52 | " z: 0.0\n" 53 | " w: 1.0\n" 54 | " }\n" 55 | "}\n" 56 | "embedded_components {\n" 57 | " id: \"help\"\n" 58 | " type: \"collectionproxy\"\n" 59 | " data: \"collection: \\\"/scenes/help/help.collection\\\"\\n" 60 | "exclude: false\\n" 61 | "\"\n" 62 | " position {\n" 63 | " x: 0.0\n" 64 | " y: 0.0\n" 65 | " z: 0.0\n" 66 | " }\n" 67 | " rotation {\n" 68 | " x: 0.0\n" 69 | " y: 0.0\n" 70 | " z: 0.0\n" 71 | " w: 1.0\n" 72 | " }\n" 73 | "}\n" 74 | "embedded_components {\n" 75 | " id: \"help_chapter\"\n" 76 | " type: \"collectionproxy\"\n" 77 | " data: \"collection: \\\"/scenes/help_chapter/help_chapter.collection\\\"\\n" 78 | "exclude: false\\n" 79 | "\"\n" 80 | " position {\n" 81 | " x: 0.0\n" 82 | " y: 0.0\n" 83 | " z: 0.0\n" 84 | " }\n" 85 | " rotation {\n" 86 | " x: 0.0\n" 87 | " y: 0.0\n" 88 | " z: 0.0\n" 89 | " w: 1.0\n" 90 | " }\n" 91 | "}\n" 92 | "embedded_components {\n" 93 | " id: \"level_selector\"\n" 94 | " type: \"collectionproxy\"\n" 95 | " data: \"collection: \\\"/scenes/level_selector/level_selector.collection\\\"\\n" 96 | "exclude: false\\n" 97 | "\"\n" 98 | " position {\n" 99 | " x: 0.0\n" 100 | " y: 0.0\n" 101 | " z: 0.0\n" 102 | " }\n" 103 | " rotation {\n" 104 | " x: 0.0\n" 105 | " y: 0.0\n" 106 | " z: 0.0\n" 107 | " w: 1.0\n" 108 | " }\n" 109 | "}\n" 110 | "embedded_components {\n" 111 | " id: \"main_menu\"\n" 112 | " type: \"collectionproxy\"\n" 113 | " data: \"collection: \\\"/scenes/main_menu/main_menu.collection\\\"\\n" 114 | "exclude: false\\n" 115 | "\"\n" 116 | " position {\n" 117 | " x: 0.0\n" 118 | " y: 0.0\n" 119 | " z: 0.0\n" 120 | " }\n" 121 | " rotation {\n" 122 | " x: 0.0\n" 123 | " y: 0.0\n" 124 | " z: 0.0\n" 125 | " w: 1.0\n" 126 | " }\n" 127 | "}\n" 128 | "embedded_components {\n" 129 | " id: \"settings\"\n" 130 | " type: \"collectionproxy\"\n" 131 | " data: \"collection: \\\"/scenes/settings/settings.collection\\\"\\n" 132 | "exclude: false\\n" 133 | "\"\n" 134 | " position {\n" 135 | " x: 0.0\n" 136 | " y: 0.0\n" 137 | " z: 0.0\n" 138 | " }\n" 139 | " rotation {\n" 140 | " x: 0.0\n" 141 | " y: 0.0\n" 142 | " z: 0.0\n" 143 | " w: 1.0\n" 144 | " }\n" 145 | "}\n" 146 | "embedded_components {\n" 147 | " id: \"win\"\n" 148 | " type: \"collectionproxy\"\n" 149 | " data: \"collection: \\\"/scenes/win/win.collection\\\"\\n" 150 | "exclude: false\\n" 151 | "\"\n" 152 | " position {\n" 153 | " x: 0.0\n" 154 | " y: 0.0\n" 155 | " z: 0.0\n" 156 | " }\n" 157 | " rotation {\n" 158 | " x: 0.0\n" 159 | " y: 0.0\n" 160 | " z: 0.0\n" 161 | " w: 1.0\n" 162 | " }\n" 163 | "}\n" 164 | "" 165 | position { 166 | x: 640.0 167 | y: 340.0 168 | z: 0.0 169 | } 170 | rotation { 171 | x: 0.0 172 | y: 0.0 173 | z: 0.0 174 | w: 1.0 175 | } 176 | scale3 { 177 | x: 1.0 178 | y: 1.0 179 | z: 1.0 180 | } 181 | } 182 | embedded_instances { 183 | id: "loader" 184 | data: "components {\n" 185 | " id: \"loader\"\n" 186 | " component: \"/main/loader.gui\"\n" 187 | " position {\n" 188 | " x: 0.0\n" 189 | " y: 0.0\n" 190 | " z: 0.0\n" 191 | " }\n" 192 | " rotation {\n" 193 | " x: 0.0\n" 194 | " y: 0.0\n" 195 | " z: 0.0\n" 196 | " w: 1.0\n" 197 | " }\n" 198 | "}\n" 199 | "" 200 | position { 201 | x: 0.0 202 | y: 0.0 203 | z: 0.0 204 | } 205 | rotation { 206 | x: 0.0 207 | y: 0.0 208 | z: 0.0 209 | w: 1.0 210 | } 211 | scale3 { 212 | x: 1.0 213 | y: 1.0 214 | z: 1.0 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /scenes/settings/settings.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/settings/settings.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 300.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 800.0 29 | y: 600.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 0.0 35 | y: 0.0 36 | z: 0.0 37 | w: 1.0 38 | } 39 | type: TYPE_BOX 40 | blend_mode: BLEND_MODE_ALPHA 41 | texture: "" 42 | id: "shadow" 43 | xanchor: XANCHOR_NONE 44 | yanchor: YANCHOR_NONE 45 | pivot: PIVOT_CENTER 46 | adjust_mode: ADJUST_MODE_FIT 47 | layer: "" 48 | inherit_alpha: true 49 | slice9 { 50 | x: 0.0 51 | y: 0.0 52 | z: 0.0 53 | w: 0.0 54 | } 55 | clipping_mode: CLIPPING_MODE_NONE 56 | clipping_visible: true 57 | clipping_inverted: false 58 | alpha: 0.0 59 | template_node_child: false 60 | size_mode: SIZE_MODE_MANUAL 61 | } 62 | nodes { 63 | position { 64 | x: 0.0 65 | y: 0.0 66 | z: 0.0 67 | w: 1.0 68 | } 69 | rotation { 70 | x: 0.0 71 | y: 0.0 72 | z: 0.0 73 | w: 1.0 74 | } 75 | scale { 76 | x: 1.0 77 | y: 1.0 78 | z: 1.0 79 | w: 1.0 80 | } 81 | size { 82 | x: 0.0 83 | y: 0.0 84 | z: 0.0 85 | w: 1.0 86 | } 87 | color { 88 | x: 1.0 89 | y: 1.0 90 | z: 1.0 91 | w: 1.0 92 | } 93 | type: TYPE_BOX 94 | blend_mode: BLEND_MODE_ALPHA 95 | texture: "" 96 | id: "container" 97 | xanchor: XANCHOR_NONE 98 | yanchor: YANCHOR_NONE 99 | pivot: PIVOT_CENTER 100 | adjust_mode: ADJUST_MODE_FIT 101 | layer: "" 102 | inherit_alpha: true 103 | slice9 { 104 | x: 0.0 105 | y: 0.0 106 | z: 0.0 107 | w: 0.0 108 | } 109 | clipping_mode: CLIPPING_MODE_NONE 110 | clipping_visible: true 111 | clipping_inverted: false 112 | alpha: 1.0 113 | template_node_child: false 114 | size_mode: SIZE_MODE_MANUAL 115 | } 116 | nodes { 117 | position { 118 | x: 400.0 119 | y: 300.0 120 | z: 0.0 121 | w: 1.0 122 | } 123 | rotation { 124 | x: 0.0 125 | y: 0.0 126 | z: 0.0 127 | w: 1.0 128 | } 129 | scale { 130 | x: 1.0 131 | y: 1.0 132 | z: 1.0 133 | w: 1.0 134 | } 135 | size { 136 | x: 200.0 137 | y: 100.0 138 | z: 0.0 139 | w: 1.0 140 | } 141 | color { 142 | x: 1.0 143 | y: 1.0 144 | z: 1.0 145 | w: 1.0 146 | } 147 | type: TYPE_TEMPLATE 148 | id: "info" 149 | parent: "container" 150 | layer: "" 151 | inherit_alpha: true 152 | alpha: 1.0 153 | template: "/common/label.gui" 154 | template_node_child: false 155 | } 156 | nodes { 157 | position { 158 | x: 0.0 159 | y: 0.0 160 | z: 0.0 161 | w: 1.0 162 | } 163 | rotation { 164 | x: 0.0 165 | y: 0.0 166 | z: 0.0 167 | w: 1.0 168 | } 169 | scale { 170 | x: 1.0 171 | y: 1.0 172 | z: 1.0 173 | w: 1.0 174 | } 175 | size { 176 | x: 600.0 177 | y: 200.0 178 | z: 0.0 179 | w: 1.0 180 | } 181 | color { 182 | x: 1.0 183 | y: 1.0 184 | z: 1.0 185 | w: 1.0 186 | } 187 | type: TYPE_BOX 188 | blend_mode: BLEND_MODE_ALPHA 189 | texture: "objects/textbox" 190 | id: "info/box" 191 | xanchor: XANCHOR_NONE 192 | yanchor: YANCHOR_NONE 193 | pivot: PIVOT_CENTER 194 | adjust_mode: ADJUST_MODE_FIT 195 | parent: "info" 196 | layer: "" 197 | inherit_alpha: true 198 | slice9 { 199 | x: 8.0 200 | y: 8.0 201 | z: 8.0 202 | w: 8.0 203 | } 204 | clipping_mode: CLIPPING_MODE_NONE 205 | clipping_visible: true 206 | clipping_inverted: false 207 | alpha: 1.0 208 | overridden_fields: 4 209 | template_node_child: true 210 | size_mode: SIZE_MODE_MANUAL 211 | } 212 | nodes { 213 | position { 214 | x: 0.0 215 | y: 0.0 216 | z: 0.0 217 | w: 1.0 218 | } 219 | rotation { 220 | x: 0.0 221 | y: 0.0 222 | z: 0.0 223 | w: 1.0 224 | } 225 | scale { 226 | x: 1.0 227 | y: 1.0 228 | z: 1.0 229 | w: 1.0 230 | } 231 | size { 232 | x: 590.0 233 | y: 200.0 234 | z: 0.0 235 | w: 1.0 236 | } 237 | color { 238 | x: 1.0 239 | y: 1.0 240 | z: 1.0 241 | w: 1.0 242 | } 243 | type: TYPE_TEXT 244 | blend_mode: BLEND_MODE_ALPHA 245 | text: "This scene was displayed with \"router.popup\" function. The previous scene is still loaded and displayed, but the input is disabled. It is a good way to show any popup (e.g. settings) in your game." 246 | font: "text" 247 | id: "info/text" 248 | xanchor: XANCHOR_NONE 249 | yanchor: YANCHOR_NONE 250 | pivot: PIVOT_CENTER 251 | outline { 252 | x: 0.0 253 | y: 0.0 254 | z: 0.0 255 | w: 1.0 256 | } 257 | shadow { 258 | x: 1.0 259 | y: 1.0 260 | z: 1.0 261 | w: 1.0 262 | } 263 | adjust_mode: ADJUST_MODE_FIT 264 | line_break: true 265 | parent: "info/box" 266 | layer: "" 267 | inherit_alpha: true 268 | alpha: 1.0 269 | outline_alpha: 1.0 270 | shadow_alpha: 1.0 271 | overridden_fields: 4 272 | overridden_fields: 8 273 | overridden_fields: 10 274 | template_node_child: true 275 | text_leading: 1.0 276 | text_tracking: 0.0 277 | } 278 | nodes { 279 | position { 280 | x: 400.0 281 | y: 100.0 282 | z: 0.0 283 | w: 1.0 284 | } 285 | rotation { 286 | x: 0.0 287 | y: 0.0 288 | z: 0.0 289 | w: 1.0 290 | } 291 | scale { 292 | x: 1.0 293 | y: 1.0 294 | z: 1.0 295 | w: 1.0 296 | } 297 | size { 298 | x: 200.0 299 | y: 100.0 300 | z: 0.0 301 | w: 1.0 302 | } 303 | color { 304 | x: 1.0 305 | y: 1.0 306 | z: 1.0 307 | w: 1.0 308 | } 309 | type: TYPE_TEMPLATE 310 | id: "close" 311 | parent: "container" 312 | layer: "" 313 | inherit_alpha: true 314 | alpha: 1.0 315 | template: "/common/button.gui" 316 | template_node_child: false 317 | } 318 | nodes { 319 | position { 320 | x: 0.0 321 | y: 0.0 322 | z: 0.0 323 | w: 1.0 324 | } 325 | rotation { 326 | x: 0.0 327 | y: 0.0 328 | z: 0.0 329 | w: 1.0 330 | } 331 | scale { 332 | x: 1.0 333 | y: 1.0 334 | z: 1.0 335 | w: 1.0 336 | } 337 | size { 338 | x: 200.0 339 | y: 60.0 340 | z: 0.0 341 | w: 1.0 342 | } 343 | color { 344 | x: 1.0 345 | y: 1.0 346 | z: 1.0 347 | w: 1.0 348 | } 349 | type: TYPE_BOX 350 | blend_mode: BLEND_MODE_ALPHA 351 | texture: "buttons/button" 352 | id: "close/box" 353 | xanchor: XANCHOR_NONE 354 | yanchor: YANCHOR_NONE 355 | pivot: PIVOT_CENTER 356 | adjust_mode: ADJUST_MODE_FIT 357 | parent: "close" 358 | layer: "" 359 | inherit_alpha: true 360 | slice9 { 361 | x: 20.0 362 | y: 20.0 363 | z: 40.0 364 | w: 40.0 365 | } 366 | clipping_mode: CLIPPING_MODE_NONE 367 | clipping_visible: true 368 | clipping_inverted: false 369 | alpha: 1.0 370 | overridden_fields: 4 371 | template_node_child: true 372 | size_mode: SIZE_MODE_MANUAL 373 | } 374 | nodes { 375 | position { 376 | x: 0.0 377 | y: 0.0 378 | z: 0.0 379 | w: 1.0 380 | } 381 | rotation { 382 | x: 0.0 383 | y: 0.0 384 | z: 0.0 385 | w: 1.0 386 | } 387 | scale { 388 | x: 1.0 389 | y: 1.0 390 | z: 1.0 391 | w: 1.0 392 | } 393 | size { 394 | x: 200.0 395 | y: 60.0 396 | z: 0.0 397 | w: 1.0 398 | } 399 | color { 400 | x: 0.0 401 | y: 0.0 402 | z: 0.0 403 | w: 1.0 404 | } 405 | type: TYPE_BOX 406 | blend_mode: BLEND_MODE_ALPHA 407 | texture: "buttons/button" 408 | id: "close/pressed" 409 | xanchor: XANCHOR_NONE 410 | yanchor: YANCHOR_NONE 411 | pivot: PIVOT_CENTER 412 | adjust_mode: ADJUST_MODE_FIT 413 | parent: "close/box" 414 | layer: "" 415 | inherit_alpha: true 416 | slice9 { 417 | x: 20.0 418 | y: 20.0 419 | z: 40.0 420 | w: 40.0 421 | } 422 | clipping_mode: CLIPPING_MODE_NONE 423 | clipping_visible: true 424 | clipping_inverted: false 425 | alpha: 0.0 426 | overridden_fields: 4 427 | template_node_child: true 428 | size_mode: SIZE_MODE_MANUAL 429 | } 430 | nodes { 431 | position { 432 | x: 0.0 433 | y: 0.0 434 | z: 0.0 435 | w: 1.0 436 | } 437 | rotation { 438 | x: 0.0 439 | y: 0.0 440 | z: 0.0 441 | w: 1.0 442 | } 443 | scale { 444 | x: 1.0 445 | y: 1.0 446 | z: 1.0 447 | w: 1.0 448 | } 449 | size { 450 | x: 200.0 451 | y: 60.0 452 | z: 0.0 453 | w: 1.0 454 | } 455 | color { 456 | x: 1.0 457 | y: 1.0 458 | z: 1.0 459 | w: 1.0 460 | } 461 | type: TYPE_TEXT 462 | blend_mode: BLEND_MODE_ALPHA 463 | text: "Close" 464 | font: "font" 465 | id: "close/text" 466 | xanchor: XANCHOR_NONE 467 | yanchor: YANCHOR_NONE 468 | pivot: PIVOT_CENTER 469 | outline { 470 | x: 0.0 471 | y: 0.0 472 | z: 0.0 473 | w: 1.0 474 | } 475 | shadow { 476 | x: 1.0 477 | y: 1.0 478 | z: 1.0 479 | w: 1.0 480 | } 481 | adjust_mode: ADJUST_MODE_FIT 482 | line_break: false 483 | parent: "close" 484 | layer: "" 485 | inherit_alpha: true 486 | alpha: 1.0 487 | outline_alpha: 1.0 488 | shadow_alpha: 1.0 489 | overridden_fields: 4 490 | overridden_fields: 8 491 | template_node_child: true 492 | text_leading: 1.0 493 | text_tracking: 0.0 494 | } 495 | material: "/builtins/materials/gui.material" 496 | adjust_reference: ADJUST_REFERENCE_PARENT 497 | max_nodes: 512 498 | -------------------------------------------------------------------------------- /scenes/fail/fail.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/fail/fail.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 300.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "text" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/label.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 500.0 68 | y: 100.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "objects/textbox" 81 | id: "text/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "text" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 8.0 91 | y: 8.0 92 | z: 8.0 93 | w: 8.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | overridden_fields: 4 100 | template_node_child: true 101 | size_mode: SIZE_MODE_MANUAL 102 | } 103 | nodes { 104 | position { 105 | x: 0.0 106 | y: 0.0 107 | z: 0.0 108 | w: 1.0 109 | } 110 | rotation { 111 | x: 0.0 112 | y: 0.0 113 | z: 0.0 114 | w: 1.0 115 | } 116 | scale { 117 | x: 1.0 118 | y: 1.0 119 | z: 1.0 120 | w: 1.0 121 | } 122 | size { 123 | x: 500.0 124 | y: 100.0 125 | z: 0.0 126 | w: 1.0 127 | } 128 | color { 129 | x: 1.0 130 | y: 1.0 131 | z: 1.0 132 | w: 1.0 133 | } 134 | type: TYPE_TEXT 135 | blend_mode: BLEND_MODE_ALPHA 136 | text: "text" 137 | font: "menu" 138 | id: "text/text" 139 | xanchor: XANCHOR_NONE 140 | yanchor: YANCHOR_NONE 141 | pivot: PIVOT_CENTER 142 | outline { 143 | x: 0.0 144 | y: 0.0 145 | z: 0.0 146 | w: 1.0 147 | } 148 | shadow { 149 | x: 1.0 150 | y: 1.0 151 | z: 1.0 152 | w: 1.0 153 | } 154 | adjust_mode: ADJUST_MODE_FIT 155 | line_break: true 156 | parent: "text/box" 157 | layer: "" 158 | inherit_alpha: true 159 | alpha: 1.0 160 | outline_alpha: 1.0 161 | shadow_alpha: 1.0 162 | overridden_fields: 4 163 | template_node_child: true 164 | text_leading: 1.0 165 | text_tracking: 0.0 166 | } 167 | nodes { 168 | position { 169 | x: 400.0 170 | y: 500.0 171 | z: 0.0 172 | w: 1.0 173 | } 174 | rotation { 175 | x: 0.0 176 | y: 0.0 177 | z: 0.0 178 | w: 1.0 179 | } 180 | scale { 181 | x: 1.0 182 | y: 1.0 183 | z: 1.0 184 | w: 1.0 185 | } 186 | size { 187 | x: 200.0 188 | y: 100.0 189 | z: 0.0 190 | w: 1.0 191 | } 192 | color { 193 | x: 1.0 194 | y: 1.0 195 | z: 1.0 196 | w: 1.0 197 | } 198 | type: TYPE_TEMPLATE 199 | id: "label" 200 | layer: "" 201 | inherit_alpha: true 202 | alpha: 1.0 203 | template: "/common/label.gui" 204 | template_node_child: false 205 | } 206 | nodes { 207 | position { 208 | x: 0.0 209 | y: 0.0 210 | z: 0.0 211 | w: 1.0 212 | } 213 | rotation { 214 | x: 0.0 215 | y: 0.0 216 | z: 0.0 217 | w: 1.0 218 | } 219 | scale { 220 | x: 1.0 221 | y: 1.0 222 | z: 1.0 223 | w: 1.0 224 | } 225 | size { 226 | x: 700.0 227 | y: 100.0 228 | z: 0.0 229 | w: 1.0 230 | } 231 | color { 232 | x: 1.0 233 | y: 1.0 234 | z: 1.0 235 | w: 1.0 236 | } 237 | type: TYPE_BOX 238 | blend_mode: BLEND_MODE_ALPHA 239 | texture: "objects/textbox" 240 | id: "label/box" 241 | xanchor: XANCHOR_NONE 242 | yanchor: YANCHOR_NONE 243 | pivot: PIVOT_CENTER 244 | adjust_mode: ADJUST_MODE_FIT 245 | parent: "label" 246 | layer: "" 247 | inherit_alpha: true 248 | slice9 { 249 | x: 8.0 250 | y: 8.0 251 | z: 8.0 252 | w: 8.0 253 | } 254 | clipping_mode: CLIPPING_MODE_NONE 255 | clipping_visible: true 256 | clipping_inverted: false 257 | alpha: 1.0 258 | overridden_fields: 4 259 | template_node_child: true 260 | size_mode: SIZE_MODE_MANUAL 261 | } 262 | nodes { 263 | position { 264 | x: 0.0 265 | y: 0.0 266 | z: 0.0 267 | w: 1.0 268 | } 269 | rotation { 270 | x: 0.0 271 | y: 0.0 272 | z: 0.0 273 | w: 1.0 274 | } 275 | scale { 276 | x: 1.0 277 | y: 1.0 278 | z: 1.0 279 | w: 1.0 280 | } 281 | size { 282 | x: 650.0 283 | y: 100.0 284 | z: 0.0 285 | w: 1.0 286 | } 287 | color { 288 | x: 1.0 289 | y: 1.0 290 | z: 1.0 291 | w: 1.0 292 | } 293 | type: TYPE_TEXT 294 | blend_mode: BLEND_MODE_ALPHA 295 | text: "This scene was displayed according to routing rules." 296 | font: "text" 297 | id: "label/text" 298 | xanchor: XANCHOR_NONE 299 | yanchor: YANCHOR_NONE 300 | pivot: PIVOT_CENTER 301 | outline { 302 | x: 0.0 303 | y: 0.0 304 | z: 0.0 305 | w: 1.0 306 | } 307 | shadow { 308 | x: 1.0 309 | y: 1.0 310 | z: 1.0 311 | w: 1.0 312 | } 313 | adjust_mode: ADJUST_MODE_FIT 314 | line_break: true 315 | parent: "label/box" 316 | layer: "" 317 | inherit_alpha: true 318 | alpha: 1.0 319 | outline_alpha: 1.0 320 | shadow_alpha: 1.0 321 | overridden_fields: 4 322 | overridden_fields: 8 323 | overridden_fields: 10 324 | template_node_child: true 325 | text_leading: 1.0 326 | text_tracking: 0.0 327 | } 328 | nodes { 329 | position { 330 | x: 400.0 331 | y: 100.0 332 | z: 0.0 333 | w: 1.0 334 | } 335 | rotation { 336 | x: 0.0 337 | y: 0.0 338 | z: 0.0 339 | w: 1.0 340 | } 341 | scale { 342 | x: 1.0 343 | y: 1.0 344 | z: 1.0 345 | w: 1.0 346 | } 347 | size { 348 | x: 200.0 349 | y: 100.0 350 | z: 0.0 351 | w: 1.0 352 | } 353 | color { 354 | x: 1.0 355 | y: 1.0 356 | z: 1.0 357 | w: 1.0 358 | } 359 | type: TYPE_TEMPLATE 360 | id: "ok" 361 | layer: "" 362 | inherit_alpha: true 363 | alpha: 1.0 364 | template: "/common/button.gui" 365 | template_node_child: false 366 | } 367 | nodes { 368 | position { 369 | x: 0.0 370 | y: 0.0 371 | z: 0.0 372 | w: 1.0 373 | } 374 | rotation { 375 | x: 0.0 376 | y: 0.0 377 | z: 0.0 378 | w: 1.0 379 | } 380 | scale { 381 | x: 1.0 382 | y: 1.0 383 | z: 1.0 384 | w: 1.0 385 | } 386 | size { 387 | x: 200.0 388 | y: 100.0 389 | z: 0.0 390 | w: 1.0 391 | } 392 | color { 393 | x: 1.0 394 | y: 1.0 395 | z: 1.0 396 | w: 1.0 397 | } 398 | type: TYPE_BOX 399 | blend_mode: BLEND_MODE_ALPHA 400 | texture: "buttons/button" 401 | id: "ok/box" 402 | xanchor: XANCHOR_NONE 403 | yanchor: YANCHOR_NONE 404 | pivot: PIVOT_CENTER 405 | adjust_mode: ADJUST_MODE_FIT 406 | parent: "ok" 407 | layer: "" 408 | inherit_alpha: true 409 | slice9 { 410 | x: 20.0 411 | y: 20.0 412 | z: 40.0 413 | w: 40.0 414 | } 415 | clipping_mode: CLIPPING_MODE_NONE 416 | clipping_visible: true 417 | clipping_inverted: false 418 | alpha: 1.0 419 | overridden_fields: 4 420 | template_node_child: true 421 | size_mode: SIZE_MODE_MANUAL 422 | } 423 | nodes { 424 | position { 425 | x: 0.0 426 | y: 0.0 427 | z: 0.0 428 | w: 1.0 429 | } 430 | rotation { 431 | x: 0.0 432 | y: 0.0 433 | z: 0.0 434 | w: 1.0 435 | } 436 | scale { 437 | x: 1.0 438 | y: 1.0 439 | z: 1.0 440 | w: 1.0 441 | } 442 | size { 443 | x: 200.0 444 | y: 100.0 445 | z: 0.0 446 | w: 1.0 447 | } 448 | color { 449 | x: 0.0 450 | y: 0.0 451 | z: 0.0 452 | w: 1.0 453 | } 454 | type: TYPE_BOX 455 | blend_mode: BLEND_MODE_ALPHA 456 | texture: "buttons/button" 457 | id: "ok/pressed" 458 | xanchor: XANCHOR_NONE 459 | yanchor: YANCHOR_NONE 460 | pivot: PIVOT_CENTER 461 | adjust_mode: ADJUST_MODE_FIT 462 | parent: "ok/box" 463 | layer: "" 464 | inherit_alpha: true 465 | slice9 { 466 | x: 20.0 467 | y: 20.0 468 | z: 40.0 469 | w: 40.0 470 | } 471 | clipping_mode: CLIPPING_MODE_NONE 472 | clipping_visible: true 473 | clipping_inverted: false 474 | alpha: 0.0 475 | overridden_fields: 4 476 | template_node_child: true 477 | size_mode: SIZE_MODE_MANUAL 478 | } 479 | nodes { 480 | position { 481 | x: 0.0 482 | y: 0.0 483 | z: 0.0 484 | w: 1.0 485 | } 486 | rotation { 487 | x: 0.0 488 | y: 0.0 489 | z: 0.0 490 | w: 1.0 491 | } 492 | scale { 493 | x: 1.0 494 | y: 1.0 495 | z: 1.0 496 | w: 1.0 497 | } 498 | size { 499 | x: 200.0 500 | y: 100.0 501 | z: 0.0 502 | w: 1.0 503 | } 504 | color { 505 | x: 1.0 506 | y: 1.0 507 | z: 1.0 508 | w: 1.0 509 | } 510 | type: TYPE_TEXT 511 | blend_mode: BLEND_MODE_ALPHA 512 | text: "OK" 513 | font: "font" 514 | id: "ok/text" 515 | xanchor: XANCHOR_NONE 516 | yanchor: YANCHOR_NONE 517 | pivot: PIVOT_CENTER 518 | outline { 519 | x: 0.0 520 | y: 0.0 521 | z: 0.0 522 | w: 1.0 523 | } 524 | shadow { 525 | x: 1.0 526 | y: 1.0 527 | z: 1.0 528 | w: 1.0 529 | } 530 | adjust_mode: ADJUST_MODE_FIT 531 | line_break: false 532 | parent: "ok" 533 | layer: "" 534 | inherit_alpha: true 535 | alpha: 1.0 536 | outline_alpha: 1.0 537 | shadow_alpha: 1.0 538 | overridden_fields: 8 539 | template_node_child: true 540 | text_leading: 1.0 541 | text_tracking: 0.0 542 | } 543 | nodes { 544 | position { 545 | x: 400.0 546 | y: 300.0 547 | z: 0.0 548 | w: 1.0 549 | } 550 | rotation { 551 | x: 0.0 552 | y: 0.0 553 | z: 0.0 554 | w: 1.0 555 | } 556 | scale { 557 | x: 1.0 558 | y: 1.0 559 | z: 1.0 560 | w: 1.0 561 | } 562 | size { 563 | x: 800.0 564 | y: 600.0 565 | z: 0.0 566 | w: 1.0 567 | } 568 | color { 569 | x: 0.0 570 | y: 0.0 571 | z: 0.0 572 | w: 1.0 573 | } 574 | type: TYPE_BOX 575 | blend_mode: BLEND_MODE_ALPHA 576 | texture: "" 577 | id: "fader" 578 | xanchor: XANCHOR_NONE 579 | yanchor: YANCHOR_NONE 580 | pivot: PIVOT_CENTER 581 | adjust_mode: ADJUST_MODE_FIT 582 | layer: "" 583 | inherit_alpha: true 584 | slice9 { 585 | x: 0.0 586 | y: 0.0 587 | z: 0.0 588 | w: 0.0 589 | } 590 | clipping_mode: CLIPPING_MODE_NONE 591 | clipping_visible: true 592 | clipping_inverted: false 593 | alpha: 0.0 594 | template_node_child: false 595 | size_mode: SIZE_MODE_MANUAL 596 | } 597 | material: "/builtins/materials/gui.material" 598 | adjust_reference: ADJUST_REFERENCE_PARENT 599 | max_nodes: 512 600 | -------------------------------------------------------------------------------- /scenes/win/win.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/win/win.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 300.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "text" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/label.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 500.0 68 | y: 100.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "objects/textbox" 81 | id: "text/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "text" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 8.0 91 | y: 8.0 92 | z: 8.0 93 | w: 8.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | overridden_fields: 4 100 | template_node_child: true 101 | size_mode: SIZE_MODE_MANUAL 102 | } 103 | nodes { 104 | position { 105 | x: 0.0 106 | y: 0.0 107 | z: 0.0 108 | w: 1.0 109 | } 110 | rotation { 111 | x: 0.0 112 | y: 0.0 113 | z: 0.0 114 | w: 1.0 115 | } 116 | scale { 117 | x: 1.0 118 | y: 1.0 119 | z: 1.0 120 | w: 1.0 121 | } 122 | size { 123 | x: 500.0 124 | y: 100.0 125 | z: 0.0 126 | w: 1.0 127 | } 128 | color { 129 | x: 1.0 130 | y: 1.0 131 | z: 1.0 132 | w: 1.0 133 | } 134 | type: TYPE_TEXT 135 | blend_mode: BLEND_MODE_ALPHA 136 | text: "text" 137 | font: "menu" 138 | id: "text/text" 139 | xanchor: XANCHOR_NONE 140 | yanchor: YANCHOR_NONE 141 | pivot: PIVOT_CENTER 142 | outline { 143 | x: 0.0 144 | y: 0.0 145 | z: 0.0 146 | w: 1.0 147 | } 148 | shadow { 149 | x: 1.0 150 | y: 1.0 151 | z: 1.0 152 | w: 1.0 153 | } 154 | adjust_mode: ADJUST_MODE_FIT 155 | line_break: true 156 | parent: "text/box" 157 | layer: "" 158 | inherit_alpha: true 159 | alpha: 1.0 160 | outline_alpha: 1.0 161 | shadow_alpha: 1.0 162 | overridden_fields: 4 163 | template_node_child: true 164 | text_leading: 1.0 165 | text_tracking: 0.0 166 | } 167 | nodes { 168 | position { 169 | x: 400.0 170 | y: 500.0 171 | z: 0.0 172 | w: 1.0 173 | } 174 | rotation { 175 | x: 0.0 176 | y: 0.0 177 | z: 0.0 178 | w: 1.0 179 | } 180 | scale { 181 | x: 1.0 182 | y: 1.0 183 | z: 1.0 184 | w: 1.0 185 | } 186 | size { 187 | x: 200.0 188 | y: 100.0 189 | z: 0.0 190 | w: 1.0 191 | } 192 | color { 193 | x: 1.0 194 | y: 1.0 195 | z: 1.0 196 | w: 1.0 197 | } 198 | type: TYPE_TEMPLATE 199 | id: "label" 200 | layer: "" 201 | inherit_alpha: true 202 | alpha: 1.0 203 | template: "/common/label.gui" 204 | template_node_child: false 205 | } 206 | nodes { 207 | position { 208 | x: 0.0 209 | y: 0.0 210 | z: 0.0 211 | w: 1.0 212 | } 213 | rotation { 214 | x: 0.0 215 | y: 0.0 216 | z: 0.0 217 | w: 1.0 218 | } 219 | scale { 220 | x: 1.0 221 | y: 1.0 222 | z: 1.0 223 | w: 1.0 224 | } 225 | size { 226 | x: 700.0 227 | y: 100.0 228 | z: 0.0 229 | w: 1.0 230 | } 231 | color { 232 | x: 1.0 233 | y: 1.0 234 | z: 1.0 235 | w: 1.0 236 | } 237 | type: TYPE_BOX 238 | blend_mode: BLEND_MODE_ALPHA 239 | texture: "objects/textbox" 240 | id: "label/box" 241 | xanchor: XANCHOR_NONE 242 | yanchor: YANCHOR_NONE 243 | pivot: PIVOT_CENTER 244 | adjust_mode: ADJUST_MODE_FIT 245 | parent: "label" 246 | layer: "" 247 | inherit_alpha: true 248 | slice9 { 249 | x: 8.0 250 | y: 8.0 251 | z: 8.0 252 | w: 8.0 253 | } 254 | clipping_mode: CLIPPING_MODE_NONE 255 | clipping_visible: true 256 | clipping_inverted: false 257 | alpha: 1.0 258 | overridden_fields: 4 259 | template_node_child: true 260 | size_mode: SIZE_MODE_MANUAL 261 | } 262 | nodes { 263 | position { 264 | x: 0.0 265 | y: 0.0 266 | z: 0.0 267 | w: 1.0 268 | } 269 | rotation { 270 | x: 0.0 271 | y: 0.0 272 | z: 0.0 273 | w: 1.0 274 | } 275 | scale { 276 | x: 1.0 277 | y: 1.0 278 | z: 1.0 279 | w: 1.0 280 | } 281 | size { 282 | x: 650.0 283 | y: 100.0 284 | z: 0.0 285 | w: 1.0 286 | } 287 | color { 288 | x: 1.0 289 | y: 1.0 290 | z: 1.0 291 | w: 1.0 292 | } 293 | type: TYPE_TEXT 294 | blend_mode: BLEND_MODE_ALPHA 295 | text: "This scene was displayed according to routing rules." 296 | font: "text" 297 | id: "label/text" 298 | xanchor: XANCHOR_NONE 299 | yanchor: YANCHOR_NONE 300 | pivot: PIVOT_CENTER 301 | outline { 302 | x: 0.0 303 | y: 0.0 304 | z: 0.0 305 | w: 1.0 306 | } 307 | shadow { 308 | x: 1.0 309 | y: 1.0 310 | z: 1.0 311 | w: 1.0 312 | } 313 | adjust_mode: ADJUST_MODE_FIT 314 | line_break: true 315 | parent: "label/box" 316 | layer: "" 317 | inherit_alpha: true 318 | alpha: 1.0 319 | outline_alpha: 1.0 320 | shadow_alpha: 1.0 321 | overridden_fields: 4 322 | overridden_fields: 8 323 | overridden_fields: 10 324 | template_node_child: true 325 | text_leading: 1.0 326 | text_tracking: 0.0 327 | } 328 | nodes { 329 | position { 330 | x: 400.0 331 | y: 100.0 332 | z: 0.0 333 | w: 1.0 334 | } 335 | rotation { 336 | x: 0.0 337 | y: 0.0 338 | z: 0.0 339 | w: 1.0 340 | } 341 | scale { 342 | x: 1.0 343 | y: 1.0 344 | z: 1.0 345 | w: 1.0 346 | } 347 | size { 348 | x: 200.0 349 | y: 100.0 350 | z: 0.0 351 | w: 1.0 352 | } 353 | color { 354 | x: 1.0 355 | y: 1.0 356 | z: 1.0 357 | w: 1.0 358 | } 359 | type: TYPE_TEMPLATE 360 | id: "ok" 361 | layer: "" 362 | inherit_alpha: true 363 | alpha: 1.0 364 | template: "/common/button.gui" 365 | template_node_child: false 366 | } 367 | nodes { 368 | position { 369 | x: 0.0 370 | y: 0.0 371 | z: 0.0 372 | w: 1.0 373 | } 374 | rotation { 375 | x: 0.0 376 | y: 0.0 377 | z: 0.0 378 | w: 1.0 379 | } 380 | scale { 381 | x: 1.0 382 | y: 1.0 383 | z: 1.0 384 | w: 1.0 385 | } 386 | size { 387 | x: 200.0 388 | y: 100.0 389 | z: 0.0 390 | w: 1.0 391 | } 392 | color { 393 | x: 1.0 394 | y: 1.0 395 | z: 1.0 396 | w: 1.0 397 | } 398 | type: TYPE_BOX 399 | blend_mode: BLEND_MODE_ALPHA 400 | texture: "buttons/button" 401 | id: "ok/box" 402 | xanchor: XANCHOR_NONE 403 | yanchor: YANCHOR_NONE 404 | pivot: PIVOT_CENTER 405 | adjust_mode: ADJUST_MODE_FIT 406 | parent: "ok" 407 | layer: "" 408 | inherit_alpha: true 409 | slice9 { 410 | x: 20.0 411 | y: 20.0 412 | z: 40.0 413 | w: 40.0 414 | } 415 | clipping_mode: CLIPPING_MODE_NONE 416 | clipping_visible: true 417 | clipping_inverted: false 418 | alpha: 1.0 419 | overridden_fields: 4 420 | template_node_child: true 421 | size_mode: SIZE_MODE_MANUAL 422 | } 423 | nodes { 424 | position { 425 | x: 0.0 426 | y: 0.0 427 | z: 0.0 428 | w: 1.0 429 | } 430 | rotation { 431 | x: 0.0 432 | y: 0.0 433 | z: 0.0 434 | w: 1.0 435 | } 436 | scale { 437 | x: 1.0 438 | y: 1.0 439 | z: 1.0 440 | w: 1.0 441 | } 442 | size { 443 | x: 200.0 444 | y: 100.0 445 | z: 0.0 446 | w: 1.0 447 | } 448 | color { 449 | x: 0.0 450 | y: 0.0 451 | z: 0.0 452 | w: 1.0 453 | } 454 | type: TYPE_BOX 455 | blend_mode: BLEND_MODE_ALPHA 456 | texture: "buttons/button" 457 | id: "ok/pressed" 458 | xanchor: XANCHOR_NONE 459 | yanchor: YANCHOR_NONE 460 | pivot: PIVOT_CENTER 461 | adjust_mode: ADJUST_MODE_FIT 462 | parent: "ok/box" 463 | layer: "" 464 | inherit_alpha: true 465 | slice9 { 466 | x: 20.0 467 | y: 20.0 468 | z: 40.0 469 | w: 40.0 470 | } 471 | clipping_mode: CLIPPING_MODE_NONE 472 | clipping_visible: true 473 | clipping_inverted: false 474 | alpha: 0.0 475 | overridden_fields: 4 476 | template_node_child: true 477 | size_mode: SIZE_MODE_MANUAL 478 | } 479 | nodes { 480 | position { 481 | x: 0.0 482 | y: 0.0 483 | z: 0.0 484 | w: 1.0 485 | } 486 | rotation { 487 | x: 0.0 488 | y: 0.0 489 | z: 0.0 490 | w: 1.0 491 | } 492 | scale { 493 | x: 1.0 494 | y: 1.0 495 | z: 1.0 496 | w: 1.0 497 | } 498 | size { 499 | x: 200.0 500 | y: 100.0 501 | z: 0.0 502 | w: 1.0 503 | } 504 | color { 505 | x: 1.0 506 | y: 1.0 507 | z: 1.0 508 | w: 1.0 509 | } 510 | type: TYPE_TEXT 511 | blend_mode: BLEND_MODE_ALPHA 512 | text: "OK" 513 | font: "font" 514 | id: "ok/text" 515 | xanchor: XANCHOR_NONE 516 | yanchor: YANCHOR_NONE 517 | pivot: PIVOT_CENTER 518 | outline { 519 | x: 0.0 520 | y: 0.0 521 | z: 0.0 522 | w: 1.0 523 | } 524 | shadow { 525 | x: 1.0 526 | y: 1.0 527 | z: 1.0 528 | w: 1.0 529 | } 530 | adjust_mode: ADJUST_MODE_FIT 531 | line_break: false 532 | parent: "ok" 533 | layer: "" 534 | inherit_alpha: true 535 | alpha: 1.0 536 | outline_alpha: 1.0 537 | shadow_alpha: 1.0 538 | overridden_fields: 8 539 | template_node_child: true 540 | text_leading: 1.0 541 | text_tracking: 0.0 542 | } 543 | nodes { 544 | position { 545 | x: 400.0 546 | y: 300.0 547 | z: 0.0 548 | w: 1.0 549 | } 550 | rotation { 551 | x: 0.0 552 | y: 0.0 553 | z: 0.0 554 | w: 1.0 555 | } 556 | scale { 557 | x: 1.0 558 | y: 1.0 559 | z: 1.0 560 | w: 1.0 561 | } 562 | size { 563 | x: 800.0 564 | y: 600.0 565 | z: 0.0 566 | w: 1.0 567 | } 568 | color { 569 | x: 0.0 570 | y: 0.0 571 | z: 0.0 572 | w: 1.0 573 | } 574 | type: TYPE_BOX 575 | blend_mode: BLEND_MODE_ALPHA 576 | texture: "" 577 | id: "fader" 578 | xanchor: XANCHOR_NONE 579 | yanchor: YANCHOR_NONE 580 | pivot: PIVOT_CENTER 581 | adjust_mode: ADJUST_MODE_FIT 582 | layer: "" 583 | inherit_alpha: true 584 | slice9 { 585 | x: 0.0 586 | y: 0.0 587 | z: 0.0 588 | w: 0.0 589 | } 590 | clipping_mode: CLIPPING_MODE_NONE 591 | clipping_visible: true 592 | clipping_inverted: false 593 | alpha: 0.0 594 | template_node_child: false 595 | size_mode: SIZE_MODE_MANUAL 596 | } 597 | material: "/builtins/materials/gui.material" 598 | adjust_reference: ADJUST_REFERENCE_PARENT 599 | max_nodes: 512 600 | -------------------------------------------------------------------------------- /scenes/help_chapter/help_chapter.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/help_chapter/help_chapter.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 550.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "title" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/label.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 200.0 68 | y: 60.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "objects/textbox" 81 | id: "title/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "title" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 8.0 91 | y: 8.0 92 | z: 8.0 93 | w: 8.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | overridden_fields: 4 100 | template_node_child: true 101 | size_mode: SIZE_MODE_MANUAL 102 | } 103 | nodes { 104 | position { 105 | x: 0.0 106 | y: 0.0 107 | z: 0.0 108 | w: 1.0 109 | } 110 | rotation { 111 | x: 0.0 112 | y: 0.0 113 | z: 0.0 114 | w: 1.0 115 | } 116 | scale { 117 | x: 1.0 118 | y: 1.0 119 | z: 1.0 120 | w: 1.0 121 | } 122 | size { 123 | x: 200.0 124 | y: 60.0 125 | z: 0.0 126 | w: 1.0 127 | } 128 | color { 129 | x: 1.0 130 | y: 1.0 131 | z: 1.0 132 | w: 1.0 133 | } 134 | type: TYPE_TEXT 135 | blend_mode: BLEND_MODE_ALPHA 136 | text: "text" 137 | font: "menu" 138 | id: "title/text" 139 | xanchor: XANCHOR_NONE 140 | yanchor: YANCHOR_NONE 141 | pivot: PIVOT_CENTER 142 | outline { 143 | x: 0.0 144 | y: 0.0 145 | z: 0.0 146 | w: 1.0 147 | } 148 | shadow { 149 | x: 1.0 150 | y: 1.0 151 | z: 1.0 152 | w: 1.0 153 | } 154 | adjust_mode: ADJUST_MODE_FIT 155 | line_break: true 156 | parent: "title/box" 157 | layer: "" 158 | inherit_alpha: true 159 | alpha: 1.0 160 | outline_alpha: 1.0 161 | shadow_alpha: 1.0 162 | overridden_fields: 4 163 | template_node_child: true 164 | text_leading: 1.0 165 | text_tracking: 0.0 166 | } 167 | nodes { 168 | position { 169 | x: 400.0 170 | y: 300.0 171 | z: 0.0 172 | w: 1.0 173 | } 174 | rotation { 175 | x: 0.0 176 | y: 0.0 177 | z: 0.0 178 | w: 1.0 179 | } 180 | scale { 181 | x: 1.0 182 | y: 1.0 183 | z: 1.0 184 | w: 1.0 185 | } 186 | size { 187 | x: 200.0 188 | y: 100.0 189 | z: 0.0 190 | w: 1.0 191 | } 192 | color { 193 | x: 1.0 194 | y: 1.0 195 | z: 1.0 196 | w: 1.0 197 | } 198 | type: TYPE_TEMPLATE 199 | id: "text" 200 | layer: "" 201 | inherit_alpha: true 202 | alpha: 1.0 203 | template: "/common/label.gui" 204 | template_node_child: false 205 | } 206 | nodes { 207 | position { 208 | x: 0.0 209 | y: 0.0 210 | z: 0.0 211 | w: 1.0 212 | } 213 | rotation { 214 | x: 0.0 215 | y: 0.0 216 | z: 0.0 217 | w: 1.0 218 | } 219 | scale { 220 | x: 1.0 221 | y: 1.0 222 | z: 1.0 223 | w: 1.0 224 | } 225 | size { 226 | x: 700.0 227 | y: 150.0 228 | z: 0.0 229 | w: 1.0 230 | } 231 | color { 232 | x: 1.0 233 | y: 1.0 234 | z: 1.0 235 | w: 1.0 236 | } 237 | type: TYPE_BOX 238 | blend_mode: BLEND_MODE_ALPHA 239 | texture: "objects/textbox" 240 | id: "text/box" 241 | xanchor: XANCHOR_NONE 242 | yanchor: YANCHOR_NONE 243 | pivot: PIVOT_CENTER 244 | adjust_mode: ADJUST_MODE_FIT 245 | parent: "text" 246 | layer: "" 247 | inherit_alpha: true 248 | slice9 { 249 | x: 8.0 250 | y: 8.0 251 | z: 8.0 252 | w: 8.0 253 | } 254 | clipping_mode: CLIPPING_MODE_NONE 255 | clipping_visible: true 256 | clipping_inverted: false 257 | alpha: 1.0 258 | overridden_fields: 4 259 | template_node_child: true 260 | size_mode: SIZE_MODE_MANUAL 261 | } 262 | nodes { 263 | position { 264 | x: 0.0 265 | y: 0.0 266 | z: 0.0 267 | w: 1.0 268 | } 269 | rotation { 270 | x: 0.0 271 | y: 0.0 272 | z: 0.0 273 | w: 1.0 274 | } 275 | scale { 276 | x: 1.0 277 | y: 1.0 278 | z: 1.0 279 | w: 1.0 280 | } 281 | size { 282 | x: 650.0 283 | y: 150.0 284 | z: 0.0 285 | w: 1.0 286 | } 287 | color { 288 | x: 1.0 289 | y: 1.0 290 | z: 1.0 291 | w: 1.0 292 | } 293 | type: TYPE_TEXT 294 | blend_mode: BLEND_MODE_ALPHA 295 | text: "This scene was displayed with \"router.push\" function, the previous scene was unloaded. You can use this method to implement navigation stack while saving memory. Use states to restore previous scene." 296 | font: "text" 297 | id: "text/text" 298 | xanchor: XANCHOR_NONE 299 | yanchor: YANCHOR_NONE 300 | pivot: PIVOT_CENTER 301 | outline { 302 | x: 0.0 303 | y: 0.0 304 | z: 0.0 305 | w: 1.0 306 | } 307 | shadow { 308 | x: 1.0 309 | y: 1.0 310 | z: 1.0 311 | w: 1.0 312 | } 313 | adjust_mode: ADJUST_MODE_FIT 314 | line_break: true 315 | parent: "text/box" 316 | layer: "" 317 | inherit_alpha: true 318 | alpha: 1.0 319 | outline_alpha: 1.0 320 | shadow_alpha: 1.0 321 | overridden_fields: 4 322 | overridden_fields: 8 323 | overridden_fields: 10 324 | template_node_child: true 325 | text_leading: 1.0 326 | text_tracking: 0.0 327 | } 328 | nodes { 329 | position { 330 | x: 150.0 331 | y: 550.0 332 | z: 0.0 333 | w: 1.0 334 | } 335 | rotation { 336 | x: 0.0 337 | y: 0.0 338 | z: 0.0 339 | w: 1.0 340 | } 341 | scale { 342 | x: 1.0 343 | y: 1.0 344 | z: 1.0 345 | w: 1.0 346 | } 347 | size { 348 | x: 200.0 349 | y: 100.0 350 | z: 0.0 351 | w: 1.0 352 | } 353 | color { 354 | x: 1.0 355 | y: 1.0 356 | z: 1.0 357 | w: 1.0 358 | } 359 | type: TYPE_TEMPLATE 360 | id: "back" 361 | layer: "" 362 | inherit_alpha: true 363 | alpha: 1.0 364 | template: "/common/button.gui" 365 | template_node_child: false 366 | } 367 | nodes { 368 | position { 369 | x: 0.0 370 | y: 0.0 371 | z: 0.0 372 | w: 1.0 373 | } 374 | rotation { 375 | x: 0.0 376 | y: 0.0 377 | z: 0.0 378 | w: 1.0 379 | } 380 | scale { 381 | x: 1.0 382 | y: 1.0 383 | z: 1.0 384 | w: 1.0 385 | } 386 | size { 387 | x: 200.0 388 | y: 60.0 389 | z: 0.0 390 | w: 1.0 391 | } 392 | color { 393 | x: 1.0 394 | y: 1.0 395 | z: 1.0 396 | w: 1.0 397 | } 398 | type: TYPE_BOX 399 | blend_mode: BLEND_MODE_ALPHA 400 | texture: "buttons/button" 401 | id: "back/box" 402 | xanchor: XANCHOR_NONE 403 | yanchor: YANCHOR_NONE 404 | pivot: PIVOT_CENTER 405 | adjust_mode: ADJUST_MODE_FIT 406 | parent: "back" 407 | layer: "" 408 | inherit_alpha: true 409 | slice9 { 410 | x: 20.0 411 | y: 20.0 412 | z: 40.0 413 | w: 40.0 414 | } 415 | clipping_mode: CLIPPING_MODE_NONE 416 | clipping_visible: true 417 | clipping_inverted: false 418 | alpha: 1.0 419 | overridden_fields: 4 420 | template_node_child: true 421 | size_mode: SIZE_MODE_MANUAL 422 | } 423 | nodes { 424 | position { 425 | x: 0.0 426 | y: 0.0 427 | z: 0.0 428 | w: 1.0 429 | } 430 | rotation { 431 | x: 0.0 432 | y: 0.0 433 | z: 0.0 434 | w: 1.0 435 | } 436 | scale { 437 | x: 1.0 438 | y: 1.0 439 | z: 1.0 440 | w: 1.0 441 | } 442 | size { 443 | x: 200.0 444 | y: 60.0 445 | z: 0.0 446 | w: 1.0 447 | } 448 | color { 449 | x: 0.0 450 | y: 0.0 451 | z: 0.0 452 | w: 1.0 453 | } 454 | type: TYPE_BOX 455 | blend_mode: BLEND_MODE_ALPHA 456 | texture: "buttons/button" 457 | id: "back/pressed" 458 | xanchor: XANCHOR_NONE 459 | yanchor: YANCHOR_NONE 460 | pivot: PIVOT_CENTER 461 | adjust_mode: ADJUST_MODE_FIT 462 | parent: "back/box" 463 | layer: "" 464 | inherit_alpha: true 465 | slice9 { 466 | x: 20.0 467 | y: 20.0 468 | z: 40.0 469 | w: 40.0 470 | } 471 | clipping_mode: CLIPPING_MODE_NONE 472 | clipping_visible: true 473 | clipping_inverted: false 474 | alpha: 0.0 475 | overridden_fields: 4 476 | template_node_child: true 477 | size_mode: SIZE_MODE_MANUAL 478 | } 479 | nodes { 480 | position { 481 | x: 0.0 482 | y: 0.0 483 | z: 0.0 484 | w: 1.0 485 | } 486 | rotation { 487 | x: 0.0 488 | y: 0.0 489 | z: 0.0 490 | w: 1.0 491 | } 492 | scale { 493 | x: 1.0 494 | y: 1.0 495 | z: 1.0 496 | w: 1.0 497 | } 498 | size { 499 | x: 200.0 500 | y: 100.0 501 | z: 0.0 502 | w: 1.0 503 | } 504 | color { 505 | x: 1.0 506 | y: 1.0 507 | z: 1.0 508 | w: 1.0 509 | } 510 | type: TYPE_TEXT 511 | blend_mode: BLEND_MODE_ALPHA 512 | text: "Back" 513 | font: "font" 514 | id: "back/text" 515 | xanchor: XANCHOR_NONE 516 | yanchor: YANCHOR_NONE 517 | pivot: PIVOT_CENTER 518 | outline { 519 | x: 0.0 520 | y: 0.0 521 | z: 0.0 522 | w: 1.0 523 | } 524 | shadow { 525 | x: 1.0 526 | y: 1.0 527 | z: 1.0 528 | w: 1.0 529 | } 530 | adjust_mode: ADJUST_MODE_FIT 531 | line_break: false 532 | parent: "back" 533 | layer: "" 534 | inherit_alpha: true 535 | alpha: 1.0 536 | outline_alpha: 1.0 537 | shadow_alpha: 1.0 538 | overridden_fields: 8 539 | template_node_child: true 540 | text_leading: 1.0 541 | text_tracking: 0.0 542 | } 543 | nodes { 544 | position { 545 | x: 400.0 546 | y: 300.0 547 | z: 0.0 548 | w: 1.0 549 | } 550 | rotation { 551 | x: 0.0 552 | y: 0.0 553 | z: 0.0 554 | w: 1.0 555 | } 556 | scale { 557 | x: 1.0 558 | y: 1.0 559 | z: 1.0 560 | w: 1.0 561 | } 562 | size { 563 | x: 800.0 564 | y: 600.0 565 | z: 0.0 566 | w: 1.0 567 | } 568 | color { 569 | x: 0.0 570 | y: 0.0 571 | z: 0.0 572 | w: 1.0 573 | } 574 | type: TYPE_BOX 575 | blend_mode: BLEND_MODE_ALPHA 576 | texture: "" 577 | id: "fader" 578 | xanchor: XANCHOR_NONE 579 | yanchor: YANCHOR_NONE 580 | pivot: PIVOT_CENTER 581 | adjust_mode: ADJUST_MODE_FIT 582 | layer: "" 583 | inherit_alpha: true 584 | slice9 { 585 | x: 0.0 586 | y: 0.0 587 | z: 0.0 588 | w: 0.0 589 | } 590 | clipping_mode: CLIPPING_MODE_NONE 591 | clipping_visible: true 592 | clipping_inverted: false 593 | alpha: 0.0 594 | template_node_child: false 595 | size_mode: SIZE_MODE_MANUAL 596 | } 597 | material: "/builtins/materials/gui.material" 598 | adjust_reference: ADJUST_REFERENCE_PARENT 599 | max_nodes: 512 600 | -------------------------------------------------------------------------------- /scenes/main_menu/main_menu.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/main_menu/main_menu.gui_script" 2 | fonts { 3 | name: "menu" 4 | font: "/resources/menu.font" 5 | } 6 | textures { 7 | name: "objects" 8 | texture: "/resources/objects.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 1.0 15 | } 16 | nodes { 17 | position { 18 | x: 400.0 19 | y: 450.0 20 | z: 0.0 21 | w: 1.0 22 | } 23 | rotation { 24 | x: 0.0 25 | y: 0.0 26 | z: 0.0 27 | w: 1.0 28 | } 29 | scale { 30 | x: 1.0 31 | y: 1.0 32 | z: 1.0 33 | w: 1.0 34 | } 35 | size { 36 | x: 200.0 37 | y: 100.0 38 | z: 0.0 39 | w: 1.0 40 | } 41 | color { 42 | x: 1.0 43 | y: 1.0 44 | z: 1.0 45 | w: 1.0 46 | } 47 | type: TYPE_TEMPLATE 48 | id: "label" 49 | layer: "layer1" 50 | inherit_alpha: true 51 | alpha: 1.0 52 | template: "/common/label.gui" 53 | template_node_child: false 54 | } 55 | nodes { 56 | position { 57 | x: 0.0 58 | y: 0.0 59 | z: 0.0 60 | w: 1.0 61 | } 62 | rotation { 63 | x: 0.0 64 | y: 0.0 65 | z: 0.0 66 | w: 1.0 67 | } 68 | scale { 69 | x: 1.0 70 | y: 1.0 71 | z: 1.0 72 | w: 1.0 73 | } 74 | size { 75 | x: 700.0 76 | y: 100.0 77 | z: 0.0 78 | w: 1.0 79 | } 80 | color { 81 | x: 1.0 82 | y: 1.0 83 | z: 1.0 84 | w: 1.0 85 | } 86 | type: TYPE_BOX 87 | blend_mode: BLEND_MODE_ALPHA 88 | texture: "objects/textbox" 89 | id: "label/box" 90 | xanchor: XANCHOR_NONE 91 | yanchor: YANCHOR_NONE 92 | pivot: PIVOT_CENTER 93 | adjust_mode: ADJUST_MODE_FIT 94 | parent: "label" 95 | layer: "" 96 | inherit_alpha: true 97 | slice9 { 98 | x: 8.0 99 | y: 8.0 100 | z: 8.0 101 | w: 8.0 102 | } 103 | clipping_mode: CLIPPING_MODE_NONE 104 | clipping_visible: true 105 | clipping_inverted: false 106 | alpha: 1.0 107 | overridden_fields: 4 108 | template_node_child: true 109 | size_mode: SIZE_MODE_MANUAL 110 | } 111 | nodes { 112 | position { 113 | x: 0.0 114 | y: 0.0 115 | z: 0.0 116 | w: 1.0 117 | } 118 | rotation { 119 | x: 0.0 120 | y: 0.0 121 | z: 0.0 122 | w: 1.0 123 | } 124 | scale { 125 | x: 1.0 126 | y: 1.0 127 | z: 1.0 128 | w: 1.0 129 | } 130 | size { 131 | x: 650.0 132 | y: 100.0 133 | z: 0.0 134 | w: 1.0 135 | } 136 | color { 137 | x: 1.0 138 | y: 1.0 139 | z: 1.0 140 | w: 1.0 141 | } 142 | type: TYPE_TEXT 143 | blend_mode: BLEND_MODE_ALPHA 144 | text: "This is the first scene, it is defined by \"first_scene\" field in the routing table. You can also pass input to it." 145 | font: "text" 146 | id: "label/text" 147 | xanchor: XANCHOR_NONE 148 | yanchor: YANCHOR_NONE 149 | pivot: PIVOT_CENTER 150 | outline { 151 | x: 0.0 152 | y: 0.0 153 | z: 0.0 154 | w: 1.0 155 | } 156 | shadow { 157 | x: 1.0 158 | y: 1.0 159 | z: 1.0 160 | w: 1.0 161 | } 162 | adjust_mode: ADJUST_MODE_FIT 163 | line_break: true 164 | parent: "label/box" 165 | layer: "" 166 | inherit_alpha: true 167 | alpha: 1.0 168 | outline_alpha: 1.0 169 | shadow_alpha: 1.0 170 | overridden_fields: 4 171 | overridden_fields: 8 172 | overridden_fields: 10 173 | template_node_child: true 174 | text_leading: 1.0 175 | text_tracking: 0.0 176 | } 177 | nodes { 178 | position { 179 | x: 400.0 180 | y: 300.0 181 | z: 0.0 182 | w: 1.0 183 | } 184 | rotation { 185 | x: 0.0 186 | y: 0.0 187 | z: 0.0 188 | w: 1.0 189 | } 190 | scale { 191 | x: 1.0 192 | y: 1.0 193 | z: 1.0 194 | w: 1.0 195 | } 196 | size { 197 | x: 200.0 198 | y: 100.0 199 | z: 0.0 200 | w: 1.0 201 | } 202 | color { 203 | x: 1.0 204 | y: 1.0 205 | z: 1.0 206 | w: 1.0 207 | } 208 | type: TYPE_TEMPLATE 209 | id: "start" 210 | layer: "layer1" 211 | inherit_alpha: true 212 | alpha: 1.0 213 | template: "/common/button.gui" 214 | template_node_child: false 215 | } 216 | nodes { 217 | position { 218 | x: 0.0 219 | y: 0.0 220 | z: 0.0 221 | w: 1.0 222 | } 223 | rotation { 224 | x: 0.0 225 | y: 0.0 226 | z: 0.0 227 | w: 1.0 228 | } 229 | scale { 230 | x: 1.0 231 | y: 1.0 232 | z: 1.0 233 | w: 1.0 234 | } 235 | size { 236 | x: 200.0 237 | y: 100.0 238 | z: 0.0 239 | w: 1.0 240 | } 241 | color { 242 | x: 1.0 243 | y: 1.0 244 | z: 1.0 245 | w: 1.0 246 | } 247 | type: TYPE_BOX 248 | blend_mode: BLEND_MODE_ALPHA 249 | texture: "buttons/button" 250 | id: "start/box" 251 | xanchor: XANCHOR_NONE 252 | yanchor: YANCHOR_NONE 253 | pivot: PIVOT_CENTER 254 | adjust_mode: ADJUST_MODE_FIT 255 | parent: "start" 256 | layer: "" 257 | inherit_alpha: true 258 | slice9 { 259 | x: 20.0 260 | y: 20.0 261 | z: 40.0 262 | w: 40.0 263 | } 264 | clipping_mode: CLIPPING_MODE_NONE 265 | clipping_visible: true 266 | clipping_inverted: false 267 | alpha: 1.0 268 | overridden_fields: 4 269 | template_node_child: true 270 | size_mode: SIZE_MODE_MANUAL 271 | } 272 | nodes { 273 | position { 274 | x: 0.0 275 | y: 0.0 276 | z: 0.0 277 | w: 1.0 278 | } 279 | rotation { 280 | x: 0.0 281 | y: 0.0 282 | z: 0.0 283 | w: 1.0 284 | } 285 | scale { 286 | x: 1.0 287 | y: 1.0 288 | z: 1.0 289 | w: 1.0 290 | } 291 | size { 292 | x: 200.0 293 | y: 100.0 294 | z: 0.0 295 | w: 1.0 296 | } 297 | color { 298 | x: 0.0 299 | y: 0.0 300 | z: 0.0 301 | w: 1.0 302 | } 303 | type: TYPE_BOX 304 | blend_mode: BLEND_MODE_ALPHA 305 | texture: "buttons/button" 306 | id: "start/pressed" 307 | xanchor: XANCHOR_NONE 308 | yanchor: YANCHOR_NONE 309 | pivot: PIVOT_CENTER 310 | adjust_mode: ADJUST_MODE_FIT 311 | parent: "start/box" 312 | layer: "" 313 | inherit_alpha: true 314 | slice9 { 315 | x: 20.0 316 | y: 20.0 317 | z: 40.0 318 | w: 40.0 319 | } 320 | clipping_mode: CLIPPING_MODE_NONE 321 | clipping_visible: true 322 | clipping_inverted: false 323 | alpha: 0.0 324 | overridden_fields: 4 325 | template_node_child: true 326 | size_mode: SIZE_MODE_MANUAL 327 | } 328 | nodes { 329 | position { 330 | x: 0.0 331 | y: 0.0 332 | z: 0.0 333 | w: 1.0 334 | } 335 | rotation { 336 | x: 0.0 337 | y: 0.0 338 | z: 0.0 339 | w: 1.0 340 | } 341 | scale { 342 | x: 1.0 343 | y: 1.0 344 | z: 1.0 345 | w: 1.0 346 | } 347 | size { 348 | x: 200.0 349 | y: 100.0 350 | z: 0.0 351 | w: 1.0 352 | } 353 | color { 354 | x: 1.0 355 | y: 1.0 356 | z: 1.0 357 | w: 1.0 358 | } 359 | type: TYPE_TEXT 360 | blend_mode: BLEND_MODE_ALPHA 361 | text: "Start" 362 | font: "font" 363 | id: "start/text" 364 | xanchor: XANCHOR_NONE 365 | yanchor: YANCHOR_NONE 366 | pivot: PIVOT_CENTER 367 | outline { 368 | x: 0.0 369 | y: 0.0 370 | z: 0.0 371 | w: 1.0 372 | } 373 | shadow { 374 | x: 1.0 375 | y: 1.0 376 | z: 1.0 377 | w: 1.0 378 | } 379 | adjust_mode: ADJUST_MODE_FIT 380 | line_break: false 381 | parent: "start" 382 | layer: "" 383 | inherit_alpha: true 384 | alpha: 1.0 385 | outline_alpha: 1.0 386 | shadow_alpha: 1.0 387 | overridden_fields: 8 388 | template_node_child: true 389 | text_leading: 1.0 390 | text_tracking: 0.0 391 | } 392 | nodes { 393 | position { 394 | x: 650.0 395 | y: 550.0 396 | z: 0.0 397 | w: 1.0 398 | } 399 | rotation { 400 | x: 0.0 401 | y: 0.0 402 | z: 0.0 403 | w: 1.0 404 | } 405 | scale { 406 | x: 1.0 407 | y: 1.0 408 | z: 1.0 409 | w: 1.0 410 | } 411 | size { 412 | x: 200.0 413 | y: 100.0 414 | z: 0.0 415 | w: 1.0 416 | } 417 | color { 418 | x: 1.0 419 | y: 1.0 420 | z: 1.0 421 | w: 1.0 422 | } 423 | type: TYPE_TEMPLATE 424 | id: "settings" 425 | layer: "layer1" 426 | inherit_alpha: true 427 | alpha: 1.0 428 | template: "/common/button.gui" 429 | template_node_child: false 430 | } 431 | nodes { 432 | position { 433 | x: 0.0 434 | y: 0.0 435 | z: 0.0 436 | w: 1.0 437 | } 438 | rotation { 439 | x: 0.0 440 | y: 0.0 441 | z: 0.0 442 | w: 1.0 443 | } 444 | scale { 445 | x: 1.0 446 | y: 1.0 447 | z: 1.0 448 | w: 1.0 449 | } 450 | size { 451 | x: 200.0 452 | y: 60.0 453 | z: 0.0 454 | w: 1.0 455 | } 456 | color { 457 | x: 1.0 458 | y: 1.0 459 | z: 1.0 460 | w: 1.0 461 | } 462 | type: TYPE_BOX 463 | blend_mode: BLEND_MODE_ALPHA 464 | texture: "buttons/button" 465 | id: "settings/box" 466 | xanchor: XANCHOR_NONE 467 | yanchor: YANCHOR_NONE 468 | pivot: PIVOT_CENTER 469 | adjust_mode: ADJUST_MODE_FIT 470 | parent: "settings" 471 | layer: "" 472 | inherit_alpha: true 473 | slice9 { 474 | x: 20.0 475 | y: 20.0 476 | z: 40.0 477 | w: 40.0 478 | } 479 | clipping_mode: CLIPPING_MODE_NONE 480 | clipping_visible: true 481 | clipping_inverted: false 482 | alpha: 1.0 483 | overridden_fields: 4 484 | template_node_child: true 485 | size_mode: SIZE_MODE_MANUAL 486 | } 487 | nodes { 488 | position { 489 | x: 0.0 490 | y: 0.0 491 | z: 0.0 492 | w: 1.0 493 | } 494 | rotation { 495 | x: 0.0 496 | y: 0.0 497 | z: 0.0 498 | w: 1.0 499 | } 500 | scale { 501 | x: 1.0 502 | y: 1.0 503 | z: 1.0 504 | w: 1.0 505 | } 506 | size { 507 | x: 200.0 508 | y: 60.0 509 | z: 0.0 510 | w: 1.0 511 | } 512 | color { 513 | x: 0.0 514 | y: 0.0 515 | z: 0.0 516 | w: 1.0 517 | } 518 | type: TYPE_BOX 519 | blend_mode: BLEND_MODE_ALPHA 520 | texture: "buttons/button" 521 | id: "settings/pressed" 522 | xanchor: XANCHOR_NONE 523 | yanchor: YANCHOR_NONE 524 | pivot: PIVOT_CENTER 525 | adjust_mode: ADJUST_MODE_FIT 526 | parent: "settings/box" 527 | layer: "" 528 | inherit_alpha: true 529 | slice9 { 530 | x: 20.0 531 | y: 20.0 532 | z: 40.0 533 | w: 40.0 534 | } 535 | clipping_mode: CLIPPING_MODE_NONE 536 | clipping_visible: true 537 | clipping_inverted: false 538 | alpha: 0.0 539 | overridden_fields: 4 540 | template_node_child: true 541 | size_mode: SIZE_MODE_MANUAL 542 | } 543 | nodes { 544 | position { 545 | x: 0.0 546 | y: 0.0 547 | z: 0.0 548 | w: 1.0 549 | } 550 | rotation { 551 | x: 0.0 552 | y: 0.0 553 | z: 0.0 554 | w: 1.0 555 | } 556 | scale { 557 | x: 1.0 558 | y: 1.0 559 | z: 1.0 560 | w: 1.0 561 | } 562 | size { 563 | x: 200.0 564 | y: 100.0 565 | z: 0.0 566 | w: 1.0 567 | } 568 | color { 569 | x: 1.0 570 | y: 1.0 571 | z: 1.0 572 | w: 1.0 573 | } 574 | type: TYPE_TEXT 575 | blend_mode: BLEND_MODE_ALPHA 576 | text: "Settings" 577 | font: "font" 578 | id: "settings/text" 579 | xanchor: XANCHOR_NONE 580 | yanchor: YANCHOR_NONE 581 | pivot: PIVOT_CENTER 582 | outline { 583 | x: 0.0 584 | y: 0.0 585 | z: 0.0 586 | w: 1.0 587 | } 588 | shadow { 589 | x: 1.0 590 | y: 1.0 591 | z: 1.0 592 | w: 1.0 593 | } 594 | adjust_mode: ADJUST_MODE_FIT 595 | line_break: false 596 | parent: "settings" 597 | layer: "" 598 | inherit_alpha: true 599 | alpha: 1.0 600 | outline_alpha: 1.0 601 | shadow_alpha: 1.0 602 | overridden_fields: 8 603 | template_node_child: true 604 | text_leading: 1.0 605 | text_tracking: 0.0 606 | } 607 | nodes { 608 | position { 609 | x: 400.0 610 | y: 300.0 611 | z: 0.0 612 | w: 1.0 613 | } 614 | rotation { 615 | x: 0.0 616 | y: 0.0 617 | z: 0.0 618 | w: 1.0 619 | } 620 | scale { 621 | x: 1.0 622 | y: 1.0 623 | z: 1.0 624 | w: 1.0 625 | } 626 | size { 627 | x: 800.0 628 | y: 600.0 629 | z: 0.0 630 | w: 1.0 631 | } 632 | color { 633 | x: 0.0 634 | y: 0.0 635 | z: 0.0 636 | w: 1.0 637 | } 638 | type: TYPE_BOX 639 | blend_mode: BLEND_MODE_ALPHA 640 | texture: "" 641 | id: "fader" 642 | xanchor: XANCHOR_NONE 643 | yanchor: YANCHOR_NONE 644 | pivot: PIVOT_CENTER 645 | adjust_mode: ADJUST_MODE_FIT 646 | layer: "layer2" 647 | inherit_alpha: true 648 | slice9 { 649 | x: 0.0 650 | y: 0.0 651 | z: 0.0 652 | w: 0.0 653 | } 654 | clipping_mode: CLIPPING_MODE_NONE 655 | clipping_visible: true 656 | clipping_inverted: false 657 | alpha: 0.0 658 | template_node_child: false 659 | size_mode: SIZE_MODE_MANUAL 660 | } 661 | layers { 662 | name: "layer1" 663 | } 664 | layers { 665 | name: "layer2" 666 | } 667 | material: "/builtins/materials/gui.material" 668 | adjust_reference: ADJUST_REFERENCE_PARENT 669 | max_nodes: 512 670 | -------------------------------------------------------------------------------- /wh_router/router.lua: -------------------------------------------------------------------------------- 1 | -- Defold Router: Helper functions 2 | -- 3 | -- © 2016 Roman "Megus" Petrov, Wise Hedgehog Studio. 4 | -- https://wisehedgehog.studio, https://megus.org 5 | 6 | --- Router module 7 | -- @module M 8 | local M = {} 9 | 10 | --- Router message hashes 11 | M.messages = { 12 | scene_input = hash("wh_router_scene_input"), -- scene input message 13 | scene_popped = hash("wh_router_scene_popped"), -- scene popped message 14 | transition = hash("wh_router_transition"), -- scene transition message 15 | loader_start = hash("wh_router_start_loader"), -- start loader message 16 | loader_stop = hash("wh_router_stop_loader"), -- stop loader message 17 | } 18 | 19 | M.transition_types = { 20 | t_none = 0, 21 | t_in = 1, 22 | t_out = 2, 23 | t_back_in = 3, 24 | t_back_out = 4 25 | } 26 | 27 | ---------------------------------------------------------------------------------------------------- 28 | -- Private interface 29 | ---------------------------------------------------------------------------------------------------- 30 | 31 | -- Router messages 32 | local messages = { 33 | push = hash("wh_router_scene_push"), 34 | push_modal = hash("wh_router_scene_push_modal"), 35 | popup = hash("wh_router_scene_popup"), 36 | close = hash("wh_router_scene_close"), 37 | finished_transition = hash("wh_router_finished_transition"), 38 | stopped_loader = hash("wh_router_stopped_loader") 39 | } 40 | 41 | local msg_proxy_loaded = hash("proxy_loaded") 42 | 43 | -- Scene display methods 44 | local methods = { 45 | switch = 1, 46 | push = 2, 47 | push_modal = 3, 48 | popup = 4, 49 | } 50 | 51 | -- Private storage: routing tables and router objects 52 | local router_objects = {} 53 | 54 | -- Returns scene controller URL string 55 | local function scene_controller_url(ro, name) 56 | return name .. ":/" .. ro.scene_controller_path 57 | end 58 | 59 | -- Get scene info 60 | local function scene_info(ro, scene_name) 61 | local info = { -- Default scene info 62 | sync_load = false, 63 | show_loading = false, 64 | has_transitions = false 65 | } 66 | 67 | if ro.scenes.info and ro.scenes.info[scene_name] then 68 | for key, value in pairs(ro.scenes.info[scene_name]) do 69 | info[key] = value 70 | end 71 | end 72 | 73 | return info 74 | end 75 | 76 | -- Returns top scene at the stack 77 | local function top_scene(ro) 78 | return #ro.stack ~= 0 and ro.stack[#ro.stack] or nil 79 | end 80 | 81 | -- Get the next scene from the routing state machine 82 | local function get_next_scene(ro, current, output) 83 | local route = current and ro.scenes.routing[current] or ro.scenes.first_scene 84 | assert(route, current and "Can't get the scene next to [" .. current .. "]" or "first_scene is not set") 85 | if type(route) == "string" then 86 | return route 87 | elseif type(route) == "table" then 88 | return route[1], route[2] 89 | elseif type(route) == "function" then 90 | return route(output) 91 | else 92 | assert(false, "Invalid routing table entry format for scene [" .. current .. "]") 93 | end 94 | end 95 | 96 | -- Unload a scene 97 | local function unload_scene(scene, should_disable) 98 | should_disable = should_disable == nil and true or false 99 | local url = "#" .. scene.name 100 | if should_disable then 101 | msg.post(url, "disable") 102 | end 103 | msg.post(url, "final") 104 | msg.post(url, "unload") 105 | end 106 | 107 | local function scene_transition(ro, scene, t_type) 108 | if t_type == M.transition_types.t_none then return end 109 | local info = scene_info(ro, scene.name) 110 | if info.has_transitions then 111 | msg.post(scene_controller_url(ro, scene.name), M.messages.transition, {router = ro.router_url, t_type = t_type}) 112 | ro.wait_for = messages.finished_transition 113 | coroutine.yield() 114 | end 115 | end 116 | 117 | -- Initialize scene 118 | local function init_scene(ro, scene, message, did_pop, t_type) 119 | message.router = ro.router_url 120 | message.state = ro.states[scene.name] 121 | msg.post(scene_controller_url(ro, scene.name), did_pop and M.messages.scene_popped or M.messages.scene_input, message) 122 | scene_transition(ro, scene, t_type) 123 | end 124 | 125 | -- Load new scene 126 | local function load_scene(ro, scene, previous, message, did_pop) 127 | table.insert(ro.stack, scene) 128 | local info = scene_info(ro, scene.name) 129 | msg.post("#" .. scene.name, info.sync_load and "load" or "async_load") 130 | 131 | -- Enable loading indicator, if needed 132 | if info.show_loading and ro.loader_url then 133 | if previous then 134 | msg.post("#" .. previous.name, "disable") 135 | end 136 | msg.post(ro.loader_url, "enable") 137 | msg.post(ro.loader_url, M.messages.loader_start, {router = ro.router_url}) 138 | end 139 | 140 | -- Wait for the scene to load 141 | ro.wait_for = msg_proxy_loaded 142 | coroutine.yield() 143 | 144 | -- Unload previous scene 145 | if previous then 146 | unload_scene(previous, info.show_loading and ro.loader_url) 147 | end 148 | 149 | -- Disable loading indicator, if needed 150 | if info.show_loading and ro.loader_url then 151 | msg.post(ro.loader_url, M.messages.loader_stop, {router = ro.router_url}) 152 | ro.wait_for = messages.stopped_loader 153 | coroutine.yield() 154 | msg.post(ro.loader_url, "disable") 155 | end 156 | 157 | msg.post("#" .. scene.name, "enable") 158 | init_scene(ro, scene, message, did_pop, did_pop and M.transition_types.t_back_in or M.transition_types.t_in) 159 | end 160 | 161 | local function switch_scene(ro, current_output) 162 | local current = top_scene(ro) 163 | if current then table.remove(ro.stack, #ro.stack) end 164 | local next_name, input = get_next_scene(ro, current and current.name or nil, current_output) 165 | local scene = {name = next_name, method = methods.switch} 166 | load_scene(ro, scene, current, {input = input}, false) 167 | end 168 | 169 | local function push_scene(ro, scene_name, input, state) 170 | local co = coroutine.create(function() 171 | local current = top_scene(ro) 172 | ro.states[scene_name] = state 173 | scene_transition(ro, current, M.transition_types.t_out) 174 | local scene = {name = scene_name, method = methods.push} 175 | load_scene(ro, scene, current, {input = input}, false) 176 | ro.co = nil 177 | end) 178 | ro.co = co 179 | coroutine.resume(co) 180 | end 181 | 182 | local function push_modal_scene(ro, scene_name, input) 183 | local co = coroutine.create(function() 184 | local current = top_scene(ro) 185 | scene_transition(ro, current, M.transition_types.t_out) 186 | msg.post("#" .. current.name, "disable") 187 | local scene = {name = scene_name, method = methods.push_modal} 188 | load_scene(ro, scene, nil, {input = input}, false) 189 | ro.co = nil 190 | end) 191 | ro.co = co 192 | coroutine.resume(co) 193 | end 194 | 195 | local function popup_scene(ro, scene_name, input) 196 | local co = coroutine.create(function() 197 | local current = top_scene(ro) 198 | local scene = {name = scene_name, method = methods.popup} 199 | msg.post(scene_controller_url(ro, current.name), "release_input_focus") 200 | load_scene(ro, scene, nil, {input = input}, false) 201 | ro.co = nil 202 | end) 203 | ro.co = co 204 | coroutine.resume(co) 205 | end 206 | 207 | local function close_scene(ro, output, state) 208 | local co = coroutine.create(function() 209 | -- Save state 210 | local scene = top_scene(ro) 211 | ro.states[scene.name] = state 212 | scene_transition(ro, scene, 213 | scene.method == methods.switch and M.transition_types.t_out or M.transition_types.t_back_out) 214 | 215 | -- Now load next scene 216 | if scene.method == methods.switch then 217 | switch_scene(ro, output) 218 | elseif scene.method == methods.push then 219 | table.remove(ro.stack, #ro.stack) 220 | local previous = top_scene(ro) 221 | table.remove(ro.stack, #ro.stack) 222 | load_scene(ro, previous, scene, {output = output, name = scene.name}, true) 223 | elseif scene.method == methods.push_modal then 224 | table.remove(ro.stack, #ro.stack) 225 | unload_scene(scene) 226 | local previous = top_scene(ro) 227 | msg.post("#" .. previous.name, "enable") 228 | init_scene(ro, previous, {output = output, name = scene.name}, true, M.transition_types.t_back_in) 229 | elseif scene.method == methods.popup then 230 | table.remove(ro.stack, #ro.stack) 231 | unload_scene(scene) 232 | local previous = top_scene(ro) 233 | init_scene(ro, previous, {output = output, name = scene.name}, true, M.transition_types.t_none) 234 | msg.post(scene_controller_url(ro, previous.name), "acquire_input_focus") 235 | end 236 | ro.co = nil 237 | end) 238 | coroutine.resume(co) 239 | ro.co = co 240 | end 241 | 242 | 243 | ---------------------------------------------------------------------------------------------------- 244 | -- Public interface 245 | ---------------------------------------------------------------------------------------------------- 246 | 247 | --- Create new Router object 248 | -- @treturn string Router ID 249 | -- @tparam table Scene table 250 | -- @tparam string router_url Script with the router URL string 251 | -- @tparam string scene_controller_path Path to scene controller scripts 252 | -- @tparam string loader_url URL of a loader component (optional, only if you use loaders) 253 | function M.new(scenes, router_url, scene_controller_path, loader_url) 254 | assert(router_url, "router_url can't be nil") 255 | assert(scene_controller_path, "scene_controller_path can't be nil") 256 | 257 | -- Init scene stack and scene state storage 258 | local ro = { 259 | stack = {}, 260 | states = {}, 261 | scenes = scenes, 262 | router_url = router_url, 263 | loader_url = loader_url, 264 | scene_controller_path = scene_controller_path 265 | } 266 | router_objects[router_url] = ro 267 | 268 | -- Load the first scene 269 | if loader_url then 270 | msg.post(loader_url, "disable") 271 | end 272 | ro.co = coroutine.create(function() switch_scene(ro) end) 273 | coroutine.resume(ro.co) 274 | return router_url 275 | end 276 | 277 | --- Router message handler 278 | -- Call this handler from your root scene on_message function 279 | -- @tparam string router_id Router ID 280 | -- @tparam hash message_id Message ID 281 | -- @tparam table message Message table 282 | -- @param sender Message sender 283 | function M.on_message(router_id, message_id, message, sender) 284 | local ro = router_objects[router_id] 285 | assert(ro, "Invalid router_id") 286 | 287 | if message_id == ro.wait_for then 288 | ro.wait_for = nil 289 | coroutine.resume(ro.co, message, sender) 290 | elseif message_id == messages.push then 291 | push_scene(ro, message.scene_name, message.input, message.state) 292 | elseif message_id == messages.push_modal then 293 | push_modal_scene(ro, message.scene_name, message.input) 294 | elseif message_id == messages.popup then 295 | popup_scene(ro, message.scene_name, message.input) 296 | elseif message_id == messages.close then 297 | close_scene(ro, message.output, message.state) 298 | end 299 | end 300 | 301 | --- Push the new scene to scene stack 302 | -- The current scene will be unloaded and its state will be saved. 303 | -- When the pushed scene is closed, the current scene will receive "scene_popped" 304 | -- message with the output of the pushed scene and the state of the current scene 305 | -- so it can restore its state. "scene_input" message will not be sent. 306 | -- @tparam string router_id Router ID 307 | -- @tparam string scene_name Name of the new scene 308 | -- @tparam table input Input for the new scene (optional) 309 | -- @tparam table state State of the current scene (optional) 310 | function M.push(router_id, scene_name, input, state) 311 | local ro = router_objects[router_id] 312 | assert(ro, "Invalid router_id") 313 | msg.post(ro.router_url, messages.push, {scene_name = scene_name, input = input, state = state}) 314 | end 315 | 316 | --- Push the new modal scene 317 | -- The current scene will not be unloaded but will be disabled 318 | -- (it will disappear from the screen). When the pushed scene is closed, 319 | -- the current scene will receive "scene_popped" message with the output of 320 | -- the pushed scene. State saving is not required for this method. 321 | -- @tparam string router_id Router ID 322 | -- @tparam string scene_name Name of the new scene 323 | -- @tparam table input Input for the new scene (optional) 324 | function M.push_modal(router_id, scene_name, input) 325 | local ro = router_objects[router_id] 326 | assert(ro, "Invalid router_id") 327 | msg.post(ro.router_url, messages.push_modal, {scene_name = scene_name, input = input}) 328 | end 329 | 330 | --- Show popup scene 331 | -- The current scene will not be unloaded but the input will be disabled. 332 | -- When the pushed scene is closed, the current scene will receive "scene_popped" 333 | -- message with the output of the pushed scene. The input focus will be acquired again. 334 | -- State saving is not required for this method 335 | -- @tparam string router_id Router ID 336 | -- @tparam string scene_name Name of the new scene 337 | -- @tparam table input Input for the new scene (optional) 338 | function M.popup(router_id, scene_name, input) 339 | local ro = router_objects[router_id] 340 | assert(ro, "Invalid router_id") 341 | msg.post(ro.router_url, messages.popup, {scene_name = scene_name, input = input}) 342 | end 343 | 344 | --- Close the current scene 345 | -- The current scene will be unloaded. The output will be used depending on how this 346 | -- scene was displayed. For push, push_modal and popup methods this output will be 347 | -- passed directly to the previous scene. If this scene was displayed according to 348 | -- routing rules, the output will be passed to corresponding routing function. 349 | -- @tparam string router_id Router object 350 | -- @tparam table output The output of the current scene (optional) 351 | -- @tparam table state State of the scene (optional) 352 | function M.close(router_id, output, state) 353 | local ro = router_objects[router_id] 354 | assert(ro, "Invalid router_id") 355 | msg.post(ro.router_url, messages.close, {output = output, state = state}) 356 | end 357 | 358 | function M.finished_transition(router_id) 359 | local ro = router_objects[router_id] 360 | assert(ro, "Invalid router_id") 361 | msg.post(ro.router_url, messages.finished_transition) 362 | end 363 | 364 | function M.stopped_loader(router_id) 365 | local ro = router_objects[router_id] 366 | assert(ro, "Invalid router_id") 367 | msg.post(ro.router_url, messages.stopped_loader) 368 | end 369 | 370 | return M 371 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # whDefRouter 2 | 3 | A powerful screen manager for games built with [Defold Game Engine](https://www.defold.com). 4 | 5 | Defold doesn't provide standard functions to implement complex navigation between game screens. The provided examples only show the general idea of switching screens with collection proxies, but a game usually has more than just two screens. So I developed a reusable navigation solution. I took the inspiration from ```UINavigationContoller``` in iOS and React/Redux. My library was the first of its kind, but now other solutions also exist, e.g. [Monarch](https://www.defold.com/community/projects/88415/). 6 | 7 | **Features:** 8 | 9 | - Three different ways to navigate between screens: 10 | - State machine approach to navigation (which, I believe, suits games perfectly). 11 | - Navigation stack (with two variants of pushing the scene to the stack). 12 | - Popups. 13 | - Synchronous or asynchronous loading of collections. 14 | - Support for animated screen transitions. 15 | - Support for "Loading..." screen. 16 | 17 | The demo project provides code samples for all possible Router use cases. 18 | 19 | [Try demo project online](https://megus.github.io/defold-router). 20 | 21 | ## Table of Contents 22 | 23 | - [Setup](#setup) 24 | - [Setting up the navigation](#setting-up-the-navigation) 25 | - [Scenes description table](#scenes-description-table) 26 | - [State Machine approach](#state-machine-approach) 27 | - [Using the navigation stack](#using-the-navigation-stack) 28 | - [Push a scene](#push-a-scene) 29 | - [Push a modal scene](#push-a-modal-scene) 30 | - [Show a Popup](#show-a-popup) 31 | - [Close scene](#close-scene) 32 | - [Setting up animated scene transitions](#setting-up-animated-scene-transitions) 33 | - [Setting up "Loading" screen](#setting-up-loading-screen) 34 | - [Handling Router messages in collection scripts](#handling-router-messages-in-collection-scripts) 35 | 36 | ## Setup 37 | 38 | Add the library zip URL as a [dependency](http://www.defold.com/manuals/libraries/#_setting_up_library_dependencies) to your Defold project: [https://github.com/Megus/defold-router/archive/master.zip](https://github.com/Megus/defold-router/archive/master.zip) 39 | 40 | Create a game object (I recommend to name it ```scenes```) in the main collection with [collection proxies](https://www.defold.com/manuals/collection-proxy/) for all your scenes (I'm using the word "scene" for a screen). Proxy names must match the names of your collections. Don't forget that collection filename is not the same as collection name, so check that ```name``` properties of your collections are appropriately set. 41 | 42 | Create the scenes description table Lua module (e.g., ```scenes.lua``` in the ```main``` folder) with the following sample content (see details below): 43 | 44 | ```lua 45 | local M = { 46 | info = {}, 47 | first_scene = "main_menu", -- Change to the name of your first scene 48 | routing = {} 49 | } 50 | 51 | return M 52 | ``` 53 | 54 | Create a script for ```scenes``` game object (recommended component name is ```router```). Import the router library, your scenes description table (described above), initialize the router in ```init``` function and call the router message handler in ```on_message``` function. Please, note that you need to save the router ID to use it later. 55 | 56 | ```lua 57 | local router = require("wh_router.router") -- Require Router library 58 | local scenes = require("main.scenes") -- Path to your scene description table 59 | 60 | function init(self) 61 | msg.post(".", "acquire_input_focus") 62 | -- Create the router object with the main scene description table. 63 | -- The first scene will be loaded automatically. 64 | self.rid = router.new(scenes, "main:/scenes#router", "controller#script") 65 | end 66 | 67 | function on_message(self, message_id, message, sender) 68 | -- Handle router messages 69 | router.on_message(self.rid, message_id, message, sender) 70 | -- Handle other messages here 71 | end 72 | ``` 73 | 74 | Function ```router.new``` accepts four parameters: 75 | 76 | ```lua 77 | router.new(scenes, router_url, scene_controller_path, loader_url) 78 | ``` 79 | 80 | - The scene description table. 81 | - URL string to the script of the game object with the proxies. 82 | - The path to the controller script of your scenes. You should use the same name for all scenes (```controller#script``` is a good choice). 83 | - Optional: URL of a "Loading..." component (only if you use it). 84 | 85 | Now you can try to run your project and see that the Router loaded your first scene! 86 | 87 | It is allowed to create and use multiple router instances if you have very complex navigation. 88 | 89 | --- 90 | 91 | ## Setting up the navigation 92 | 93 | The Router treats each scene as a function which has some input parameters and returns some output. This approach is used to decouple scenes. Scenes also may have an internal state which the Router can persist between scene launches. 94 | 95 | There are four ways to change scenes: 96 | 97 | - Switch scenes according to rules defined by a routing table (state machine approach). 98 | - Push a new scene to the stack with unloading the current one. 99 | - Push a new scene to the stack, and keep the current one loaded, but disabled. 100 | - Show a pop-up scene and keep the current one loaded and enabled. 101 | 102 | ### Scenes description table 103 | 104 | The Scenes description table has three fields: 105 | 106 | - ```info``` — a table with scene properties 107 | - ```first_scene``` — the first scene 108 | - ```routing``` — the rules to switch between scenes 109 | 110 | #### ```info``` 111 | 112 | Each scene has three properties. You don't need to define all of them if any property is missing, the Router will use a default value. You can even skip a scene in the info table; the Router will use default values for all properties in this case. 113 | 114 | Example: 115 | 116 | ```lua 117 | info = { 118 | main_menu = { 119 | sync_load = true, -- Load this scene synchronously? Default: false 120 | has_transitions = false, -- Does this scene have in/out transition animations? Default: false 121 | show_loading = false -- Show "Loading..." when loading? Default: false 122 | }, 123 | } 124 | ``` 125 | 126 | #### ```first_scene``` 127 | 128 | This field defines the first scene of your game. It can be a string, a table or a function. 129 | 130 | - string — simply the name of the first scene 131 | - table — you can pass some input to the first scene. Example: ```{"main_menu", {skip_tutorial = true}}``` 132 | - function — if you need to implement some logic to define the first scene (e.g., different scenes for iOS and Android), use this option. The function should return two values: scene name and scene input table (input table is optional) 133 | 134 | ### State Machine approach 135 | 136 | ```routing``` field of the scenes description table defines the rules of switching between scenes. It works as a state machine where states are your scene names. When you close a scene that was displayed using routing table, Router will check the ```routing``` table field with the same name as your closing scene. These fields, just like, the ```first_scene``` field of the Scene description table can be a string, a table or a function. It is strongly recommended to use pure functions in this table to make your routing testable. 137 | 138 | An example of a routing table: 139 | 140 | ```lua 141 | routing = { 142 | -- Go to Level Selector from the Main Menu screen 143 | main_menu = "level_selector", 144 | 145 | gameplay = function (output) 146 | if output.win then 147 | return "win", {world = output.world, level = output.level} 148 | else 149 | return "fail", {world = output.world, level = output.level} 150 | end 151 | end, 152 | 153 | -- Go to Level Selector and pass some input to this scene 154 | fail = {"level_selector", {win = false}}, 155 | win = {"level_selector", {win = true}} 156 | } 157 | ``` 158 | 159 | ### Using the navigation stack 160 | 161 | You can use a traditional stack-based navigation approach with the Router. You can also combine state machine approach with the stack navigation, which is very convenient. 162 | 163 | #### Push a scene 164 | 165 | ```lua 166 | router.push(router_id, scene_name, input, state) 167 | ``` 168 | 169 | Pushes the new scene to the stack and passes the input to it. The current scene will be unloaded to save memory, but you can pass its state so Router can save it. When the pushed scene is closed, the current scene will be loaded again and receive the output of the pushed scene. 170 | 171 | Parameters ```input``` and ```state``` are optional. 172 | 173 | #### Push a modal scene 174 | 175 | ```lua 176 | router.push_modal(router_id, scene_name, input) 177 | ``` 178 | 179 | Pushes the new scene to the stack and passes the input to it. The current scene is kept in memory but is disabled. There's no need to save the state in this case. When the pushed scene is closed, the current scene will be enabled and receive the output of the pushed scene. 180 | 181 | Parameter ```input``` is optional. 182 | 183 | #### Show a popup 184 | 185 | ```lua 186 | router.popup(router_id, scene_name, input) 187 | ``` 188 | 189 | Pushes the new scene to the stack and passes the input to it. The current scene is kept in memory, but the input focus will be revoked. When the popup scene is closed, the current scene will get input focus back and receive the output of the pop-up scene. 190 | 191 | ### Close scene 192 | 193 | ```lua 194 | router.close(router_id, output, state) 195 | ``` 196 | 197 | When the scene is finished, you need to close it. You can pass the output to the router and save scene state. Both ```output``` and ```state``` parameters are optional. 198 | 199 | --- 200 | 201 | ## Setting up animated scene transitions 202 | 203 | When you set ```has_transitions``` to ```true``` for a scene, the Router will send the special message to your scene to let you handle transitions. 204 | 205 | Example part of ```on_message``` function: 206 | 207 | ```lua 208 | if message_id == router.messages.transition then 209 | -- Do some animations according to transition type in message.t_type 210 | end 211 | ``` 212 | 213 | There are four transition types; they're defined as constants in ```router.transition_types``` table: 214 | 215 | - ```t_in``` — Show scene 216 | - ```t_out``` — Hide scene 217 | - ```t_back_in``` — Show scene after returning from a pushed scene 218 | - ```t_back_out``` — Hide pushed scene 219 | 220 | When the animation is finished, you must call ```router.finished_transition(router_id)``` function to let the Router continue its job. 221 | 222 | The demo project has an example of fade in/fade out effect as the screen transition. 223 | 224 | --- 225 | 226 | ## Setting up "Loading" screen 227 | 228 | Some collections may take a lot of time to load. It's good to show a user some "Loading..." message in this case. To do it, create a game object in your main collection and pass its full URL as the 4th parameter to ```router.new``` function. An example: 229 | 230 | ```lua 231 | self.router_id = router.new(scenes, "main:/scenes#router", "controller#script", "main:/loader") 232 | ``` 233 | 234 | The Router will enable and disable this GO when needed. After enabling, the Router will send a message to this GO to let it initialize. The hash of this message is stored in ```router.messages.loader_start```. When the scene is loaded, the Router will send another message (hash is stored in ```outer.messages.loader_stop```) to let your GO finish. After this message is processed, you must call ```router.stopped_loader(message.router)``` function to let the Router disable this GO and show the loaded collection. 235 | 236 | An example ```on_message``` function of "Loading..." GO: 237 | 238 | ```lua 239 | function on_message(_, message_id, message, _) 240 | if message_id == router.messages.loader_start then 241 | gui.set_color(gui.get_node("loading"), vmath.vector4(1, 1, 1, 1)) 242 | elseif message_id == router.messages.loader_stop then 243 | gui.set_color(gui.get_node("loading"), vmath.vector4(1, 1, 1, 1)) 244 | gui.animate(gui.get_node("loading"), "color.w", 0, gui.EASING_LINEAR, 0.3, 0, function() 245 | router.stopped_loader(message.router) 246 | end) 247 | end 248 | end 249 | ``` 250 | 251 | --- 252 | 253 | ## Handling Router messages in collection scripts 254 | 255 | You need to handle some Router messages in your scene controller scripts: 256 | 257 | - ```router.messages.scene_input``` — mandatory. 258 | - ```router.messages.scene_popped``` — handle if you use ```push```, ```push_modal``` or ```popup``` Router functions in this scene. 259 | - ```router.messages.transition``` — handle if you use animated scene transitions. 260 | 261 | Please note that the ```router.messages.scene_input``` message is not sent when you return to the scene after ```push``` function, only ```router.messages.scene_popped``` is sent. 262 | 263 | ```lua 264 | -- Load router library 265 | local router = require("wh_router.router") 266 | 267 | -- Example of on_message function 268 | function on_message(self, message_id, message, sender) 269 | if message_id == router.messages.scene_input then 270 | -- Router object is passed in the message, save it to use later 271 | self.rid = message.router 272 | -- Setup the scene according to the state in message.state 273 | self.state = message.state 274 | -- Handle scene input contained in message.input 275 | elseif message_id == router.messages.scene_popped then 276 | self.rid = message.router 277 | -- If you push scenes (push/push_modal/popup) in the scene, 278 | -- handle this message and pushed scene output in message.output 279 | elseif message_id == router.messages.transition then 280 | -- Handle animated scene transitions 281 | if message.t_type == router.transition_types.t_in then 282 | -- Handle "in" transition 283 | end 284 | elseif message_id == hash("select_level") then 285 | -- Example of using router close function with sending the output and the scene state to persist 286 | router.close(self.rid, {world = self.state.world, level = message.level}, self.state) 287 | end 288 | end 289 | ``` 290 | 291 | --- 292 | 293 | If you have any questions or suggestions, feel free to contact me: 294 | 295 | - [Defold forum thread](https://forum.defold.com/t/defold-ui-routing-library/3528) 296 | - ```@megus``` at Defold Slack workspace. 297 | - Email: megus@wisehedgehog.studio 298 | 299 | Created and maintained by Roman "Megus" Petrov / [Wise Hedgehog Studio](https://wisehedgehog.studio). 300 | -------------------------------------------------------------------------------- /scenes/help/help.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/help/help.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 400.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "text" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/label.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 750.0 68 | y: 180.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "objects/textbox" 81 | id: "text/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "text" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 8.0 91 | y: 8.0 92 | z: 8.0 93 | w: 8.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | overridden_fields: 4 100 | template_node_child: true 101 | size_mode: SIZE_MODE_MANUAL 102 | } 103 | nodes { 104 | position { 105 | x: 0.0 106 | y: 0.0 107 | z: 0.0 108 | w: 1.0 109 | } 110 | rotation { 111 | x: 0.0 112 | y: 0.0 113 | z: 0.0 114 | w: 1.0 115 | } 116 | scale { 117 | x: 1.0 118 | y: 1.0 119 | z: 1.0 120 | w: 1.0 121 | } 122 | size { 123 | x: 700.0 124 | y: 180.0 125 | z: 0.0 126 | w: 1.0 127 | } 128 | color { 129 | x: 1.0 130 | y: 1.0 131 | z: 1.0 132 | w: 1.0 133 | } 134 | type: TYPE_TEXT 135 | blend_mode: BLEND_MODE_ALPHA 136 | text: "This scene was displayed with \"router.push_modal\" function. The previous scene is still loaded but disabled. You can use this method to show fullscreen scenes while keeping the previous scene in memory. It is useful if that scene has complex state (e.g. gameplay scene) and using state to restore it will be too complicated." 137 | font: "text" 138 | id: "text/text" 139 | xanchor: XANCHOR_NONE 140 | yanchor: YANCHOR_NONE 141 | pivot: PIVOT_CENTER 142 | outline { 143 | x: 0.0 144 | y: 0.0 145 | z: 0.0 146 | w: 1.0 147 | } 148 | shadow { 149 | x: 1.0 150 | y: 1.0 151 | z: 1.0 152 | w: 1.0 153 | } 154 | adjust_mode: ADJUST_MODE_FIT 155 | line_break: true 156 | parent: "text/box" 157 | layer: "" 158 | inherit_alpha: true 159 | alpha: 1.0 160 | outline_alpha: 1.0 161 | shadow_alpha: 1.0 162 | overridden_fields: 4 163 | overridden_fields: 8 164 | overridden_fields: 10 165 | template_node_child: true 166 | text_leading: 1.0 167 | text_tracking: 0.0 168 | } 169 | nodes { 170 | position { 171 | x: 150.0 172 | y: 550.0 173 | z: 0.0 174 | w: 1.0 175 | } 176 | rotation { 177 | x: 0.0 178 | y: 0.0 179 | z: 0.0 180 | w: 1.0 181 | } 182 | scale { 183 | x: 1.0 184 | y: 1.0 185 | z: 1.0 186 | w: 1.0 187 | } 188 | size { 189 | x: 200.0 190 | y: 100.0 191 | z: 0.0 192 | w: 1.0 193 | } 194 | color { 195 | x: 1.0 196 | y: 1.0 197 | z: 1.0 198 | w: 1.0 199 | } 200 | type: TYPE_TEMPLATE 201 | id: "back" 202 | layer: "" 203 | inherit_alpha: true 204 | alpha: 1.0 205 | template: "/common/button.gui" 206 | template_node_child: false 207 | } 208 | nodes { 209 | position { 210 | x: 0.0 211 | y: 0.0 212 | z: 0.0 213 | w: 1.0 214 | } 215 | rotation { 216 | x: 0.0 217 | y: 0.0 218 | z: 0.0 219 | w: 1.0 220 | } 221 | scale { 222 | x: 1.0 223 | y: 1.0 224 | z: 1.0 225 | w: 1.0 226 | } 227 | size { 228 | x: 200.0 229 | y: 60.0 230 | z: 0.0 231 | w: 1.0 232 | } 233 | color { 234 | x: 1.0 235 | y: 1.0 236 | z: 1.0 237 | w: 1.0 238 | } 239 | type: TYPE_BOX 240 | blend_mode: BLEND_MODE_ALPHA 241 | texture: "buttons/button" 242 | id: "back/box" 243 | xanchor: XANCHOR_NONE 244 | yanchor: YANCHOR_NONE 245 | pivot: PIVOT_CENTER 246 | adjust_mode: ADJUST_MODE_FIT 247 | parent: "back" 248 | layer: "" 249 | inherit_alpha: true 250 | slice9 { 251 | x: 20.0 252 | y: 20.0 253 | z: 40.0 254 | w: 40.0 255 | } 256 | clipping_mode: CLIPPING_MODE_NONE 257 | clipping_visible: true 258 | clipping_inverted: false 259 | alpha: 1.0 260 | overridden_fields: 4 261 | template_node_child: true 262 | size_mode: SIZE_MODE_MANUAL 263 | } 264 | nodes { 265 | position { 266 | x: 0.0 267 | y: 0.0 268 | z: 0.0 269 | w: 1.0 270 | } 271 | rotation { 272 | x: 0.0 273 | y: 0.0 274 | z: 0.0 275 | w: 1.0 276 | } 277 | scale { 278 | x: 1.0 279 | y: 1.0 280 | z: 1.0 281 | w: 1.0 282 | } 283 | size { 284 | x: 200.0 285 | y: 60.0 286 | z: 0.0 287 | w: 1.0 288 | } 289 | color { 290 | x: 0.0 291 | y: 0.0 292 | z: 0.0 293 | w: 1.0 294 | } 295 | type: TYPE_BOX 296 | blend_mode: BLEND_MODE_ALPHA 297 | texture: "buttons/button" 298 | id: "back/pressed" 299 | xanchor: XANCHOR_NONE 300 | yanchor: YANCHOR_NONE 301 | pivot: PIVOT_CENTER 302 | adjust_mode: ADJUST_MODE_FIT 303 | parent: "back/box" 304 | layer: "" 305 | inherit_alpha: true 306 | slice9 { 307 | x: 20.0 308 | y: 20.0 309 | z: 40.0 310 | w: 40.0 311 | } 312 | clipping_mode: CLIPPING_MODE_NONE 313 | clipping_visible: true 314 | clipping_inverted: false 315 | alpha: 0.0 316 | overridden_fields: 4 317 | template_node_child: true 318 | size_mode: SIZE_MODE_MANUAL 319 | } 320 | nodes { 321 | position { 322 | x: 0.0 323 | y: 0.0 324 | z: 0.0 325 | w: 1.0 326 | } 327 | rotation { 328 | x: 0.0 329 | y: 0.0 330 | z: 0.0 331 | w: 1.0 332 | } 333 | scale { 334 | x: 1.0 335 | y: 1.0 336 | z: 1.0 337 | w: 1.0 338 | } 339 | size { 340 | x: 200.0 341 | y: 100.0 342 | z: 0.0 343 | w: 1.0 344 | } 345 | color { 346 | x: 1.0 347 | y: 1.0 348 | z: 1.0 349 | w: 1.0 350 | } 351 | type: TYPE_TEXT 352 | blend_mode: BLEND_MODE_ALPHA 353 | text: "Back" 354 | font: "font" 355 | id: "back/text" 356 | xanchor: XANCHOR_NONE 357 | yanchor: YANCHOR_NONE 358 | pivot: PIVOT_CENTER 359 | outline { 360 | x: 0.0 361 | y: 0.0 362 | z: 0.0 363 | w: 1.0 364 | } 365 | shadow { 366 | x: 1.0 367 | y: 1.0 368 | z: 1.0 369 | w: 1.0 370 | } 371 | adjust_mode: ADJUST_MODE_FIT 372 | line_break: false 373 | parent: "back" 374 | layer: "" 375 | inherit_alpha: true 376 | alpha: 1.0 377 | outline_alpha: 1.0 378 | shadow_alpha: 1.0 379 | overridden_fields: 8 380 | template_node_child: true 381 | text_leading: 1.0 382 | text_tracking: 0.0 383 | } 384 | nodes { 385 | position { 386 | x: 400.0 387 | y: 250.0 388 | z: 0.0 389 | w: 1.0 390 | } 391 | rotation { 392 | x: 0.0 393 | y: 0.0 394 | z: 0.0 395 | w: 1.0 396 | } 397 | scale { 398 | x: 1.0 399 | y: 1.0 400 | z: 1.0 401 | w: 1.0 402 | } 403 | size { 404 | x: 200.0 405 | y: 100.0 406 | z: 0.0 407 | w: 1.0 408 | } 409 | color { 410 | x: 1.0 411 | y: 1.0 412 | z: 1.0 413 | w: 1.0 414 | } 415 | type: TYPE_TEMPLATE 416 | id: "chapter1" 417 | layer: "" 418 | inherit_alpha: true 419 | alpha: 1.0 420 | template: "/common/button.gui" 421 | template_node_child: false 422 | } 423 | nodes { 424 | position { 425 | x: 0.0 426 | y: 0.0 427 | z: 0.0 428 | w: 1.0 429 | } 430 | rotation { 431 | x: 0.0 432 | y: 0.0 433 | z: 0.0 434 | w: 1.0 435 | } 436 | scale { 437 | x: 1.0 438 | y: 1.0 439 | z: 1.0 440 | w: 1.0 441 | } 442 | size { 443 | x: 200.0 444 | y: 100.0 445 | z: 0.0 446 | w: 1.0 447 | } 448 | color { 449 | x: 1.0 450 | y: 1.0 451 | z: 1.0 452 | w: 1.0 453 | } 454 | type: TYPE_BOX 455 | blend_mode: BLEND_MODE_ALPHA 456 | texture: "buttons/button" 457 | id: "chapter1/box" 458 | xanchor: XANCHOR_NONE 459 | yanchor: YANCHOR_NONE 460 | pivot: PIVOT_CENTER 461 | adjust_mode: ADJUST_MODE_FIT 462 | parent: "chapter1" 463 | layer: "" 464 | inherit_alpha: true 465 | slice9 { 466 | x: 20.0 467 | y: 20.0 468 | z: 40.0 469 | w: 40.0 470 | } 471 | clipping_mode: CLIPPING_MODE_NONE 472 | clipping_visible: true 473 | clipping_inverted: false 474 | alpha: 1.0 475 | overridden_fields: 4 476 | template_node_child: true 477 | size_mode: SIZE_MODE_MANUAL 478 | } 479 | nodes { 480 | position { 481 | x: 0.0 482 | y: 0.0 483 | z: 0.0 484 | w: 1.0 485 | } 486 | rotation { 487 | x: 0.0 488 | y: 0.0 489 | z: 0.0 490 | w: 1.0 491 | } 492 | scale { 493 | x: 1.0 494 | y: 1.0 495 | z: 1.0 496 | w: 1.0 497 | } 498 | size { 499 | x: 200.0 500 | y: 100.0 501 | z: 0.0 502 | w: 1.0 503 | } 504 | color { 505 | x: 0.0 506 | y: 0.0 507 | z: 0.0 508 | w: 1.0 509 | } 510 | type: TYPE_BOX 511 | blend_mode: BLEND_MODE_ALPHA 512 | texture: "buttons/button" 513 | id: "chapter1/pressed" 514 | xanchor: XANCHOR_NONE 515 | yanchor: YANCHOR_NONE 516 | pivot: PIVOT_CENTER 517 | adjust_mode: ADJUST_MODE_FIT 518 | parent: "chapter1/box" 519 | layer: "" 520 | inherit_alpha: true 521 | slice9 { 522 | x: 20.0 523 | y: 20.0 524 | z: 40.0 525 | w: 40.0 526 | } 527 | clipping_mode: CLIPPING_MODE_NONE 528 | clipping_visible: true 529 | clipping_inverted: false 530 | alpha: 0.0 531 | overridden_fields: 4 532 | template_node_child: true 533 | size_mode: SIZE_MODE_MANUAL 534 | } 535 | nodes { 536 | position { 537 | x: 0.0 538 | y: 0.0 539 | z: 0.0 540 | w: 1.0 541 | } 542 | rotation { 543 | x: 0.0 544 | y: 0.0 545 | z: 0.0 546 | w: 1.0 547 | } 548 | scale { 549 | x: 1.0 550 | y: 1.0 551 | z: 1.0 552 | w: 1.0 553 | } 554 | size { 555 | x: 200.0 556 | y: 100.0 557 | z: 0.0 558 | w: 1.0 559 | } 560 | color { 561 | x: 1.0 562 | y: 1.0 563 | z: 1.0 564 | w: 1.0 565 | } 566 | type: TYPE_TEXT 567 | blend_mode: BLEND_MODE_ALPHA 568 | text: "Chapter 1\n" 569 | "" 570 | font: "font" 571 | id: "chapter1/text" 572 | xanchor: XANCHOR_NONE 573 | yanchor: YANCHOR_NONE 574 | pivot: PIVOT_CENTER 575 | outline { 576 | x: 0.0 577 | y: 0.0 578 | z: 0.0 579 | w: 1.0 580 | } 581 | shadow { 582 | x: 1.0 583 | y: 1.0 584 | z: 1.0 585 | w: 1.0 586 | } 587 | adjust_mode: ADJUST_MODE_FIT 588 | line_break: false 589 | parent: "chapter1" 590 | layer: "" 591 | inherit_alpha: true 592 | alpha: 1.0 593 | outline_alpha: 1.0 594 | shadow_alpha: 1.0 595 | overridden_fields: 8 596 | template_node_child: true 597 | text_leading: 1.0 598 | text_tracking: 0.0 599 | } 600 | nodes { 601 | position { 602 | x: 400.0 603 | y: 100.0 604 | z: 0.0 605 | w: 1.0 606 | } 607 | rotation { 608 | x: 0.0 609 | y: 0.0 610 | z: 0.0 611 | w: 1.0 612 | } 613 | scale { 614 | x: 1.0 615 | y: 1.0 616 | z: 1.0 617 | w: 1.0 618 | } 619 | size { 620 | x: 200.0 621 | y: 100.0 622 | z: 0.0 623 | w: 1.0 624 | } 625 | color { 626 | x: 1.0 627 | y: 1.0 628 | z: 1.0 629 | w: 1.0 630 | } 631 | type: TYPE_TEMPLATE 632 | id: "chapter2" 633 | layer: "" 634 | inherit_alpha: true 635 | alpha: 1.0 636 | template: "/common/button.gui" 637 | template_node_child: false 638 | } 639 | nodes { 640 | position { 641 | x: 0.0 642 | y: 0.0 643 | z: 0.0 644 | w: 1.0 645 | } 646 | rotation { 647 | x: 0.0 648 | y: 0.0 649 | z: 0.0 650 | w: 1.0 651 | } 652 | scale { 653 | x: 1.0 654 | y: 1.0 655 | z: 1.0 656 | w: 1.0 657 | } 658 | size { 659 | x: 200.0 660 | y: 100.0 661 | z: 0.0 662 | w: 1.0 663 | } 664 | color { 665 | x: 1.0 666 | y: 1.0 667 | z: 1.0 668 | w: 1.0 669 | } 670 | type: TYPE_BOX 671 | blend_mode: BLEND_MODE_ALPHA 672 | texture: "buttons/button" 673 | id: "chapter2/box" 674 | xanchor: XANCHOR_NONE 675 | yanchor: YANCHOR_NONE 676 | pivot: PIVOT_CENTER 677 | adjust_mode: ADJUST_MODE_FIT 678 | parent: "chapter2" 679 | layer: "" 680 | inherit_alpha: true 681 | slice9 { 682 | x: 20.0 683 | y: 20.0 684 | z: 40.0 685 | w: 40.0 686 | } 687 | clipping_mode: CLIPPING_MODE_NONE 688 | clipping_visible: true 689 | clipping_inverted: false 690 | alpha: 1.0 691 | overridden_fields: 4 692 | template_node_child: true 693 | size_mode: SIZE_MODE_MANUAL 694 | } 695 | nodes { 696 | position { 697 | x: 0.0 698 | y: 0.0 699 | z: 0.0 700 | w: 1.0 701 | } 702 | rotation { 703 | x: 0.0 704 | y: 0.0 705 | z: 0.0 706 | w: 1.0 707 | } 708 | scale { 709 | x: 1.0 710 | y: 1.0 711 | z: 1.0 712 | w: 1.0 713 | } 714 | size { 715 | x: 200.0 716 | y: 100.0 717 | z: 0.0 718 | w: 1.0 719 | } 720 | color { 721 | x: 0.0 722 | y: 0.0 723 | z: 0.0 724 | w: 1.0 725 | } 726 | type: TYPE_BOX 727 | blend_mode: BLEND_MODE_ALPHA 728 | texture: "buttons/button" 729 | id: "chapter2/pressed" 730 | xanchor: XANCHOR_NONE 731 | yanchor: YANCHOR_NONE 732 | pivot: PIVOT_CENTER 733 | adjust_mode: ADJUST_MODE_FIT 734 | parent: "chapter2/box" 735 | layer: "" 736 | inherit_alpha: true 737 | slice9 { 738 | x: 20.0 739 | y: 20.0 740 | z: 40.0 741 | w: 40.0 742 | } 743 | clipping_mode: CLIPPING_MODE_NONE 744 | clipping_visible: true 745 | clipping_inverted: false 746 | alpha: 0.0 747 | overridden_fields: 4 748 | template_node_child: true 749 | size_mode: SIZE_MODE_MANUAL 750 | } 751 | nodes { 752 | position { 753 | x: 0.0 754 | y: 0.0 755 | z: 0.0 756 | w: 1.0 757 | } 758 | rotation { 759 | x: 0.0 760 | y: 0.0 761 | z: 0.0 762 | w: 1.0 763 | } 764 | scale { 765 | x: 1.0 766 | y: 1.0 767 | z: 1.0 768 | w: 1.0 769 | } 770 | size { 771 | x: 200.0 772 | y: 100.0 773 | z: 0.0 774 | w: 1.0 775 | } 776 | color { 777 | x: 1.0 778 | y: 1.0 779 | z: 1.0 780 | w: 1.0 781 | } 782 | type: TYPE_TEXT 783 | blend_mode: BLEND_MODE_ALPHA 784 | text: "Chapter 2" 785 | font: "font" 786 | id: "chapter2/text" 787 | xanchor: XANCHOR_NONE 788 | yanchor: YANCHOR_NONE 789 | pivot: PIVOT_CENTER 790 | outline { 791 | x: 0.0 792 | y: 0.0 793 | z: 0.0 794 | w: 1.0 795 | } 796 | shadow { 797 | x: 1.0 798 | y: 1.0 799 | z: 1.0 800 | w: 1.0 801 | } 802 | adjust_mode: ADJUST_MODE_FIT 803 | line_break: false 804 | parent: "chapter2" 805 | layer: "" 806 | inherit_alpha: true 807 | alpha: 1.0 808 | outline_alpha: 1.0 809 | shadow_alpha: 1.0 810 | overridden_fields: 8 811 | template_node_child: true 812 | text_leading: 1.0 813 | text_tracking: 0.0 814 | } 815 | nodes { 816 | position { 817 | x: 400.0 818 | y: 300.0 819 | z: 0.0 820 | w: 1.0 821 | } 822 | rotation { 823 | x: 0.0 824 | y: 0.0 825 | z: 0.0 826 | w: 1.0 827 | } 828 | scale { 829 | x: 1.0 830 | y: 1.0 831 | z: 1.0 832 | w: 1.0 833 | } 834 | size { 835 | x: 800.0 836 | y: 600.0 837 | z: 0.0 838 | w: 1.0 839 | } 840 | color { 841 | x: 0.0 842 | y: 0.0 843 | z: 0.0 844 | w: 1.0 845 | } 846 | type: TYPE_BOX 847 | blend_mode: BLEND_MODE_ALPHA 848 | texture: "" 849 | id: "fader" 850 | xanchor: XANCHOR_NONE 851 | yanchor: YANCHOR_NONE 852 | pivot: PIVOT_CENTER 853 | adjust_mode: ADJUST_MODE_FIT 854 | layer: "" 855 | inherit_alpha: true 856 | slice9 { 857 | x: 0.0 858 | y: 0.0 859 | z: 0.0 860 | w: 0.0 861 | } 862 | clipping_mode: CLIPPING_MODE_NONE 863 | clipping_visible: true 864 | clipping_inverted: false 865 | alpha: 0.0 866 | template_node_child: false 867 | size_mode: SIZE_MODE_MANUAL 868 | } 869 | material: "/builtins/materials/gui.material" 870 | adjust_reference: ADJUST_REFERENCE_PARENT 871 | max_nodes: 512 872 | -------------------------------------------------------------------------------- /scenes/gameplay/gameplay.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/gameplay/gameplay.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 400.0 11 | y: 300.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "level" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/label.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 200.0 68 | y: 100.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "objects/textbox" 81 | id: "level/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "level" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 8.0 91 | y: 8.0 92 | z: 8.0 93 | w: 8.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | template_node_child: true 100 | size_mode: SIZE_MODE_MANUAL 101 | } 102 | nodes { 103 | position { 104 | x: 0.0 105 | y: 0.0 106 | z: 0.0 107 | w: 1.0 108 | } 109 | rotation { 110 | x: 0.0 111 | y: 0.0 112 | z: 0.0 113 | w: 1.0 114 | } 115 | scale { 116 | x: 1.0 117 | y: 1.0 118 | z: 1.0 119 | w: 1.0 120 | } 121 | size { 122 | x: 200.0 123 | y: 100.0 124 | z: 0.0 125 | w: 1.0 126 | } 127 | color { 128 | x: 1.0 129 | y: 1.0 130 | z: 1.0 131 | w: 1.0 132 | } 133 | type: TYPE_TEXT 134 | blend_mode: BLEND_MODE_ALPHA 135 | text: "Level 1-1" 136 | font: "menu" 137 | id: "level/text" 138 | xanchor: XANCHOR_NONE 139 | yanchor: YANCHOR_NONE 140 | pivot: PIVOT_CENTER 141 | outline { 142 | x: 0.0 143 | y: 0.0 144 | z: 0.0 145 | w: 1.0 146 | } 147 | shadow { 148 | x: 1.0 149 | y: 1.0 150 | z: 1.0 151 | w: 1.0 152 | } 153 | adjust_mode: ADJUST_MODE_FIT 154 | line_break: true 155 | parent: "level/box" 156 | layer: "" 157 | inherit_alpha: true 158 | alpha: 1.0 159 | outline_alpha: 1.0 160 | shadow_alpha: 1.0 161 | overridden_fields: 8 162 | template_node_child: true 163 | text_leading: 1.0 164 | text_tracking: 0.0 165 | } 166 | nodes { 167 | position { 168 | x: 400.0 169 | y: 450.0 170 | z: 0.0 171 | w: 1.0 172 | } 173 | rotation { 174 | x: 0.0 175 | y: 0.0 176 | z: 0.0 177 | w: 1.0 178 | } 179 | scale { 180 | x: 1.0 181 | y: 1.0 182 | z: 1.0 183 | w: 1.0 184 | } 185 | size { 186 | x: 200.0 187 | y: 100.0 188 | z: 0.0 189 | w: 1.0 190 | } 191 | color { 192 | x: 1.0 193 | y: 1.0 194 | z: 1.0 195 | w: 1.0 196 | } 197 | type: TYPE_TEMPLATE 198 | id: "label" 199 | layer: "" 200 | inherit_alpha: true 201 | alpha: 1.0 202 | template: "/common/label.gui" 203 | template_node_child: false 204 | } 205 | nodes { 206 | position { 207 | x: 0.0 208 | y: 0.0 209 | z: 0.0 210 | w: 1.0 211 | } 212 | rotation { 213 | x: 0.0 214 | y: 0.0 215 | z: 0.0 216 | w: 1.0 217 | } 218 | scale { 219 | x: 1.0 220 | y: 1.0 221 | z: 1.0 222 | w: 1.0 223 | } 224 | size { 225 | x: 700.0 226 | y: 100.0 227 | z: 0.0 228 | w: 1.0 229 | } 230 | color { 231 | x: 1.0 232 | y: 1.0 233 | z: 1.0 234 | w: 1.0 235 | } 236 | type: TYPE_BOX 237 | blend_mode: BLEND_MODE_ALPHA 238 | texture: "objects/textbox" 239 | id: "label/box" 240 | xanchor: XANCHOR_NONE 241 | yanchor: YANCHOR_NONE 242 | pivot: PIVOT_CENTER 243 | adjust_mode: ADJUST_MODE_FIT 244 | parent: "label" 245 | layer: "" 246 | inherit_alpha: true 247 | slice9 { 248 | x: 8.0 249 | y: 8.0 250 | z: 8.0 251 | w: 8.0 252 | } 253 | clipping_mode: CLIPPING_MODE_NONE 254 | clipping_visible: true 255 | clipping_inverted: false 256 | alpha: 1.0 257 | overridden_fields: 4 258 | template_node_child: true 259 | size_mode: SIZE_MODE_MANUAL 260 | } 261 | nodes { 262 | position { 263 | x: 0.0 264 | y: 0.0 265 | z: 0.0 266 | w: 1.0 267 | } 268 | rotation { 269 | x: 0.0 270 | y: 0.0 271 | z: 0.0 272 | w: 1.0 273 | } 274 | scale { 275 | x: 1.0 276 | y: 1.0 277 | z: 1.0 278 | w: 1.0 279 | } 280 | size { 281 | x: 650.0 282 | y: 100.0 283 | z: 0.0 284 | w: 1.0 285 | } 286 | color { 287 | x: 1.0 288 | y: 1.0 289 | z: 1.0 290 | w: 1.0 291 | } 292 | type: TYPE_TEXT 293 | blend_mode: BLEND_MODE_ALPHA 294 | text: "This scene was displayed according to routing rules." 295 | font: "text" 296 | id: "label/text" 297 | xanchor: XANCHOR_NONE 298 | yanchor: YANCHOR_NONE 299 | pivot: PIVOT_CENTER 300 | outline { 301 | x: 0.0 302 | y: 0.0 303 | z: 0.0 304 | w: 1.0 305 | } 306 | shadow { 307 | x: 1.0 308 | y: 1.0 309 | z: 1.0 310 | w: 1.0 311 | } 312 | adjust_mode: ADJUST_MODE_FIT 313 | line_break: true 314 | parent: "label/box" 315 | layer: "" 316 | inherit_alpha: true 317 | alpha: 1.0 318 | outline_alpha: 1.0 319 | shadow_alpha: 1.0 320 | overridden_fields: 4 321 | overridden_fields: 8 322 | overridden_fields: 10 323 | template_node_child: true 324 | text_leading: 1.0 325 | text_tracking: 0.0 326 | } 327 | nodes { 328 | position { 329 | x: 650.0 330 | y: 550.0 331 | z: 0.0 332 | w: 1.0 333 | } 334 | rotation { 335 | x: 0.0 336 | y: 0.0 337 | z: 0.0 338 | w: 1.0 339 | } 340 | scale { 341 | x: 1.0 342 | y: 1.0 343 | z: 1.0 344 | w: 1.0 345 | } 346 | size { 347 | x: 200.0 348 | y: 100.0 349 | z: 0.0 350 | w: 1.0 351 | } 352 | color { 353 | x: 1.0 354 | y: 1.0 355 | z: 1.0 356 | w: 1.0 357 | } 358 | type: TYPE_TEMPLATE 359 | id: "settings" 360 | layer: "layer1" 361 | inherit_alpha: true 362 | alpha: 1.0 363 | template: "/common/button.gui" 364 | template_node_child: false 365 | } 366 | nodes { 367 | position { 368 | x: 0.0 369 | y: 0.0 370 | z: 0.0 371 | w: 1.0 372 | } 373 | rotation { 374 | x: 0.0 375 | y: 0.0 376 | z: 0.0 377 | w: 1.0 378 | } 379 | scale { 380 | x: 1.0 381 | y: 1.0 382 | z: 1.0 383 | w: 1.0 384 | } 385 | size { 386 | x: 200.0 387 | y: 60.0 388 | z: 0.0 389 | w: 1.0 390 | } 391 | color { 392 | x: 1.0 393 | y: 1.0 394 | z: 1.0 395 | w: 1.0 396 | } 397 | type: TYPE_BOX 398 | blend_mode: BLEND_MODE_ALPHA 399 | texture: "buttons/button" 400 | id: "settings/box" 401 | xanchor: XANCHOR_NONE 402 | yanchor: YANCHOR_NONE 403 | pivot: PIVOT_CENTER 404 | adjust_mode: ADJUST_MODE_FIT 405 | parent: "settings" 406 | layer: "" 407 | inherit_alpha: true 408 | slice9 { 409 | x: 20.0 410 | y: 20.0 411 | z: 40.0 412 | w: 40.0 413 | } 414 | clipping_mode: CLIPPING_MODE_NONE 415 | clipping_visible: true 416 | clipping_inverted: false 417 | alpha: 1.0 418 | overridden_fields: 4 419 | template_node_child: true 420 | size_mode: SIZE_MODE_MANUAL 421 | } 422 | nodes { 423 | position { 424 | x: 0.0 425 | y: 0.0 426 | z: 0.0 427 | w: 1.0 428 | } 429 | rotation { 430 | x: 0.0 431 | y: 0.0 432 | z: 0.0 433 | w: 1.0 434 | } 435 | scale { 436 | x: 1.0 437 | y: 1.0 438 | z: 1.0 439 | w: 1.0 440 | } 441 | size { 442 | x: 200.0 443 | y: 60.0 444 | z: 0.0 445 | w: 1.0 446 | } 447 | color { 448 | x: 0.0 449 | y: 0.0 450 | z: 0.0 451 | w: 1.0 452 | } 453 | type: TYPE_BOX 454 | blend_mode: BLEND_MODE_ALPHA 455 | texture: "buttons/button" 456 | id: "settings/pressed" 457 | xanchor: XANCHOR_NONE 458 | yanchor: YANCHOR_NONE 459 | pivot: PIVOT_CENTER 460 | adjust_mode: ADJUST_MODE_FIT 461 | parent: "settings/box" 462 | layer: "" 463 | inherit_alpha: true 464 | slice9 { 465 | x: 20.0 466 | y: 20.0 467 | z: 40.0 468 | w: 40.0 469 | } 470 | clipping_mode: CLIPPING_MODE_NONE 471 | clipping_visible: true 472 | clipping_inverted: false 473 | alpha: 0.0 474 | overridden_fields: 4 475 | template_node_child: true 476 | size_mode: SIZE_MODE_MANUAL 477 | } 478 | nodes { 479 | position { 480 | x: 0.0 481 | y: 0.0 482 | z: 0.0 483 | w: 1.0 484 | } 485 | rotation { 486 | x: 0.0 487 | y: 0.0 488 | z: 0.0 489 | w: 1.0 490 | } 491 | scale { 492 | x: 1.0 493 | y: 1.0 494 | z: 1.0 495 | w: 1.0 496 | } 497 | size { 498 | x: 200.0 499 | y: 100.0 500 | z: 0.0 501 | w: 1.0 502 | } 503 | color { 504 | x: 1.0 505 | y: 1.0 506 | z: 1.0 507 | w: 1.0 508 | } 509 | type: TYPE_TEXT 510 | blend_mode: BLEND_MODE_ALPHA 511 | text: "Settings" 512 | font: "font" 513 | id: "settings/text" 514 | xanchor: XANCHOR_NONE 515 | yanchor: YANCHOR_NONE 516 | pivot: PIVOT_CENTER 517 | outline { 518 | x: 0.0 519 | y: 0.0 520 | z: 0.0 521 | w: 1.0 522 | } 523 | shadow { 524 | x: 1.0 525 | y: 1.0 526 | z: 1.0 527 | w: 1.0 528 | } 529 | adjust_mode: ADJUST_MODE_FIT 530 | line_break: false 531 | parent: "settings" 532 | layer: "" 533 | inherit_alpha: true 534 | alpha: 1.0 535 | outline_alpha: 1.0 536 | shadow_alpha: 1.0 537 | overridden_fields: 8 538 | template_node_child: true 539 | text_leading: 1.0 540 | text_tracking: 0.0 541 | } 542 | nodes { 543 | position { 544 | x: 150.0 545 | y: 550.0 546 | z: 0.0 547 | w: 1.0 548 | } 549 | rotation { 550 | x: 0.0 551 | y: 0.0 552 | z: 0.0 553 | w: 1.0 554 | } 555 | scale { 556 | x: 1.0 557 | y: 1.0 558 | z: 1.0 559 | w: 1.0 560 | } 561 | size { 562 | x: 200.0 563 | y: 100.0 564 | z: 0.0 565 | w: 1.0 566 | } 567 | color { 568 | x: 1.0 569 | y: 1.0 570 | z: 1.0 571 | w: 1.0 572 | } 573 | type: TYPE_TEMPLATE 574 | id: "help" 575 | layer: "layer1" 576 | inherit_alpha: true 577 | alpha: 1.0 578 | template: "/common/button.gui" 579 | template_node_child: false 580 | } 581 | nodes { 582 | position { 583 | x: 0.0 584 | y: 0.0 585 | z: 0.0 586 | w: 1.0 587 | } 588 | rotation { 589 | x: 0.0 590 | y: 0.0 591 | z: 0.0 592 | w: 1.0 593 | } 594 | scale { 595 | x: 1.0 596 | y: 1.0 597 | z: 1.0 598 | w: 1.0 599 | } 600 | size { 601 | x: 200.0 602 | y: 60.0 603 | z: 0.0 604 | w: 1.0 605 | } 606 | color { 607 | x: 1.0 608 | y: 1.0 609 | z: 1.0 610 | w: 1.0 611 | } 612 | type: TYPE_BOX 613 | blend_mode: BLEND_MODE_ALPHA 614 | texture: "buttons/button" 615 | id: "help/box" 616 | xanchor: XANCHOR_NONE 617 | yanchor: YANCHOR_NONE 618 | pivot: PIVOT_CENTER 619 | adjust_mode: ADJUST_MODE_FIT 620 | parent: "help" 621 | layer: "" 622 | inherit_alpha: true 623 | slice9 { 624 | x: 20.0 625 | y: 20.0 626 | z: 40.0 627 | w: 40.0 628 | } 629 | clipping_mode: CLIPPING_MODE_NONE 630 | clipping_visible: true 631 | clipping_inverted: false 632 | alpha: 1.0 633 | overridden_fields: 4 634 | template_node_child: true 635 | size_mode: SIZE_MODE_MANUAL 636 | } 637 | nodes { 638 | position { 639 | x: 0.0 640 | y: 0.0 641 | z: 0.0 642 | w: 1.0 643 | } 644 | rotation { 645 | x: 0.0 646 | y: 0.0 647 | z: 0.0 648 | w: 1.0 649 | } 650 | scale { 651 | x: 1.0 652 | y: 1.0 653 | z: 1.0 654 | w: 1.0 655 | } 656 | size { 657 | x: 200.0 658 | y: 60.0 659 | z: 0.0 660 | w: 1.0 661 | } 662 | color { 663 | x: 0.0 664 | y: 0.0 665 | z: 0.0 666 | w: 1.0 667 | } 668 | type: TYPE_BOX 669 | blend_mode: BLEND_MODE_ALPHA 670 | texture: "buttons/button" 671 | id: "help/pressed" 672 | xanchor: XANCHOR_NONE 673 | yanchor: YANCHOR_NONE 674 | pivot: PIVOT_CENTER 675 | adjust_mode: ADJUST_MODE_FIT 676 | parent: "help/box" 677 | layer: "" 678 | inherit_alpha: true 679 | slice9 { 680 | x: 20.0 681 | y: 20.0 682 | z: 40.0 683 | w: 40.0 684 | } 685 | clipping_mode: CLIPPING_MODE_NONE 686 | clipping_visible: true 687 | clipping_inverted: false 688 | alpha: 0.0 689 | overridden_fields: 4 690 | template_node_child: true 691 | size_mode: SIZE_MODE_MANUAL 692 | } 693 | nodes { 694 | position { 695 | x: 0.0 696 | y: 0.0 697 | z: 0.0 698 | w: 1.0 699 | } 700 | rotation { 701 | x: 0.0 702 | y: 0.0 703 | z: 0.0 704 | w: 1.0 705 | } 706 | scale { 707 | x: 1.0 708 | y: 1.0 709 | z: 1.0 710 | w: 1.0 711 | } 712 | size { 713 | x: 200.0 714 | y: 100.0 715 | z: 0.0 716 | w: 1.0 717 | } 718 | color { 719 | x: 1.0 720 | y: 1.0 721 | z: 1.0 722 | w: 1.0 723 | } 724 | type: TYPE_TEXT 725 | blend_mode: BLEND_MODE_ALPHA 726 | text: "Help" 727 | font: "font" 728 | id: "help/text" 729 | xanchor: XANCHOR_NONE 730 | yanchor: YANCHOR_NONE 731 | pivot: PIVOT_CENTER 732 | outline { 733 | x: 0.0 734 | y: 0.0 735 | z: 0.0 736 | w: 1.0 737 | } 738 | shadow { 739 | x: 1.0 740 | y: 1.0 741 | z: 1.0 742 | w: 1.0 743 | } 744 | adjust_mode: ADJUST_MODE_FIT 745 | line_break: false 746 | parent: "help" 747 | layer: "" 748 | inherit_alpha: true 749 | alpha: 1.0 750 | outline_alpha: 1.0 751 | shadow_alpha: 1.0 752 | overridden_fields: 8 753 | template_node_child: true 754 | text_leading: 1.0 755 | text_tracking: 0.0 756 | } 757 | nodes { 758 | position { 759 | x: 200.0 760 | y: 150.0 761 | z: 0.0 762 | w: 1.0 763 | } 764 | rotation { 765 | x: 0.0 766 | y: 0.0 767 | z: 0.0 768 | w: 1.0 769 | } 770 | scale { 771 | x: 1.0 772 | y: 1.0 773 | z: 1.0 774 | w: 1.0 775 | } 776 | size { 777 | x: 200.0 778 | y: 100.0 779 | z: 0.0 780 | w: 1.0 781 | } 782 | color { 783 | x: 1.0 784 | y: 1.0 785 | z: 1.0 786 | w: 1.0 787 | } 788 | type: TYPE_TEMPLATE 789 | id: "win" 790 | layer: "layer1" 791 | inherit_alpha: true 792 | alpha: 1.0 793 | template: "/common/button.gui" 794 | template_node_child: false 795 | } 796 | nodes { 797 | position { 798 | x: 0.0 799 | y: 0.0 800 | z: 0.0 801 | w: 1.0 802 | } 803 | rotation { 804 | x: 0.0 805 | y: 0.0 806 | z: 0.0 807 | w: 1.0 808 | } 809 | scale { 810 | x: 1.0 811 | y: 1.0 812 | z: 1.0 813 | w: 1.0 814 | } 815 | size { 816 | x: 200.0 817 | y: 100.0 818 | z: 0.0 819 | w: 1.0 820 | } 821 | color { 822 | x: 1.0 823 | y: 1.0 824 | z: 1.0 825 | w: 1.0 826 | } 827 | type: TYPE_BOX 828 | blend_mode: BLEND_MODE_ALPHA 829 | texture: "buttons/button" 830 | id: "win/box" 831 | xanchor: XANCHOR_NONE 832 | yanchor: YANCHOR_NONE 833 | pivot: PIVOT_CENTER 834 | adjust_mode: ADJUST_MODE_FIT 835 | parent: "win" 836 | layer: "" 837 | inherit_alpha: true 838 | slice9 { 839 | x: 20.0 840 | y: 20.0 841 | z: 40.0 842 | w: 40.0 843 | } 844 | clipping_mode: CLIPPING_MODE_NONE 845 | clipping_visible: true 846 | clipping_inverted: false 847 | alpha: 1.0 848 | overridden_fields: 4 849 | template_node_child: true 850 | size_mode: SIZE_MODE_MANUAL 851 | } 852 | nodes { 853 | position { 854 | x: 0.0 855 | y: 0.0 856 | z: 0.0 857 | w: 1.0 858 | } 859 | rotation { 860 | x: 0.0 861 | y: 0.0 862 | z: 0.0 863 | w: 1.0 864 | } 865 | scale { 866 | x: 1.0 867 | y: 1.0 868 | z: 1.0 869 | w: 1.0 870 | } 871 | size { 872 | x: 200.0 873 | y: 100.0 874 | z: 0.0 875 | w: 1.0 876 | } 877 | color { 878 | x: 0.0 879 | y: 0.0 880 | z: 0.0 881 | w: 1.0 882 | } 883 | type: TYPE_BOX 884 | blend_mode: BLEND_MODE_ALPHA 885 | texture: "buttons/button" 886 | id: "win/pressed" 887 | xanchor: XANCHOR_NONE 888 | yanchor: YANCHOR_NONE 889 | pivot: PIVOT_CENTER 890 | adjust_mode: ADJUST_MODE_FIT 891 | parent: "win/box" 892 | layer: "" 893 | inherit_alpha: true 894 | slice9 { 895 | x: 20.0 896 | y: 20.0 897 | z: 40.0 898 | w: 40.0 899 | } 900 | clipping_mode: CLIPPING_MODE_NONE 901 | clipping_visible: true 902 | clipping_inverted: false 903 | alpha: 0.0 904 | overridden_fields: 4 905 | template_node_child: true 906 | size_mode: SIZE_MODE_MANUAL 907 | } 908 | nodes { 909 | position { 910 | x: 0.0 911 | y: 0.0 912 | z: 0.0 913 | w: 1.0 914 | } 915 | rotation { 916 | x: 0.0 917 | y: 0.0 918 | z: 0.0 919 | w: 1.0 920 | } 921 | scale { 922 | x: 1.0 923 | y: 1.0 924 | z: 1.0 925 | w: 1.0 926 | } 927 | size { 928 | x: 200.0 929 | y: 100.0 930 | z: 0.0 931 | w: 1.0 932 | } 933 | color { 934 | x: 1.0 935 | y: 1.0 936 | z: 1.0 937 | w: 1.0 938 | } 939 | type: TYPE_TEXT 940 | blend_mode: BLEND_MODE_ALPHA 941 | text: "Win" 942 | font: "font" 943 | id: "win/text" 944 | xanchor: XANCHOR_NONE 945 | yanchor: YANCHOR_NONE 946 | pivot: PIVOT_CENTER 947 | outline { 948 | x: 0.0 949 | y: 0.0 950 | z: 0.0 951 | w: 1.0 952 | } 953 | shadow { 954 | x: 1.0 955 | y: 1.0 956 | z: 1.0 957 | w: 1.0 958 | } 959 | adjust_mode: ADJUST_MODE_FIT 960 | line_break: false 961 | parent: "win" 962 | layer: "" 963 | inherit_alpha: true 964 | alpha: 1.0 965 | outline_alpha: 1.0 966 | shadow_alpha: 1.0 967 | overridden_fields: 8 968 | template_node_child: true 969 | text_leading: 1.0 970 | text_tracking: 0.0 971 | } 972 | nodes { 973 | position { 974 | x: 600.0 975 | y: 150.0 976 | z: 0.0 977 | w: 1.0 978 | } 979 | rotation { 980 | x: 0.0 981 | y: 0.0 982 | z: 0.0 983 | w: 1.0 984 | } 985 | scale { 986 | x: 1.0 987 | y: 1.0 988 | z: 1.0 989 | w: 1.0 990 | } 991 | size { 992 | x: 200.0 993 | y: 100.0 994 | z: 0.0 995 | w: 1.0 996 | } 997 | color { 998 | x: 1.0 999 | y: 1.0 1000 | z: 1.0 1001 | w: 1.0 1002 | } 1003 | type: TYPE_TEMPLATE 1004 | id: "fail" 1005 | layer: "layer1" 1006 | inherit_alpha: true 1007 | alpha: 1.0 1008 | template: "/common/button.gui" 1009 | template_node_child: false 1010 | } 1011 | nodes { 1012 | position { 1013 | x: 0.0 1014 | y: 0.0 1015 | z: 0.0 1016 | w: 1.0 1017 | } 1018 | rotation { 1019 | x: 0.0 1020 | y: 0.0 1021 | z: 0.0 1022 | w: 1.0 1023 | } 1024 | scale { 1025 | x: 1.0 1026 | y: 1.0 1027 | z: 1.0 1028 | w: 1.0 1029 | } 1030 | size { 1031 | x: 200.0 1032 | y: 100.0 1033 | z: 0.0 1034 | w: 1.0 1035 | } 1036 | color { 1037 | x: 1.0 1038 | y: 1.0 1039 | z: 1.0 1040 | w: 1.0 1041 | } 1042 | type: TYPE_BOX 1043 | blend_mode: BLEND_MODE_ALPHA 1044 | texture: "buttons/button" 1045 | id: "fail/box" 1046 | xanchor: XANCHOR_NONE 1047 | yanchor: YANCHOR_NONE 1048 | pivot: PIVOT_CENTER 1049 | adjust_mode: ADJUST_MODE_FIT 1050 | parent: "fail" 1051 | layer: "" 1052 | inherit_alpha: true 1053 | slice9 { 1054 | x: 20.0 1055 | y: 20.0 1056 | z: 40.0 1057 | w: 40.0 1058 | } 1059 | clipping_mode: CLIPPING_MODE_NONE 1060 | clipping_visible: true 1061 | clipping_inverted: false 1062 | alpha: 1.0 1063 | overridden_fields: 4 1064 | template_node_child: true 1065 | size_mode: SIZE_MODE_MANUAL 1066 | } 1067 | nodes { 1068 | position { 1069 | x: 0.0 1070 | y: 0.0 1071 | z: 0.0 1072 | w: 1.0 1073 | } 1074 | rotation { 1075 | x: 0.0 1076 | y: 0.0 1077 | z: 0.0 1078 | w: 1.0 1079 | } 1080 | scale { 1081 | x: 1.0 1082 | y: 1.0 1083 | z: 1.0 1084 | w: 1.0 1085 | } 1086 | size { 1087 | x: 200.0 1088 | y: 100.0 1089 | z: 0.0 1090 | w: 1.0 1091 | } 1092 | color { 1093 | x: 0.0 1094 | y: 0.0 1095 | z: 0.0 1096 | w: 1.0 1097 | } 1098 | type: TYPE_BOX 1099 | blend_mode: BLEND_MODE_ALPHA 1100 | texture: "buttons/button" 1101 | id: "fail/pressed" 1102 | xanchor: XANCHOR_NONE 1103 | yanchor: YANCHOR_NONE 1104 | pivot: PIVOT_CENTER 1105 | adjust_mode: ADJUST_MODE_FIT 1106 | parent: "fail/box" 1107 | layer: "" 1108 | inherit_alpha: true 1109 | slice9 { 1110 | x: 20.0 1111 | y: 20.0 1112 | z: 40.0 1113 | w: 40.0 1114 | } 1115 | clipping_mode: CLIPPING_MODE_NONE 1116 | clipping_visible: true 1117 | clipping_inverted: false 1118 | alpha: 0.0 1119 | overridden_fields: 4 1120 | template_node_child: true 1121 | size_mode: SIZE_MODE_MANUAL 1122 | } 1123 | nodes { 1124 | position { 1125 | x: 0.0 1126 | y: 0.0 1127 | z: 0.0 1128 | w: 1.0 1129 | } 1130 | rotation { 1131 | x: 0.0 1132 | y: 0.0 1133 | z: 0.0 1134 | w: 1.0 1135 | } 1136 | scale { 1137 | x: 1.0 1138 | y: 1.0 1139 | z: 1.0 1140 | w: 1.0 1141 | } 1142 | size { 1143 | x: 200.0 1144 | y: 100.0 1145 | z: 0.0 1146 | w: 1.0 1147 | } 1148 | color { 1149 | x: 1.0 1150 | y: 1.0 1151 | z: 1.0 1152 | w: 1.0 1153 | } 1154 | type: TYPE_TEXT 1155 | blend_mode: BLEND_MODE_ALPHA 1156 | text: "Fail" 1157 | font: "font" 1158 | id: "fail/text" 1159 | xanchor: XANCHOR_NONE 1160 | yanchor: YANCHOR_NONE 1161 | pivot: PIVOT_CENTER 1162 | outline { 1163 | x: 0.0 1164 | y: 0.0 1165 | z: 0.0 1166 | w: 1.0 1167 | } 1168 | shadow { 1169 | x: 1.0 1170 | y: 1.0 1171 | z: 1.0 1172 | w: 1.0 1173 | } 1174 | adjust_mode: ADJUST_MODE_FIT 1175 | line_break: false 1176 | parent: "fail" 1177 | layer: "" 1178 | inherit_alpha: true 1179 | alpha: 1.0 1180 | outline_alpha: 1.0 1181 | shadow_alpha: 1.0 1182 | overridden_fields: 8 1183 | template_node_child: true 1184 | text_leading: 1.0 1185 | text_tracking: 0.0 1186 | } 1187 | nodes { 1188 | position { 1189 | x: 400.0 1190 | y: 300.0 1191 | z: 0.0 1192 | w: 1.0 1193 | } 1194 | rotation { 1195 | x: 0.0 1196 | y: 0.0 1197 | z: 0.0 1198 | w: 1.0 1199 | } 1200 | scale { 1201 | x: 1.0 1202 | y: 1.0 1203 | z: 1.0 1204 | w: 1.0 1205 | } 1206 | size { 1207 | x: 800.0 1208 | y: 600.0 1209 | z: 0.0 1210 | w: 1.0 1211 | } 1212 | color { 1213 | x: 0.0 1214 | y: 0.0 1215 | z: 0.0 1216 | w: 1.0 1217 | } 1218 | type: TYPE_BOX 1219 | blend_mode: BLEND_MODE_ALPHA 1220 | texture: "" 1221 | id: "fader" 1222 | xanchor: XANCHOR_NONE 1223 | yanchor: YANCHOR_NONE 1224 | pivot: PIVOT_CENTER 1225 | adjust_mode: ADJUST_MODE_FIT 1226 | layer: "layer2" 1227 | inherit_alpha: true 1228 | slice9 { 1229 | x: 0.0 1230 | y: 0.0 1231 | z: 0.0 1232 | w: 0.0 1233 | } 1234 | clipping_mode: CLIPPING_MODE_NONE 1235 | clipping_visible: true 1236 | clipping_inverted: false 1237 | alpha: 0.0 1238 | template_node_child: false 1239 | size_mode: SIZE_MODE_MANUAL 1240 | } 1241 | layers { 1242 | name: "layer1" 1243 | } 1244 | layers { 1245 | name: "layer2" 1246 | } 1247 | material: "/builtins/materials/gui.material" 1248 | adjust_reference: ADJUST_REFERENCE_PARENT 1249 | max_nodes: 512 1250 | -------------------------------------------------------------------------------- /scenes/level_selector/level_selector.gui: -------------------------------------------------------------------------------- 1 | script: "/scenes/level_selector/level_selector.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 1.0 7 | } 8 | nodes { 9 | position { 10 | x: 650.0 11 | y: 550.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | rotation { 16 | x: 0.0 17 | y: 0.0 18 | z: 0.0 19 | w: 1.0 20 | } 21 | scale { 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | w: 1.0 26 | } 27 | size { 28 | x: 200.0 29 | y: 100.0 30 | z: 0.0 31 | w: 1.0 32 | } 33 | color { 34 | x: 1.0 35 | y: 1.0 36 | z: 1.0 37 | w: 1.0 38 | } 39 | type: TYPE_TEMPLATE 40 | id: "settings" 41 | layer: "layer1" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/common/button.gui" 45 | template_node_child: false 46 | } 47 | nodes { 48 | position { 49 | x: 0.0 50 | y: 0.0 51 | z: 0.0 52 | w: 1.0 53 | } 54 | rotation { 55 | x: 0.0 56 | y: 0.0 57 | z: 0.0 58 | w: 1.0 59 | } 60 | scale { 61 | x: 1.0 62 | y: 1.0 63 | z: 1.0 64 | w: 1.0 65 | } 66 | size { 67 | x: 200.0 68 | y: 60.0 69 | z: 0.0 70 | w: 1.0 71 | } 72 | color { 73 | x: 1.0 74 | y: 1.0 75 | z: 1.0 76 | w: 1.0 77 | } 78 | type: TYPE_BOX 79 | blend_mode: BLEND_MODE_ALPHA 80 | texture: "buttons/button" 81 | id: "settings/box" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "settings" 87 | layer: "" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 20.0 91 | y: 20.0 92 | z: 40.0 93 | w: 40.0 94 | } 95 | clipping_mode: CLIPPING_MODE_NONE 96 | clipping_visible: true 97 | clipping_inverted: false 98 | alpha: 1.0 99 | overridden_fields: 4 100 | template_node_child: true 101 | size_mode: SIZE_MODE_MANUAL 102 | } 103 | nodes { 104 | position { 105 | x: 0.0 106 | y: 0.0 107 | z: 0.0 108 | w: 1.0 109 | } 110 | rotation { 111 | x: 0.0 112 | y: 0.0 113 | z: 0.0 114 | w: 1.0 115 | } 116 | scale { 117 | x: 1.0 118 | y: 1.0 119 | z: 1.0 120 | w: 1.0 121 | } 122 | size { 123 | x: 200.0 124 | y: 60.0 125 | z: 0.0 126 | w: 1.0 127 | } 128 | color { 129 | x: 0.0 130 | y: 0.0 131 | z: 0.0 132 | w: 1.0 133 | } 134 | type: TYPE_BOX 135 | blend_mode: BLEND_MODE_ALPHA 136 | texture: "buttons/button" 137 | id: "settings/pressed" 138 | xanchor: XANCHOR_NONE 139 | yanchor: YANCHOR_NONE 140 | pivot: PIVOT_CENTER 141 | adjust_mode: ADJUST_MODE_FIT 142 | parent: "settings/box" 143 | layer: "" 144 | inherit_alpha: true 145 | slice9 { 146 | x: 20.0 147 | y: 20.0 148 | z: 40.0 149 | w: 40.0 150 | } 151 | clipping_mode: CLIPPING_MODE_NONE 152 | clipping_visible: true 153 | clipping_inverted: false 154 | alpha: 0.0 155 | overridden_fields: 4 156 | template_node_child: true 157 | size_mode: SIZE_MODE_MANUAL 158 | } 159 | nodes { 160 | position { 161 | x: 0.0 162 | y: 0.0 163 | z: 0.0 164 | w: 1.0 165 | } 166 | rotation { 167 | x: 0.0 168 | y: 0.0 169 | z: 0.0 170 | w: 1.0 171 | } 172 | scale { 173 | x: 1.0 174 | y: 1.0 175 | z: 1.0 176 | w: 1.0 177 | } 178 | size { 179 | x: 200.0 180 | y: 100.0 181 | z: 0.0 182 | w: 1.0 183 | } 184 | color { 185 | x: 1.0 186 | y: 1.0 187 | z: 1.0 188 | w: 1.0 189 | } 190 | type: TYPE_TEXT 191 | blend_mode: BLEND_MODE_ALPHA 192 | text: "Settings" 193 | font: "font" 194 | id: "settings/text" 195 | xanchor: XANCHOR_NONE 196 | yanchor: YANCHOR_NONE 197 | pivot: PIVOT_CENTER 198 | outline { 199 | x: 0.0 200 | y: 0.0 201 | z: 0.0 202 | w: 1.0 203 | } 204 | shadow { 205 | x: 1.0 206 | y: 1.0 207 | z: 1.0 208 | w: 1.0 209 | } 210 | adjust_mode: ADJUST_MODE_FIT 211 | line_break: false 212 | parent: "settings" 213 | layer: "" 214 | inherit_alpha: true 215 | alpha: 1.0 216 | outline_alpha: 1.0 217 | shadow_alpha: 1.0 218 | overridden_fields: 8 219 | template_node_child: true 220 | text_leading: 1.0 221 | text_tracking: 0.0 222 | } 223 | nodes { 224 | position { 225 | x: 150.0 226 | y: 550.0 227 | z: 0.0 228 | w: 1.0 229 | } 230 | rotation { 231 | x: 0.0 232 | y: 0.0 233 | z: 0.0 234 | w: 1.0 235 | } 236 | scale { 237 | x: 1.0 238 | y: 1.0 239 | z: 1.0 240 | w: 1.0 241 | } 242 | size { 243 | x: 200.0 244 | y: 100.0 245 | z: 0.0 246 | w: 1.0 247 | } 248 | color { 249 | x: 1.0 250 | y: 1.0 251 | z: 1.0 252 | w: 1.0 253 | } 254 | type: TYPE_TEMPLATE 255 | id: "back" 256 | layer: "layer1" 257 | inherit_alpha: true 258 | alpha: 1.0 259 | template: "/common/button.gui" 260 | template_node_child: false 261 | } 262 | nodes { 263 | position { 264 | x: 0.0 265 | y: 0.0 266 | z: 0.0 267 | w: 1.0 268 | } 269 | rotation { 270 | x: 0.0 271 | y: 0.0 272 | z: 0.0 273 | w: 1.0 274 | } 275 | scale { 276 | x: 1.0 277 | y: 1.0 278 | z: 1.0 279 | w: 1.0 280 | } 281 | size { 282 | x: 200.0 283 | y: 60.0 284 | z: 0.0 285 | w: 1.0 286 | } 287 | color { 288 | x: 1.0 289 | y: 1.0 290 | z: 1.0 291 | w: 1.0 292 | } 293 | type: TYPE_BOX 294 | blend_mode: BLEND_MODE_ALPHA 295 | texture: "buttons/button" 296 | id: "back/box" 297 | xanchor: XANCHOR_NONE 298 | yanchor: YANCHOR_NONE 299 | pivot: PIVOT_CENTER 300 | adjust_mode: ADJUST_MODE_FIT 301 | parent: "back" 302 | layer: "" 303 | inherit_alpha: true 304 | slice9 { 305 | x: 20.0 306 | y: 20.0 307 | z: 40.0 308 | w: 40.0 309 | } 310 | clipping_mode: CLIPPING_MODE_NONE 311 | clipping_visible: true 312 | clipping_inverted: false 313 | alpha: 1.0 314 | overridden_fields: 4 315 | template_node_child: true 316 | size_mode: SIZE_MODE_MANUAL 317 | } 318 | nodes { 319 | position { 320 | x: 0.0 321 | y: 0.0 322 | z: 0.0 323 | w: 1.0 324 | } 325 | rotation { 326 | x: 0.0 327 | y: 0.0 328 | z: 0.0 329 | w: 1.0 330 | } 331 | scale { 332 | x: 1.0 333 | y: 1.0 334 | z: 1.0 335 | w: 1.0 336 | } 337 | size { 338 | x: 200.0 339 | y: 60.0 340 | z: 0.0 341 | w: 1.0 342 | } 343 | color { 344 | x: 0.0 345 | y: 0.0 346 | z: 0.0 347 | w: 1.0 348 | } 349 | type: TYPE_BOX 350 | blend_mode: BLEND_MODE_ALPHA 351 | texture: "buttons/button" 352 | id: "back/pressed" 353 | xanchor: XANCHOR_NONE 354 | yanchor: YANCHOR_NONE 355 | pivot: PIVOT_CENTER 356 | adjust_mode: ADJUST_MODE_FIT 357 | parent: "back/box" 358 | layer: "" 359 | inherit_alpha: true 360 | slice9 { 361 | x: 20.0 362 | y: 20.0 363 | z: 40.0 364 | w: 40.0 365 | } 366 | clipping_mode: CLIPPING_MODE_NONE 367 | clipping_visible: true 368 | clipping_inverted: false 369 | alpha: 0.0 370 | overridden_fields: 4 371 | template_node_child: true 372 | size_mode: SIZE_MODE_MANUAL 373 | } 374 | nodes { 375 | position { 376 | x: 0.0 377 | y: 0.0 378 | z: 0.0 379 | w: 1.0 380 | } 381 | rotation { 382 | x: 0.0 383 | y: 0.0 384 | z: 0.0 385 | w: 1.0 386 | } 387 | scale { 388 | x: 1.0 389 | y: 1.0 390 | z: 1.0 391 | w: 1.0 392 | } 393 | size { 394 | x: 200.0 395 | y: 100.0 396 | z: 0.0 397 | w: 1.0 398 | } 399 | color { 400 | x: 1.0 401 | y: 1.0 402 | z: 1.0 403 | w: 1.0 404 | } 405 | type: TYPE_TEXT 406 | blend_mode: BLEND_MODE_ALPHA 407 | text: "Back" 408 | font: "font" 409 | id: "back/text" 410 | xanchor: XANCHOR_NONE 411 | yanchor: YANCHOR_NONE 412 | pivot: PIVOT_CENTER 413 | outline { 414 | x: 0.0 415 | y: 0.0 416 | z: 0.0 417 | w: 1.0 418 | } 419 | shadow { 420 | x: 1.0 421 | y: 1.0 422 | z: 1.0 423 | w: 1.0 424 | } 425 | adjust_mode: ADJUST_MODE_FIT 426 | line_break: false 427 | parent: "back" 428 | layer: "" 429 | inherit_alpha: true 430 | alpha: 1.0 431 | outline_alpha: 1.0 432 | shadow_alpha: 1.0 433 | overridden_fields: 8 434 | template_node_child: true 435 | text_leading: 1.0 436 | text_tracking: 0.0 437 | } 438 | nodes { 439 | position { 440 | x: 400.0 441 | y: 350.0 442 | z: 0.0 443 | w: 1.0 444 | } 445 | rotation { 446 | x: 0.0 447 | y: 0.0 448 | z: 0.0 449 | w: 1.0 450 | } 451 | scale { 452 | x: 1.0 453 | y: 1.0 454 | z: 1.0 455 | w: 1.0 456 | } 457 | size { 458 | x: 200.0 459 | y: 100.0 460 | z: 0.0 461 | w: 1.0 462 | } 463 | color { 464 | x: 1.0 465 | y: 1.0 466 | z: 1.0 467 | w: 1.0 468 | } 469 | type: TYPE_TEMPLATE 470 | id: "info" 471 | layer: "layer1" 472 | inherit_alpha: true 473 | alpha: 1.0 474 | template: "/common/label.gui" 475 | template_node_child: false 476 | } 477 | nodes { 478 | position { 479 | x: 0.0 480 | y: 0.0 481 | z: 0.0 482 | w: 1.0 483 | } 484 | rotation { 485 | x: 0.0 486 | y: 0.0 487 | z: 0.0 488 | w: 1.0 489 | } 490 | scale { 491 | x: 1.0 492 | y: 1.0 493 | z: 1.0 494 | w: 1.0 495 | } 496 | size { 497 | x: 400.0 498 | y: 60.0 499 | z: 0.0 500 | w: 1.0 501 | } 502 | color { 503 | x: 1.0 504 | y: 1.0 505 | z: 1.0 506 | w: 1.0 507 | } 508 | type: TYPE_BOX 509 | blend_mode: BLEND_MODE_ALPHA 510 | texture: "objects/textbox" 511 | id: "info/box" 512 | xanchor: XANCHOR_NONE 513 | yanchor: YANCHOR_NONE 514 | pivot: PIVOT_CENTER 515 | adjust_mode: ADJUST_MODE_FIT 516 | parent: "info" 517 | layer: "" 518 | inherit_alpha: true 519 | slice9 { 520 | x: 8.0 521 | y: 8.0 522 | z: 8.0 523 | w: 8.0 524 | } 525 | clipping_mode: CLIPPING_MODE_NONE 526 | clipping_visible: true 527 | clipping_inverted: false 528 | alpha: 1.0 529 | overridden_fields: 4 530 | template_node_child: true 531 | size_mode: SIZE_MODE_MANUAL 532 | } 533 | nodes { 534 | position { 535 | x: 0.0 536 | y: 0.0 537 | z: 0.0 538 | w: 1.0 539 | } 540 | rotation { 541 | x: 0.0 542 | y: 0.0 543 | z: 0.0 544 | w: 1.0 545 | } 546 | scale { 547 | x: 1.0 548 | y: 1.0 549 | z: 1.0 550 | w: 1.0 551 | } 552 | size { 553 | x: 400.0 554 | y: 60.0 555 | z: 0.0 556 | w: 1.0 557 | } 558 | color { 559 | x: 1.0 560 | y: 1.0 561 | z: 1.0 562 | w: 1.0 563 | } 564 | type: TYPE_TEXT 565 | blend_mode: BLEND_MODE_ALPHA 566 | text: "text" 567 | font: "menu" 568 | id: "info/text" 569 | xanchor: XANCHOR_NONE 570 | yanchor: YANCHOR_NONE 571 | pivot: PIVOT_CENTER 572 | outline { 573 | x: 0.0 574 | y: 0.0 575 | z: 0.0 576 | w: 1.0 577 | } 578 | shadow { 579 | x: 1.0 580 | y: 1.0 581 | z: 1.0 582 | w: 1.0 583 | } 584 | adjust_mode: ADJUST_MODE_FIT 585 | line_break: true 586 | parent: "info/box" 587 | layer: "" 588 | inherit_alpha: true 589 | alpha: 1.0 590 | outline_alpha: 1.0 591 | shadow_alpha: 1.0 592 | overridden_fields: 4 593 | template_node_child: true 594 | text_leading: 1.0 595 | text_tracking: 0.0 596 | } 597 | nodes { 598 | position { 599 | x: 400.0 600 | y: 450.0 601 | z: 0.0 602 | w: 1.0 603 | } 604 | rotation { 605 | x: 0.0 606 | y: 0.0 607 | z: 0.0 608 | w: 1.0 609 | } 610 | scale { 611 | x: 1.0 612 | y: 1.0 613 | z: 1.0 614 | w: 1.0 615 | } 616 | size { 617 | x: 200.0 618 | y: 100.0 619 | z: 0.0 620 | w: 1.0 621 | } 622 | color { 623 | x: 1.0 624 | y: 1.0 625 | z: 1.0 626 | w: 1.0 627 | } 628 | type: TYPE_TEMPLATE 629 | id: "label" 630 | layer: "layer1" 631 | inherit_alpha: true 632 | alpha: 1.0 633 | template: "/common/label.gui" 634 | template_node_child: false 635 | } 636 | nodes { 637 | position { 638 | x: 0.0 639 | y: 0.0 640 | z: 0.0 641 | w: 1.0 642 | } 643 | rotation { 644 | x: 0.0 645 | y: 0.0 646 | z: 0.0 647 | w: 1.0 648 | } 649 | scale { 650 | x: 1.0 651 | y: 1.0 652 | z: 1.0 653 | w: 1.0 654 | } 655 | size { 656 | x: 700.0 657 | y: 100.0 658 | z: 0.0 659 | w: 1.0 660 | } 661 | color { 662 | x: 1.0 663 | y: 1.0 664 | z: 1.0 665 | w: 1.0 666 | } 667 | type: TYPE_BOX 668 | blend_mode: BLEND_MODE_ALPHA 669 | texture: "objects/textbox" 670 | id: "label/box" 671 | xanchor: XANCHOR_NONE 672 | yanchor: YANCHOR_NONE 673 | pivot: PIVOT_CENTER 674 | adjust_mode: ADJUST_MODE_FIT 675 | parent: "label" 676 | layer: "" 677 | inherit_alpha: true 678 | slice9 { 679 | x: 8.0 680 | y: 8.0 681 | z: 8.0 682 | w: 8.0 683 | } 684 | clipping_mode: CLIPPING_MODE_NONE 685 | clipping_visible: true 686 | clipping_inverted: false 687 | alpha: 1.0 688 | overridden_fields: 4 689 | template_node_child: true 690 | size_mode: SIZE_MODE_MANUAL 691 | } 692 | nodes { 693 | position { 694 | x: 0.0 695 | y: 0.0 696 | z: 0.0 697 | w: 1.0 698 | } 699 | rotation { 700 | x: 0.0 701 | y: 0.0 702 | z: 0.0 703 | w: 1.0 704 | } 705 | scale { 706 | x: 1.0 707 | y: 1.0 708 | z: 1.0 709 | w: 1.0 710 | } 711 | size { 712 | x: 650.0 713 | y: 100.0 714 | z: 0.0 715 | w: 1.0 716 | } 717 | color { 718 | x: 1.0 719 | y: 1.0 720 | z: 1.0 721 | w: 1.0 722 | } 723 | type: TYPE_TEXT 724 | blend_mode: BLEND_MODE_ALPHA 725 | text: "This scene was displayed according to routing rules. It uses state to save selected world and counts of wins and fails." 726 | font: "text" 727 | id: "label/text" 728 | xanchor: XANCHOR_NONE 729 | yanchor: YANCHOR_NONE 730 | pivot: PIVOT_CENTER 731 | outline { 732 | x: 0.0 733 | y: 0.0 734 | z: 0.0 735 | w: 1.0 736 | } 737 | shadow { 738 | x: 1.0 739 | y: 1.0 740 | z: 1.0 741 | w: 1.0 742 | } 743 | adjust_mode: ADJUST_MODE_FIT 744 | line_break: true 745 | parent: "label/box" 746 | layer: "" 747 | inherit_alpha: true 748 | alpha: 1.0 749 | outline_alpha: 1.0 750 | shadow_alpha: 1.0 751 | overridden_fields: 4 752 | overridden_fields: 8 753 | overridden_fields: 10 754 | template_node_child: true 755 | text_leading: 1.0 756 | text_tracking: 0.0 757 | } 758 | nodes { 759 | position { 760 | x: 150.0 761 | y: 250.0 762 | z: 0.0 763 | w: 1.0 764 | } 765 | rotation { 766 | x: 0.0 767 | y: 0.0 768 | z: 0.0 769 | w: 1.0 770 | } 771 | scale { 772 | x: 1.0 773 | y: 1.0 774 | z: 1.0 775 | w: 1.0 776 | } 777 | size { 778 | x: 200.0 779 | y: 100.0 780 | z: 0.0 781 | w: 1.0 782 | } 783 | color { 784 | x: 1.0 785 | y: 1.0 786 | z: 1.0 787 | w: 1.0 788 | } 789 | type: TYPE_TEMPLATE 790 | id: "world1" 791 | layer: "" 792 | inherit_alpha: true 793 | alpha: 1.0 794 | template: "/common/button.gui" 795 | template_node_child: false 796 | } 797 | nodes { 798 | position { 799 | x: 0.0 800 | y: 0.0 801 | z: 0.0 802 | w: 1.0 803 | } 804 | rotation { 805 | x: 0.0 806 | y: 0.0 807 | z: 0.0 808 | w: 1.0 809 | } 810 | scale { 811 | x: 1.0 812 | y: 1.0 813 | z: 1.0 814 | w: 1.0 815 | } 816 | size { 817 | x: 200.0 818 | y: 100.0 819 | z: 0.0 820 | w: 1.0 821 | } 822 | color { 823 | x: 1.0 824 | y: 1.0 825 | z: 1.0 826 | w: 1.0 827 | } 828 | type: TYPE_BOX 829 | blend_mode: BLEND_MODE_ALPHA 830 | texture: "buttons/button" 831 | id: "world1/box" 832 | xanchor: XANCHOR_NONE 833 | yanchor: YANCHOR_NONE 834 | pivot: PIVOT_CENTER 835 | adjust_mode: ADJUST_MODE_FIT 836 | parent: "world1" 837 | layer: "" 838 | inherit_alpha: true 839 | slice9 { 840 | x: 20.0 841 | y: 20.0 842 | z: 40.0 843 | w: 40.0 844 | } 845 | clipping_mode: CLIPPING_MODE_NONE 846 | clipping_visible: true 847 | clipping_inverted: false 848 | alpha: 1.0 849 | overridden_fields: 4 850 | template_node_child: true 851 | size_mode: SIZE_MODE_MANUAL 852 | } 853 | nodes { 854 | position { 855 | x: 0.0 856 | y: 0.0 857 | z: 0.0 858 | w: 1.0 859 | } 860 | rotation { 861 | x: 0.0 862 | y: 0.0 863 | z: 0.0 864 | w: 1.0 865 | } 866 | scale { 867 | x: 1.0 868 | y: 1.0 869 | z: 1.0 870 | w: 1.0 871 | } 872 | size { 873 | x: 200.0 874 | y: 100.0 875 | z: 0.0 876 | w: 1.0 877 | } 878 | color { 879 | x: 0.0 880 | y: 0.0 881 | z: 0.0 882 | w: 1.0 883 | } 884 | type: TYPE_BOX 885 | blend_mode: BLEND_MODE_ALPHA 886 | texture: "buttons/button" 887 | id: "world1/pressed" 888 | xanchor: XANCHOR_NONE 889 | yanchor: YANCHOR_NONE 890 | pivot: PIVOT_CENTER 891 | adjust_mode: ADJUST_MODE_FIT 892 | parent: "world1/box" 893 | layer: "" 894 | inherit_alpha: true 895 | slice9 { 896 | x: 20.0 897 | y: 20.0 898 | z: 40.0 899 | w: 40.0 900 | } 901 | clipping_mode: CLIPPING_MODE_NONE 902 | clipping_visible: true 903 | clipping_inverted: false 904 | alpha: 0.0 905 | overridden_fields: 4 906 | template_node_child: true 907 | size_mode: SIZE_MODE_MANUAL 908 | } 909 | nodes { 910 | position { 911 | x: 0.0 912 | y: 0.0 913 | z: 0.0 914 | w: 1.0 915 | } 916 | rotation { 917 | x: 0.0 918 | y: 0.0 919 | z: 0.0 920 | w: 1.0 921 | } 922 | scale { 923 | x: 1.0 924 | y: 1.0 925 | z: 1.0 926 | w: 1.0 927 | } 928 | size { 929 | x: 200.0 930 | y: 100.0 931 | z: 0.0 932 | w: 1.0 933 | } 934 | color { 935 | x: 1.0 936 | y: 1.0 937 | z: 1.0 938 | w: 1.0 939 | } 940 | type: TYPE_TEXT 941 | blend_mode: BLEND_MODE_ALPHA 942 | text: "World 1" 943 | font: "font" 944 | id: "world1/text" 945 | xanchor: XANCHOR_NONE 946 | yanchor: YANCHOR_NONE 947 | pivot: PIVOT_CENTER 948 | outline { 949 | x: 0.0 950 | y: 0.0 951 | z: 0.0 952 | w: 1.0 953 | } 954 | shadow { 955 | x: 1.0 956 | y: 1.0 957 | z: 1.0 958 | w: 1.0 959 | } 960 | adjust_mode: ADJUST_MODE_FIT 961 | line_break: false 962 | parent: "world1" 963 | layer: "" 964 | inherit_alpha: true 965 | alpha: 1.0 966 | outline_alpha: 1.0 967 | shadow_alpha: 1.0 968 | overridden_fields: 8 969 | template_node_child: true 970 | text_leading: 1.0 971 | text_tracking: 0.0 972 | } 973 | nodes { 974 | position { 975 | x: 400.0 976 | y: 250.0 977 | z: 0.0 978 | w: 1.0 979 | } 980 | rotation { 981 | x: 0.0 982 | y: 0.0 983 | z: 0.0 984 | w: 1.0 985 | } 986 | scale { 987 | x: 1.0 988 | y: 1.0 989 | z: 1.0 990 | w: 1.0 991 | } 992 | size { 993 | x: 200.0 994 | y: 100.0 995 | z: 0.0 996 | w: 1.0 997 | } 998 | color { 999 | x: 1.0 1000 | y: 1.0 1001 | z: 1.0 1002 | w: 1.0 1003 | } 1004 | type: TYPE_TEMPLATE 1005 | id: "world2" 1006 | layer: "" 1007 | inherit_alpha: true 1008 | alpha: 1.0 1009 | template: "/common/button.gui" 1010 | template_node_child: false 1011 | } 1012 | nodes { 1013 | position { 1014 | x: 0.0 1015 | y: 0.0 1016 | z: 0.0 1017 | w: 1.0 1018 | } 1019 | rotation { 1020 | x: 0.0 1021 | y: 0.0 1022 | z: 0.0 1023 | w: 1.0 1024 | } 1025 | scale { 1026 | x: 1.0 1027 | y: 1.0 1028 | z: 1.0 1029 | w: 1.0 1030 | } 1031 | size { 1032 | x: 200.0 1033 | y: 100.0 1034 | z: 0.0 1035 | w: 1.0 1036 | } 1037 | color { 1038 | x: 1.0 1039 | y: 1.0 1040 | z: 1.0 1041 | w: 1.0 1042 | } 1043 | type: TYPE_BOX 1044 | blend_mode: BLEND_MODE_ALPHA 1045 | texture: "buttons/button" 1046 | id: "world2/box" 1047 | xanchor: XANCHOR_NONE 1048 | yanchor: YANCHOR_NONE 1049 | pivot: PIVOT_CENTER 1050 | adjust_mode: ADJUST_MODE_FIT 1051 | parent: "world2" 1052 | layer: "" 1053 | inherit_alpha: true 1054 | slice9 { 1055 | x: 20.0 1056 | y: 20.0 1057 | z: 40.0 1058 | w: 40.0 1059 | } 1060 | clipping_mode: CLIPPING_MODE_NONE 1061 | clipping_visible: true 1062 | clipping_inverted: false 1063 | alpha: 1.0 1064 | overridden_fields: 4 1065 | template_node_child: true 1066 | size_mode: SIZE_MODE_MANUAL 1067 | } 1068 | nodes { 1069 | position { 1070 | x: 0.0 1071 | y: 0.0 1072 | z: 0.0 1073 | w: 1.0 1074 | } 1075 | rotation { 1076 | x: 0.0 1077 | y: 0.0 1078 | z: 0.0 1079 | w: 1.0 1080 | } 1081 | scale { 1082 | x: 1.0 1083 | y: 1.0 1084 | z: 1.0 1085 | w: 1.0 1086 | } 1087 | size { 1088 | x: 200.0 1089 | y: 100.0 1090 | z: 0.0 1091 | w: 1.0 1092 | } 1093 | color { 1094 | x: 0.0 1095 | y: 0.0 1096 | z: 0.0 1097 | w: 1.0 1098 | } 1099 | type: TYPE_BOX 1100 | blend_mode: BLEND_MODE_ALPHA 1101 | texture: "buttons/button" 1102 | id: "world2/pressed" 1103 | xanchor: XANCHOR_NONE 1104 | yanchor: YANCHOR_NONE 1105 | pivot: PIVOT_CENTER 1106 | adjust_mode: ADJUST_MODE_FIT 1107 | parent: "world2/box" 1108 | layer: "" 1109 | inherit_alpha: true 1110 | slice9 { 1111 | x: 20.0 1112 | y: 20.0 1113 | z: 40.0 1114 | w: 40.0 1115 | } 1116 | clipping_mode: CLIPPING_MODE_NONE 1117 | clipping_visible: true 1118 | clipping_inverted: false 1119 | alpha: 0.0 1120 | overridden_fields: 4 1121 | template_node_child: true 1122 | size_mode: SIZE_MODE_MANUAL 1123 | } 1124 | nodes { 1125 | position { 1126 | x: 0.0 1127 | y: 0.0 1128 | z: 0.0 1129 | w: 1.0 1130 | } 1131 | rotation { 1132 | x: 0.0 1133 | y: 0.0 1134 | z: 0.0 1135 | w: 1.0 1136 | } 1137 | scale { 1138 | x: 1.0 1139 | y: 1.0 1140 | z: 1.0 1141 | w: 1.0 1142 | } 1143 | size { 1144 | x: 200.0 1145 | y: 100.0 1146 | z: 0.0 1147 | w: 1.0 1148 | } 1149 | color { 1150 | x: 1.0 1151 | y: 1.0 1152 | z: 1.0 1153 | w: 1.0 1154 | } 1155 | type: TYPE_TEXT 1156 | blend_mode: BLEND_MODE_ALPHA 1157 | text: "World 2" 1158 | font: "font" 1159 | id: "world2/text" 1160 | xanchor: XANCHOR_NONE 1161 | yanchor: YANCHOR_NONE 1162 | pivot: PIVOT_CENTER 1163 | outline { 1164 | x: 0.0 1165 | y: 0.0 1166 | z: 0.0 1167 | w: 1.0 1168 | } 1169 | shadow { 1170 | x: 1.0 1171 | y: 1.0 1172 | z: 1.0 1173 | w: 1.0 1174 | } 1175 | adjust_mode: ADJUST_MODE_FIT 1176 | line_break: false 1177 | parent: "world2" 1178 | layer: "" 1179 | inherit_alpha: true 1180 | alpha: 1.0 1181 | outline_alpha: 1.0 1182 | shadow_alpha: 1.0 1183 | overridden_fields: 8 1184 | template_node_child: true 1185 | text_leading: 1.0 1186 | text_tracking: 0.0 1187 | } 1188 | nodes { 1189 | position { 1190 | x: 650.0 1191 | y: 250.0 1192 | z: 0.0 1193 | w: 1.0 1194 | } 1195 | rotation { 1196 | x: 0.0 1197 | y: 0.0 1198 | z: 0.0 1199 | w: 1.0 1200 | } 1201 | scale { 1202 | x: 1.0 1203 | y: 1.0 1204 | z: 1.0 1205 | w: 1.0 1206 | } 1207 | size { 1208 | x: 200.0 1209 | y: 100.0 1210 | z: 0.0 1211 | w: 1.0 1212 | } 1213 | color { 1214 | x: 1.0 1215 | y: 1.0 1216 | z: 1.0 1217 | w: 1.0 1218 | } 1219 | type: TYPE_TEMPLATE 1220 | id: "world3" 1221 | layer: "" 1222 | inherit_alpha: true 1223 | alpha: 1.0 1224 | template: "/common/button.gui" 1225 | template_node_child: false 1226 | } 1227 | nodes { 1228 | position { 1229 | x: 0.0 1230 | y: 0.0 1231 | z: 0.0 1232 | w: 1.0 1233 | } 1234 | rotation { 1235 | x: 0.0 1236 | y: 0.0 1237 | z: 0.0 1238 | w: 1.0 1239 | } 1240 | scale { 1241 | x: 1.0 1242 | y: 1.0 1243 | z: 1.0 1244 | w: 1.0 1245 | } 1246 | size { 1247 | x: 200.0 1248 | y: 100.0 1249 | z: 0.0 1250 | w: 1.0 1251 | } 1252 | color { 1253 | x: 1.0 1254 | y: 1.0 1255 | z: 1.0 1256 | w: 1.0 1257 | } 1258 | type: TYPE_BOX 1259 | blend_mode: BLEND_MODE_ALPHA 1260 | texture: "buttons/button" 1261 | id: "world3/box" 1262 | xanchor: XANCHOR_NONE 1263 | yanchor: YANCHOR_NONE 1264 | pivot: PIVOT_CENTER 1265 | adjust_mode: ADJUST_MODE_FIT 1266 | parent: "world3" 1267 | layer: "" 1268 | inherit_alpha: true 1269 | slice9 { 1270 | x: 20.0 1271 | y: 20.0 1272 | z: 40.0 1273 | w: 40.0 1274 | } 1275 | clipping_mode: CLIPPING_MODE_NONE 1276 | clipping_visible: true 1277 | clipping_inverted: false 1278 | alpha: 1.0 1279 | overridden_fields: 4 1280 | template_node_child: true 1281 | size_mode: SIZE_MODE_MANUAL 1282 | } 1283 | nodes { 1284 | position { 1285 | x: 0.0 1286 | y: 0.0 1287 | z: 0.0 1288 | w: 1.0 1289 | } 1290 | rotation { 1291 | x: 0.0 1292 | y: 0.0 1293 | z: 0.0 1294 | w: 1.0 1295 | } 1296 | scale { 1297 | x: 1.0 1298 | y: 1.0 1299 | z: 1.0 1300 | w: 1.0 1301 | } 1302 | size { 1303 | x: 200.0 1304 | y: 100.0 1305 | z: 0.0 1306 | w: 1.0 1307 | } 1308 | color { 1309 | x: 0.0 1310 | y: 0.0 1311 | z: 0.0 1312 | w: 1.0 1313 | } 1314 | type: TYPE_BOX 1315 | blend_mode: BLEND_MODE_ALPHA 1316 | texture: "buttons/button" 1317 | id: "world3/pressed" 1318 | xanchor: XANCHOR_NONE 1319 | yanchor: YANCHOR_NONE 1320 | pivot: PIVOT_CENTER 1321 | adjust_mode: ADJUST_MODE_FIT 1322 | parent: "world3/box" 1323 | layer: "" 1324 | inherit_alpha: true 1325 | slice9 { 1326 | x: 20.0 1327 | y: 20.0 1328 | z: 40.0 1329 | w: 40.0 1330 | } 1331 | clipping_mode: CLIPPING_MODE_NONE 1332 | clipping_visible: true 1333 | clipping_inverted: false 1334 | alpha: 0.0 1335 | overridden_fields: 4 1336 | template_node_child: true 1337 | size_mode: SIZE_MODE_MANUAL 1338 | } 1339 | nodes { 1340 | position { 1341 | x: 0.0 1342 | y: 0.0 1343 | z: 0.0 1344 | w: 1.0 1345 | } 1346 | rotation { 1347 | x: 0.0 1348 | y: 0.0 1349 | z: 0.0 1350 | w: 1.0 1351 | } 1352 | scale { 1353 | x: 1.0 1354 | y: 1.0 1355 | z: 1.0 1356 | w: 1.0 1357 | } 1358 | size { 1359 | x: 200.0 1360 | y: 100.0 1361 | z: 0.0 1362 | w: 1.0 1363 | } 1364 | color { 1365 | x: 1.0 1366 | y: 1.0 1367 | z: 1.0 1368 | w: 1.0 1369 | } 1370 | type: TYPE_TEXT 1371 | blend_mode: BLEND_MODE_ALPHA 1372 | text: "World 3" 1373 | font: "font" 1374 | id: "world3/text" 1375 | xanchor: XANCHOR_NONE 1376 | yanchor: YANCHOR_NONE 1377 | pivot: PIVOT_CENTER 1378 | outline { 1379 | x: 0.0 1380 | y: 0.0 1381 | z: 0.0 1382 | w: 1.0 1383 | } 1384 | shadow { 1385 | x: 1.0 1386 | y: 1.0 1387 | z: 1.0 1388 | w: 1.0 1389 | } 1390 | adjust_mode: ADJUST_MODE_FIT 1391 | line_break: false 1392 | parent: "world3" 1393 | layer: "" 1394 | inherit_alpha: true 1395 | alpha: 1.0 1396 | outline_alpha: 1.0 1397 | shadow_alpha: 1.0 1398 | overridden_fields: 8 1399 | template_node_child: true 1400 | text_leading: 1.0 1401 | text_tracking: 0.0 1402 | } 1403 | nodes { 1404 | position { 1405 | x: 150.0 1406 | y: 100.0 1407 | z: 0.0 1408 | w: 1.0 1409 | } 1410 | rotation { 1411 | x: 0.0 1412 | y: 0.0 1413 | z: 0.0 1414 | w: 1.0 1415 | } 1416 | scale { 1417 | x: 1.0 1418 | y: 1.0 1419 | z: 1.0 1420 | w: 1.0 1421 | } 1422 | size { 1423 | x: 200.0 1424 | y: 100.0 1425 | z: 0.0 1426 | w: 1.0 1427 | } 1428 | color { 1429 | x: 1.0 1430 | y: 1.0 1431 | z: 1.0 1432 | w: 1.0 1433 | } 1434 | type: TYPE_TEMPLATE 1435 | id: "level1" 1436 | layer: "" 1437 | inherit_alpha: true 1438 | alpha: 1.0 1439 | template: "/common/button.gui" 1440 | template_node_child: false 1441 | } 1442 | nodes { 1443 | position { 1444 | x: 0.0 1445 | y: 0.0 1446 | z: 0.0 1447 | w: 1.0 1448 | } 1449 | rotation { 1450 | x: 0.0 1451 | y: 0.0 1452 | z: 0.0 1453 | w: 1.0 1454 | } 1455 | scale { 1456 | x: 1.0 1457 | y: 1.0 1458 | z: 1.0 1459 | w: 1.0 1460 | } 1461 | size { 1462 | x: 200.0 1463 | y: 100.0 1464 | z: 0.0 1465 | w: 1.0 1466 | } 1467 | color { 1468 | x: 1.0 1469 | y: 1.0 1470 | z: 1.0 1471 | w: 1.0 1472 | } 1473 | type: TYPE_BOX 1474 | blend_mode: BLEND_MODE_ALPHA 1475 | texture: "buttons/button" 1476 | id: "level1/box" 1477 | xanchor: XANCHOR_NONE 1478 | yanchor: YANCHOR_NONE 1479 | pivot: PIVOT_CENTER 1480 | adjust_mode: ADJUST_MODE_FIT 1481 | parent: "level1" 1482 | layer: "" 1483 | inherit_alpha: true 1484 | slice9 { 1485 | x: 20.0 1486 | y: 20.0 1487 | z: 40.0 1488 | w: 40.0 1489 | } 1490 | clipping_mode: CLIPPING_MODE_NONE 1491 | clipping_visible: true 1492 | clipping_inverted: false 1493 | alpha: 1.0 1494 | overridden_fields: 4 1495 | template_node_child: true 1496 | size_mode: SIZE_MODE_MANUAL 1497 | } 1498 | nodes { 1499 | position { 1500 | x: 0.0 1501 | y: 0.0 1502 | z: 0.0 1503 | w: 1.0 1504 | } 1505 | rotation { 1506 | x: 0.0 1507 | y: 0.0 1508 | z: 0.0 1509 | w: 1.0 1510 | } 1511 | scale { 1512 | x: 1.0 1513 | y: 1.0 1514 | z: 1.0 1515 | w: 1.0 1516 | } 1517 | size { 1518 | x: 200.0 1519 | y: 100.0 1520 | z: 0.0 1521 | w: 1.0 1522 | } 1523 | color { 1524 | x: 0.0 1525 | y: 0.0 1526 | z: 0.0 1527 | w: 1.0 1528 | } 1529 | type: TYPE_BOX 1530 | blend_mode: BLEND_MODE_ALPHA 1531 | texture: "buttons/button" 1532 | id: "level1/pressed" 1533 | xanchor: XANCHOR_NONE 1534 | yanchor: YANCHOR_NONE 1535 | pivot: PIVOT_CENTER 1536 | adjust_mode: ADJUST_MODE_FIT 1537 | parent: "level1/box" 1538 | layer: "" 1539 | inherit_alpha: true 1540 | slice9 { 1541 | x: 20.0 1542 | y: 20.0 1543 | z: 40.0 1544 | w: 40.0 1545 | } 1546 | clipping_mode: CLIPPING_MODE_NONE 1547 | clipping_visible: true 1548 | clipping_inverted: false 1549 | alpha: 0.0 1550 | overridden_fields: 4 1551 | template_node_child: true 1552 | size_mode: SIZE_MODE_MANUAL 1553 | } 1554 | nodes { 1555 | position { 1556 | x: 0.0 1557 | y: 0.0 1558 | z: 0.0 1559 | w: 1.0 1560 | } 1561 | rotation { 1562 | x: 0.0 1563 | y: 0.0 1564 | z: 0.0 1565 | w: 1.0 1566 | } 1567 | scale { 1568 | x: 1.0 1569 | y: 1.0 1570 | z: 1.0 1571 | w: 1.0 1572 | } 1573 | size { 1574 | x: 200.0 1575 | y: 100.0 1576 | z: 0.0 1577 | w: 1.0 1578 | } 1579 | color { 1580 | x: 1.0 1581 | y: 1.0 1582 | z: 1.0 1583 | w: 1.0 1584 | } 1585 | type: TYPE_TEXT 1586 | blend_mode: BLEND_MODE_ALPHA 1587 | text: "Level 1" 1588 | font: "font" 1589 | id: "level1/text" 1590 | xanchor: XANCHOR_NONE 1591 | yanchor: YANCHOR_NONE 1592 | pivot: PIVOT_CENTER 1593 | outline { 1594 | x: 0.0 1595 | y: 0.0 1596 | z: 0.0 1597 | w: 1.0 1598 | } 1599 | shadow { 1600 | x: 1.0 1601 | y: 1.0 1602 | z: 1.0 1603 | w: 1.0 1604 | } 1605 | adjust_mode: ADJUST_MODE_FIT 1606 | line_break: false 1607 | parent: "level1" 1608 | layer: "" 1609 | inherit_alpha: true 1610 | alpha: 1.0 1611 | outline_alpha: 1.0 1612 | shadow_alpha: 1.0 1613 | overridden_fields: 8 1614 | template_node_child: true 1615 | text_leading: 1.0 1616 | text_tracking: 0.0 1617 | } 1618 | nodes { 1619 | position { 1620 | x: 400.0 1621 | y: 100.0 1622 | z: 0.0 1623 | w: 1.0 1624 | } 1625 | rotation { 1626 | x: 0.0 1627 | y: 0.0 1628 | z: 0.0 1629 | w: 1.0 1630 | } 1631 | scale { 1632 | x: 1.0 1633 | y: 1.0 1634 | z: 1.0 1635 | w: 1.0 1636 | } 1637 | size { 1638 | x: 200.0 1639 | y: 100.0 1640 | z: 0.0 1641 | w: 1.0 1642 | } 1643 | color { 1644 | x: 1.0 1645 | y: 1.0 1646 | z: 1.0 1647 | w: 1.0 1648 | } 1649 | type: TYPE_TEMPLATE 1650 | id: "level2" 1651 | layer: "" 1652 | inherit_alpha: true 1653 | alpha: 1.0 1654 | template: "/common/button.gui" 1655 | template_node_child: false 1656 | } 1657 | nodes { 1658 | position { 1659 | x: 0.0 1660 | y: 0.0 1661 | z: 0.0 1662 | w: 1.0 1663 | } 1664 | rotation { 1665 | x: 0.0 1666 | y: 0.0 1667 | z: 0.0 1668 | w: 1.0 1669 | } 1670 | scale { 1671 | x: 1.0 1672 | y: 1.0 1673 | z: 1.0 1674 | w: 1.0 1675 | } 1676 | size { 1677 | x: 200.0 1678 | y: 100.0 1679 | z: 0.0 1680 | w: 1.0 1681 | } 1682 | color { 1683 | x: 1.0 1684 | y: 1.0 1685 | z: 1.0 1686 | w: 1.0 1687 | } 1688 | type: TYPE_BOX 1689 | blend_mode: BLEND_MODE_ALPHA 1690 | texture: "buttons/button" 1691 | id: "level2/box" 1692 | xanchor: XANCHOR_NONE 1693 | yanchor: YANCHOR_NONE 1694 | pivot: PIVOT_CENTER 1695 | adjust_mode: ADJUST_MODE_FIT 1696 | parent: "level2" 1697 | layer: "" 1698 | inherit_alpha: true 1699 | slice9 { 1700 | x: 20.0 1701 | y: 20.0 1702 | z: 40.0 1703 | w: 40.0 1704 | } 1705 | clipping_mode: CLIPPING_MODE_NONE 1706 | clipping_visible: true 1707 | clipping_inverted: false 1708 | alpha: 1.0 1709 | overridden_fields: 4 1710 | template_node_child: true 1711 | size_mode: SIZE_MODE_MANUAL 1712 | } 1713 | nodes { 1714 | position { 1715 | x: 0.0 1716 | y: 0.0 1717 | z: 0.0 1718 | w: 1.0 1719 | } 1720 | rotation { 1721 | x: 0.0 1722 | y: 0.0 1723 | z: 0.0 1724 | w: 1.0 1725 | } 1726 | scale { 1727 | x: 1.0 1728 | y: 1.0 1729 | z: 1.0 1730 | w: 1.0 1731 | } 1732 | size { 1733 | x: 200.0 1734 | y: 100.0 1735 | z: 0.0 1736 | w: 1.0 1737 | } 1738 | color { 1739 | x: 0.0 1740 | y: 0.0 1741 | z: 0.0 1742 | w: 1.0 1743 | } 1744 | type: TYPE_BOX 1745 | blend_mode: BLEND_MODE_ALPHA 1746 | texture: "buttons/button" 1747 | id: "level2/pressed" 1748 | xanchor: XANCHOR_NONE 1749 | yanchor: YANCHOR_NONE 1750 | pivot: PIVOT_CENTER 1751 | adjust_mode: ADJUST_MODE_FIT 1752 | parent: "level2/box" 1753 | layer: "" 1754 | inherit_alpha: true 1755 | slice9 { 1756 | x: 20.0 1757 | y: 20.0 1758 | z: 40.0 1759 | w: 40.0 1760 | } 1761 | clipping_mode: CLIPPING_MODE_NONE 1762 | clipping_visible: true 1763 | clipping_inverted: false 1764 | alpha: 0.0 1765 | overridden_fields: 4 1766 | template_node_child: true 1767 | size_mode: SIZE_MODE_MANUAL 1768 | } 1769 | nodes { 1770 | position { 1771 | x: 0.0 1772 | y: 0.0 1773 | z: 0.0 1774 | w: 1.0 1775 | } 1776 | rotation { 1777 | x: 0.0 1778 | y: 0.0 1779 | z: 0.0 1780 | w: 1.0 1781 | } 1782 | scale { 1783 | x: 1.0 1784 | y: 1.0 1785 | z: 1.0 1786 | w: 1.0 1787 | } 1788 | size { 1789 | x: 200.0 1790 | y: 100.0 1791 | z: 0.0 1792 | w: 1.0 1793 | } 1794 | color { 1795 | x: 1.0 1796 | y: 1.0 1797 | z: 1.0 1798 | w: 1.0 1799 | } 1800 | type: TYPE_TEXT 1801 | blend_mode: BLEND_MODE_ALPHA 1802 | text: "Level 2" 1803 | font: "font" 1804 | id: "level2/text" 1805 | xanchor: XANCHOR_NONE 1806 | yanchor: YANCHOR_NONE 1807 | pivot: PIVOT_CENTER 1808 | outline { 1809 | x: 0.0 1810 | y: 0.0 1811 | z: 0.0 1812 | w: 1.0 1813 | } 1814 | shadow { 1815 | x: 1.0 1816 | y: 1.0 1817 | z: 1.0 1818 | w: 1.0 1819 | } 1820 | adjust_mode: ADJUST_MODE_FIT 1821 | line_break: false 1822 | parent: "level2" 1823 | layer: "" 1824 | inherit_alpha: true 1825 | alpha: 1.0 1826 | outline_alpha: 1.0 1827 | shadow_alpha: 1.0 1828 | overridden_fields: 8 1829 | template_node_child: true 1830 | text_leading: 1.0 1831 | text_tracking: 0.0 1832 | } 1833 | nodes { 1834 | position { 1835 | x: 650.0 1836 | y: 100.0 1837 | z: 0.0 1838 | w: 1.0 1839 | } 1840 | rotation { 1841 | x: 0.0 1842 | y: 0.0 1843 | z: 0.0 1844 | w: 1.0 1845 | } 1846 | scale { 1847 | x: 1.0 1848 | y: 1.0 1849 | z: 1.0 1850 | w: 1.0 1851 | } 1852 | size { 1853 | x: 200.0 1854 | y: 100.0 1855 | z: 0.0 1856 | w: 1.0 1857 | } 1858 | color { 1859 | x: 1.0 1860 | y: 1.0 1861 | z: 1.0 1862 | w: 1.0 1863 | } 1864 | type: TYPE_TEMPLATE 1865 | id: "level3" 1866 | layer: "" 1867 | inherit_alpha: true 1868 | alpha: 1.0 1869 | template: "/common/button.gui" 1870 | template_node_child: false 1871 | } 1872 | nodes { 1873 | position { 1874 | x: 0.0 1875 | y: 0.0 1876 | z: 0.0 1877 | w: 1.0 1878 | } 1879 | rotation { 1880 | x: 0.0 1881 | y: 0.0 1882 | z: 0.0 1883 | w: 1.0 1884 | } 1885 | scale { 1886 | x: 1.0 1887 | y: 1.0 1888 | z: 1.0 1889 | w: 1.0 1890 | } 1891 | size { 1892 | x: 200.0 1893 | y: 100.0 1894 | z: 0.0 1895 | w: 1.0 1896 | } 1897 | color { 1898 | x: 1.0 1899 | y: 1.0 1900 | z: 1.0 1901 | w: 1.0 1902 | } 1903 | type: TYPE_BOX 1904 | blend_mode: BLEND_MODE_ALPHA 1905 | texture: "buttons/button" 1906 | id: "level3/box" 1907 | xanchor: XANCHOR_NONE 1908 | yanchor: YANCHOR_NONE 1909 | pivot: PIVOT_CENTER 1910 | adjust_mode: ADJUST_MODE_FIT 1911 | parent: "level3" 1912 | layer: "" 1913 | inherit_alpha: true 1914 | slice9 { 1915 | x: 20.0 1916 | y: 20.0 1917 | z: 40.0 1918 | w: 40.0 1919 | } 1920 | clipping_mode: CLIPPING_MODE_NONE 1921 | clipping_visible: true 1922 | clipping_inverted: false 1923 | alpha: 1.0 1924 | overridden_fields: 4 1925 | template_node_child: true 1926 | size_mode: SIZE_MODE_MANUAL 1927 | } 1928 | nodes { 1929 | position { 1930 | x: 0.0 1931 | y: 0.0 1932 | z: 0.0 1933 | w: 1.0 1934 | } 1935 | rotation { 1936 | x: 0.0 1937 | y: 0.0 1938 | z: 0.0 1939 | w: 1.0 1940 | } 1941 | scale { 1942 | x: 1.0 1943 | y: 1.0 1944 | z: 1.0 1945 | w: 1.0 1946 | } 1947 | size { 1948 | x: 200.0 1949 | y: 100.0 1950 | z: 0.0 1951 | w: 1.0 1952 | } 1953 | color { 1954 | x: 0.0 1955 | y: 0.0 1956 | z: 0.0 1957 | w: 1.0 1958 | } 1959 | type: TYPE_BOX 1960 | blend_mode: BLEND_MODE_ALPHA 1961 | texture: "buttons/button" 1962 | id: "level3/pressed" 1963 | xanchor: XANCHOR_NONE 1964 | yanchor: YANCHOR_NONE 1965 | pivot: PIVOT_CENTER 1966 | adjust_mode: ADJUST_MODE_FIT 1967 | parent: "level3/box" 1968 | layer: "" 1969 | inherit_alpha: true 1970 | slice9 { 1971 | x: 20.0 1972 | y: 20.0 1973 | z: 40.0 1974 | w: 40.0 1975 | } 1976 | clipping_mode: CLIPPING_MODE_NONE 1977 | clipping_visible: true 1978 | clipping_inverted: false 1979 | alpha: 0.0 1980 | overridden_fields: 4 1981 | template_node_child: true 1982 | size_mode: SIZE_MODE_MANUAL 1983 | } 1984 | nodes { 1985 | position { 1986 | x: 0.0 1987 | y: 0.0 1988 | z: 0.0 1989 | w: 1.0 1990 | } 1991 | rotation { 1992 | x: 0.0 1993 | y: 0.0 1994 | z: 0.0 1995 | w: 1.0 1996 | } 1997 | scale { 1998 | x: 1.0 1999 | y: 1.0 2000 | z: 1.0 2001 | w: 1.0 2002 | } 2003 | size { 2004 | x: 200.0 2005 | y: 100.0 2006 | z: 0.0 2007 | w: 1.0 2008 | } 2009 | color { 2010 | x: 1.0 2011 | y: 1.0 2012 | z: 1.0 2013 | w: 1.0 2014 | } 2015 | type: TYPE_TEXT 2016 | blend_mode: BLEND_MODE_ALPHA 2017 | text: "Level 3" 2018 | font: "font" 2019 | id: "level3/text" 2020 | xanchor: XANCHOR_NONE 2021 | yanchor: YANCHOR_NONE 2022 | pivot: PIVOT_CENTER 2023 | outline { 2024 | x: 0.0 2025 | y: 0.0 2026 | z: 0.0 2027 | w: 1.0 2028 | } 2029 | shadow { 2030 | x: 1.0 2031 | y: 1.0 2032 | z: 1.0 2033 | w: 1.0 2034 | } 2035 | adjust_mode: ADJUST_MODE_FIT 2036 | line_break: false 2037 | parent: "level3" 2038 | layer: "" 2039 | inherit_alpha: true 2040 | alpha: 1.0 2041 | outline_alpha: 1.0 2042 | shadow_alpha: 1.0 2043 | overridden_fields: 8 2044 | template_node_child: true 2045 | text_leading: 1.0 2046 | text_tracking: 0.0 2047 | } 2048 | nodes { 2049 | position { 2050 | x: 400.0 2051 | y: 300.0 2052 | z: 0.0 2053 | w: 1.0 2054 | } 2055 | rotation { 2056 | x: 0.0 2057 | y: 0.0 2058 | z: 0.0 2059 | w: 1.0 2060 | } 2061 | scale { 2062 | x: 1.0 2063 | y: 1.0 2064 | z: 1.0 2065 | w: 1.0 2066 | } 2067 | size { 2068 | x: 800.0 2069 | y: 600.0 2070 | z: 0.0 2071 | w: 1.0 2072 | } 2073 | color { 2074 | x: 0.0 2075 | y: 0.0 2076 | z: 0.0 2077 | w: 1.0 2078 | } 2079 | type: TYPE_BOX 2080 | blend_mode: BLEND_MODE_ALPHA 2081 | texture: "" 2082 | id: "fader" 2083 | xanchor: XANCHOR_NONE 2084 | yanchor: YANCHOR_NONE 2085 | pivot: PIVOT_CENTER 2086 | adjust_mode: ADJUST_MODE_FIT 2087 | layer: "layer2" 2088 | inherit_alpha: true 2089 | slice9 { 2090 | x: 0.0 2091 | y: 0.0 2092 | z: 0.0 2093 | w: 0.0 2094 | } 2095 | clipping_mode: CLIPPING_MODE_NONE 2096 | clipping_visible: true 2097 | clipping_inverted: false 2098 | alpha: 0.0 2099 | template_node_child: false 2100 | size_mode: SIZE_MODE_MANUAL 2101 | } 2102 | layers { 2103 | name: "layer1" 2104 | } 2105 | layers { 2106 | name: "layer2" 2107 | } 2108 | material: "/builtins/materials/gui.material" 2109 | adjust_reference: ADJUST_REFERENCE_PARENT 2110 | max_nodes: 512 2111 | --------------------------------------------------------------------------------