├── example ├── gooey │ └── dirtylarry │ │ ├── images │ │ ├── input.png │ │ ├── radio_normal.png │ │ ├── button_normal.png │ │ ├── button_pressed.png │ │ ├── checkbox_normal.png │ │ ├── radio_pressed.png │ │ ├── checkbox_pressed.png │ │ ├── radio_checked_normal.png │ │ ├── radio_checked_pressed.png │ │ ├── checkbox_checked_normal.png │ │ ├── checkbox_checked_pressed.png │ │ └── dirtylarry.atlas │ │ ├── fonts │ │ ├── NotoSans-Bold.ttf │ │ └── dirtylarry.font │ │ ├── components │ │ ├── checkbox.gui │ │ ├── radio.gui │ │ ├── button.gui │ │ └── input.gui │ │ └── dirtylarry.lua ├── main.input_binding ├── defglot_helper.lua ├── go_label.script ├── main_russian.gui_script ├── main.gui_script ├── main_locale.lua ├── main.collection ├── main.gui └── main_russian.gui ├── .gitignore ├── game.project ├── README.md ├── defglot └── defglot.lua ├── LICENSE └── LICENSE.md /example/gooey/dirtylarry/images/input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/input.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/fonts/NotoSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/fonts/NotoSans-Bold.ttf -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/radio_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/radio_normal.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/button_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/button_normal.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/button_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/button_pressed.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/checkbox_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/checkbox_normal.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/radio_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/radio_pressed.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/checkbox_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/checkbox_pressed.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.internal 2 | /build 3 | .externalToolBuilders 4 | .DS_Store 5 | Thumbs.db 6 | .lock-wscript 7 | *.pyc 8 | .project 9 | .cproject 10 | builtins -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/radio_checked_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/radio_checked_normal.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/radio_checked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/radio_checked_pressed.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/checkbox_checked_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/checkbox_checked_normal.png -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/checkbox_checked_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/subsoap/defglot/HEAD/example/gooey/dirtylarry/images/checkbox_checked_pressed.png -------------------------------------------------------------------------------- /game.project: -------------------------------------------------------------------------------- 1 | [project] 2 | title = DefGlot 3 | dependencies = https://github.com/britzl/gooey/archive/refs/tags/1.1.zip 4 | 5 | [library] 6 | include_dirs = defglot 7 | 8 | [input] 9 | game_binding = /example/main.input_bindingc 10 | 11 | [bootstrap] 12 | main_collection = /example/main.collectionc 13 | 14 | [script] 15 | shared_state = 1 16 | 17 | -------------------------------------------------------------------------------- /example/main.input_binding: -------------------------------------------------------------------------------- 1 | key_trigger { 2 | input: KEY_BACKSPACE 3 | action: "backspace" 4 | } 5 | key_trigger { 6 | input: KEY_Z 7 | action: "key_z" 8 | } 9 | mouse_trigger { 10 | input: MOUSE_BUTTON_1 11 | action: "touch" 12 | } 13 | text_trigger { 14 | input: TEXT 15 | action: "text" 16 | } 17 | text_trigger { 18 | input: MARKED_TEXT 19 | action: "marked_text" 20 | } 21 | -------------------------------------------------------------------------------- /example/gooey/dirtylarry/fonts/dirtylarry.font: -------------------------------------------------------------------------------- 1 | font: "/example/gooey/dirtylarry/fonts/NotoSans-Bold.ttf" 2 | material: "/builtins/fonts/font.material" 3 | size: 32 4 | antialias: 1 5 | alpha: 1.0 6 | outline_alpha: 0.0 7 | outline_width: 0.0 8 | shadow_alpha: 0.0 9 | shadow_blur: 0 10 | shadow_x: 0.0 11 | shadow_y: 0.0 12 | extra_characters: "" 13 | output_format: TYPE_BITMAP 14 | all_chars: true 15 | cache_width: 0 16 | cache_height: 0 17 | -------------------------------------------------------------------------------- /example/defglot_helper.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.init(defglot) 4 | 5 | -- You can use a helper module like this to set up languages in one place 6 | -- and then not redo init every time everywhere 7 | -- just run this helper's init before using DefGlot 8 | -- customize it how you need it to be 9 | 10 | if defglot.initilized == false then 11 | defglot.language = "en" -- if you don't set a language manually DefGlot will use OS lang 12 | defglot.locale_data = require("example.main_locale") 13 | defglot.init() 14 | print("DefGlot Helper is initilizing DefGlot") 15 | end 16 | 17 | end 18 | 19 | 20 | return M -------------------------------------------------------------------------------- /example/gooey/dirtylarry/images/dirtylarry.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/gooey/themes/dirtylarry/images/button_normal.png" 3 | } 4 | images { 5 | image: "/gooey/themes/dirtylarry/images/button_pressed.png" 6 | } 7 | images { 8 | image: "/gooey/themes/dirtylarry/images/checkbox_checked_normal.png" 9 | } 10 | images { 11 | image: "/gooey/themes/dirtylarry/images/checkbox_checked_pressed.png" 12 | } 13 | images { 14 | image: "/gooey/themes/dirtylarry/images/checkbox_normal.png" 15 | } 16 | images { 17 | image: "/gooey/themes/dirtylarry/images/checkbox_pressed.png" 18 | } 19 | images { 20 | image: "/gooey/themes/dirtylarry/images/input.png" 21 | } 22 | images { 23 | image: "/gooey/themes/dirtylarry/images/radio_checked_normal.png" 24 | } 25 | images { 26 | image: "/gooey/themes/dirtylarry/images/radio_checked_pressed.png" 27 | } 28 | images { 29 | image: "/gooey/themes/dirtylarry/images/radio_normal.png" 30 | } 31 | images { 32 | image: "/gooey/themes/dirtylarry/images/radio_pressed.png" 33 | } 34 | margin: 0 35 | extrude_borders: 1 36 | inner_padding: 0 37 | -------------------------------------------------------------------------------- /example/go_label.script: -------------------------------------------------------------------------------- 1 | local defglot = require("defglot.defglot") 2 | local defglot_helper = require("example.defglot_helper") 3 | 4 | function init(self) 5 | 6 | defglot_helper.init(defglot) 7 | defglot.use_default_if_missing = true 8 | 9 | defglot.set_text("#label", "START") 10 | 11 | 12 | defglot.language = "ru" 13 | defglot.set_text("#label1", "TOGGLE_PROFILER") 14 | 15 | defglot.set_text("#label2") 16 | 17 | 18 | 19 | end 20 | 21 | function final(self) 22 | -- Add finalization code here 23 | -- Remove this function if not needed 24 | end 25 | 26 | function update(self, dt) 27 | -- Add update code here 28 | -- Remove this function if not needed 29 | end 30 | 31 | function on_message(self, message_id, message, sender) 32 | -- Add message-handling code here 33 | -- Remove this function if not needed 34 | end 35 | 36 | function on_input(self, action_id, action) 37 | -- Add input-handling code here 38 | -- Remove this function if not needed 39 | end 40 | 41 | function on_reload(self) 42 | -- Add reload-handling code here 43 | -- Remove this function if not needed 44 | end 45 | -------------------------------------------------------------------------------- /example/main_russian.gui_script: -------------------------------------------------------------------------------- 1 | local defglot = require("defglot.defglot") 2 | 3 | 4 | function init(self) 5 | defglot.language = "ru" 6 | defglot.language_list.ru = "ru" 7 | pprint(defglot.language_list) 8 | defglot.locale_data = require("example.main_locale") 9 | defglot.init() 10 | 11 | defglot.set_text(gui.get_node("btn_start/label")) 12 | defglot.set_text(gui.get_node("btn_about/label")) 13 | defglot.set_text(gui.get_node("btn_exit/label")) 14 | defglot.set_text(gui.get_node("btn_toggle_profiler/label")) 15 | -- the toggle profiler text is missing so it will load missing string text 16 | end 17 | 18 | function final(self) 19 | -- Add finalization code here 20 | -- Remove this function if not needed 21 | end 22 | 23 | function update(self, dt) 24 | -- Add update code here 25 | -- Remove this function if not needed 26 | end 27 | 28 | function on_message(self, message_id, message, sender) 29 | -- Add message-handling code here 30 | -- Remove this function if not needed 31 | end 32 | 33 | function on_input(self, action_id, action) 34 | -- Add input-handling code here 35 | -- Remove this function if not needed 36 | end 37 | 38 | function on_reload(self) 39 | -- Add input-handling code here 40 | -- Remove this function if not needed 41 | end 42 | -------------------------------------------------------------------------------- /example/main.gui_script: -------------------------------------------------------------------------------- 1 | local defglot = require("defglot.defglot") 2 | 3 | 4 | function init(self) 5 | defglot.language = "en" -- if you don't set a language manually DefGlot will use OS lang 6 | defglot.locale_data = require("example.main_locale") 7 | defglot.init() 8 | 9 | defglot.set_text(gui.get_node("btn_start/label"), "LANGUAGE_NAME") 10 | -- you can either include the key you want to use, or use the current text of the label as the key 11 | defglot.set_text(gui.get_node("btn_about/label")) 12 | defglot.set_text(gui.get_node("btn_exit/label")) 13 | defglot.set_text(gui.get_node("btn_toggle_profiler/label")) 14 | 15 | -- you can see the very long string for the profiler button is shrunk to fit 16 | end 17 | 18 | function final(self) 19 | -- Add finalization code here 20 | -- Remove this function if not needed 21 | end 22 | 23 | function update(self, dt) 24 | -- Add update code here 25 | -- Remove this function if not needed 26 | end 27 | 28 | function on_message(self, message_id, message, sender) 29 | -- Add message-handling code here 30 | -- Remove this function if not needed 31 | end 32 | 33 | function on_input(self, action_id, action) 34 | -- Add input-handling code here 35 | -- Remove this function if not needed 36 | end 37 | 38 | function on_reload(self) 39 | -- Add input-handling code here 40 | -- Remove this function if not needed 41 | end 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DefGlot 2 | A localization module for Defold 3 | 4 | Easily support multiple translations of your game. 5 | 6 | ## Installation 7 | You can use DefGlot in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add: 8 | 9 | https://github.com/subsoap/defglot/archive/master.zip 10 | 11 | Once added, you must require the main Lua module in your scripts via 12 | 13 | ``` 14 | local defglot = require("defglot.defglot") 15 | ``` 16 | 17 | Then add your list of languages, language data, init, and set GUI text based on current language. 18 | 19 | ``` 20 | function init(self) 21 | defglot.language = "ru" -- if you do not define the language DefGlot will attempt to use OS lang 22 | defglot.language_list.ru = "ru" -- add one or more langauges to in use language list 23 | defglot.locale_data = require("example.main_locale") -- this is the locale data 24 | defglot.init() -- you must init DefGlot so that it can ensure proper setup 25 | 26 | defglot.set_text(gui.get_node("btn_start/label")) 27 | defglot.set_text(gui.get_node("btn_about/label")) 28 | defglot.set_text(gui.get_node("btn_exit/label")) 29 | defglot.set_text(gui.get_node("btn_toggle_profiler/label")) 30 | -- the toggle profiler text is missing so it will load missing string text in English 31 | end 32 | 33 | ``` 34 | 35 | DefGlot also works with GO labels but if you use it with labels you must always set a key as currently there is no label.get_text. 36 | 37 | ``` 38 | defglot.set_text("#label", "MY_KEY") 39 | 40 | ``` -------------------------------------------------------------------------------- /example/main_locale.lua: -------------------------------------------------------------------------------- 1 | -- this file stores text translations 2 | -- you don't have to use all of these languages in your game 3 | 4 | -- ideally you want to automate the processing of adding keys 5 | -- TODO: make an easy to use and share spreadsheet and setup a script to export to this file 6 | 7 | -- community translation projects 8 | -- https://docs.google.com/spreadsheets/d/135HgMYcRDt6vnJN0d-xFMEZUeWjVbc61ETf8uVwHERE/edit#gid=0 9 | -- PolyglotGamedev https://docs.google.com/spreadsheets/d/17f0dQawb-s_Fd7DHgmVvJoEGDMH_yoSd8EYigrb0zmM/edit#gid=310116733 10 | -- https://docs.google.com/spreadsheets/d/197GYEhPpk0DQTEO0r80v_k_bkGVtUgBB08PP--hqCIA/edit#gid=869735786 11 | 12 | return { 13 | 14 | 15 | 16 | en = { 17 | MISSING_KEY = "!!! MISSING KEY !!!", 18 | LANGUAGE_NAME = "English", 19 | TOGGLE_PROFILER = "Toggle Profiler (Extra Long Super Long String)", 20 | TOGGLE_FADE = "Toggle Fade", 21 | ABOUT = "About", 22 | START = "Start", 23 | EXIT = "Exit" 24 | }, 25 | 26 | 27 | bg = { 28 | LANGUAGE_NAME = "Български", 29 | }, 30 | 31 | de = { 32 | LANGUAGE_NAME = "Deutsch", 33 | }, 34 | 35 | 36 | el = { 37 | LANGUAGE_NAME = "Ελληνικά", 38 | }, 39 | 40 | es = { 41 | LANGUAGE_NAME = "Español", 42 | }, 43 | 44 | fi = { 45 | LANGUAGE_NAME = "Suomi", 46 | }, 47 | 48 | hu = { 49 | LANGUAGE_NAME = "Magyar", 50 | }, 51 | 52 | it = { 53 | LANGUAGE_NAME = "Italiano", 54 | }, 55 | 56 | ja = { 57 | LANGUAGE_NAME = "日本語", 58 | }, 59 | 60 | ko = { 61 | LANGUAGE_NAME = "한국어", 62 | }, 63 | 64 | nl = { 65 | LANGUAGE_NAME = "Nederlands", 66 | }, 67 | 68 | pl = { 69 | LANGUAGE_NAME = "Polski", 70 | }, 71 | 72 | pt_br = { 73 | LANGUAGE_NAME = "Português Brasileiro", 74 | }, 75 | 76 | ro = { 77 | LANGUAGE_NAME = "Romana", 78 | }, 79 | 80 | 81 | ru = { 82 | LANGUAGE_NAME = "Русский", 83 | START = "НАЧАЛО", 84 | ABOUT = "ОКОЛО", 85 | EXIT = "ВЫХОД" 86 | }, 87 | 88 | 89 | sv = { 90 | LANGUAGE_NAME = "Svenska", 91 | }, 92 | 93 | 94 | tr = { 95 | LANGUAGE_NAME = "Türkçe", 96 | }, 97 | 98 | 99 | uk = { 100 | LANGUAGE_NAME = "Українська", 101 | }, 102 | 103 | 104 | zh = { 105 | LANGUAGE_NAME = "简体中文", 106 | }, 107 | 108 | 109 | dk = { 110 | LANGUAGE_NAME = "Dansk", 111 | }, 112 | 113 | 114 | 115 | 116 | 117 | } -------------------------------------------------------------------------------- /example/gooey/dirtylarry/components/checkbox.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "dirtylarry" 4 | font: "/gooey/themes/dirtylarry/fonts/dirtylarry.font" 5 | } 6 | textures { 7 | name: "dirtylarry" 8 | texture: "/gooey/themes/dirtylarry/images/dirtylarry.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 0.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: 64.0 37 | y: 68.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: "dirtylarry/checkbox_normal" 50 | id: "box" 51 | xanchor: XANCHOR_NONE 52 | yanchor: YANCHOR_NONE 53 | pivot: PIVOT_CENTER 54 | adjust_mode: ADJUST_MODE_FIT 55 | layer: "below" 56 | inherit_alpha: true 57 | slice9 { 58 | x: 0.0 59 | y: 0.0 60 | z: 0.0 61 | w: 0.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_AUTO 69 | } 70 | nodes { 71 | position { 72 | x: 50.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: 200.0 91 | y: 100.0 92 | z: 0.0 93 | w: 1.0 94 | } 95 | color { 96 | x: 1.0 97 | y: 1.0 98 | z: 1.0 99 | w: 1.0 100 | } 101 | type: TYPE_TEXT 102 | blend_mode: BLEND_MODE_ALPHA 103 | text: "LABEL" 104 | font: "dirtylarry" 105 | id: "label" 106 | xanchor: XANCHOR_NONE 107 | yanchor: YANCHOR_NONE 108 | pivot: PIVOT_W 109 | outline { 110 | x: 1.0 111 | y: 1.0 112 | z: 1.0 113 | w: 1.0 114 | } 115 | shadow { 116 | x: 1.0 117 | y: 1.0 118 | z: 1.0 119 | w: 1.0 120 | } 121 | adjust_mode: ADJUST_MODE_FIT 122 | line_break: false 123 | layer: "text" 124 | inherit_alpha: true 125 | alpha: 1.0 126 | outline_alpha: 1.0 127 | shadow_alpha: 1.0 128 | template_node_child: false 129 | text_leading: 1.0 130 | text_tracking: 0.0 131 | } 132 | layers { 133 | name: "below" 134 | } 135 | layers { 136 | name: "text" 137 | } 138 | material: "/builtins/materials/gui.material" 139 | adjust_reference: ADJUST_REFERENCE_PARENT 140 | max_nodes: 512 141 | -------------------------------------------------------------------------------- /example/gooey/dirtylarry/components/radio.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "dirtylarry" 4 | font: "/gooey/themes/dirtylarry/fonts/dirtylarry.font" 5 | } 6 | textures { 7 | name: "dirtylarry" 8 | texture: "/gooey/themes/dirtylarry/images/dirtylarry.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 0.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: 64.0 37 | y: 68.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: "dirtylarry/radio_normal" 50 | id: "button" 51 | xanchor: XANCHOR_NONE 52 | yanchor: YANCHOR_NONE 53 | pivot: PIVOT_CENTER 54 | adjust_mode: ADJUST_MODE_FIT 55 | layer: "below" 56 | inherit_alpha: true 57 | slice9 { 58 | x: 0.0 59 | y: 0.0 60 | z: 0.0 61 | w: 0.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_AUTO 69 | } 70 | nodes { 71 | position { 72 | x: 60.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: 200.0 91 | y: 100.0 92 | z: 0.0 93 | w: 1.0 94 | } 95 | color { 96 | x: 1.0 97 | y: 1.0 98 | z: 1.0 99 | w: 1.0 100 | } 101 | type: TYPE_TEXT 102 | blend_mode: BLEND_MODE_ALPHA 103 | text: "LABEL" 104 | font: "dirtylarry" 105 | id: "label" 106 | xanchor: XANCHOR_NONE 107 | yanchor: YANCHOR_NONE 108 | pivot: PIVOT_W 109 | outline { 110 | x: 1.0 111 | y: 1.0 112 | z: 1.0 113 | w: 1.0 114 | } 115 | shadow { 116 | x: 1.0 117 | y: 1.0 118 | z: 1.0 119 | w: 1.0 120 | } 121 | adjust_mode: ADJUST_MODE_FIT 122 | line_break: false 123 | layer: "text" 124 | inherit_alpha: true 125 | alpha: 1.0 126 | outline_alpha: 1.0 127 | shadow_alpha: 1.0 128 | template_node_child: false 129 | text_leading: 1.0 130 | text_tracking: 0.0 131 | } 132 | layers { 133 | name: "below" 134 | } 135 | layers { 136 | name: "text" 137 | } 138 | material: "/builtins/materials/gui.material" 139 | adjust_reference: ADJUST_REFERENCE_PARENT 140 | max_nodes: 512 141 | -------------------------------------------------------------------------------- /example/gooey/dirtylarry/components/button.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "dirtylarry" 4 | font: "/example/gooey/dirtylarry/fonts/dirtylarry.font" 5 | } 6 | textures { 7 | name: "dirtylarry" 8 | texture: "/gooey/themes/dirtylarry/images/dirtylarry.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 0.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: 220.0 37 | y: 64.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: "dirtylarry/button_normal" 50 | id: "bg" 51 | xanchor: XANCHOR_NONE 52 | yanchor: YANCHOR_NONE 53 | pivot: PIVOT_CENTER 54 | adjust_mode: ADJUST_MODE_FIT 55 | layer: "below" 56 | inherit_alpha: true 57 | slice9 { 58 | x: 12.0 59 | y: 12.0 60 | z: 12.0 61 | w: 12.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: 200.0 91 | y: 100.0 92 | z: 0.0 93 | w: 1.0 94 | } 95 | color { 96 | x: 1.0 97 | y: 1.0 98 | z: 1.0 99 | w: 1.0 100 | } 101 | type: TYPE_TEXT 102 | blend_mode: BLEND_MODE_ALPHA 103 | text: "LABEL" 104 | font: "dirtylarry" 105 | id: "label" 106 | xanchor: XANCHOR_NONE 107 | yanchor: YANCHOR_NONE 108 | pivot: PIVOT_CENTER 109 | outline { 110 | x: 1.0 111 | y: 1.0 112 | z: 1.0 113 | w: 1.0 114 | } 115 | shadow { 116 | x: 1.0 117 | y: 1.0 118 | z: 1.0 119 | w: 1.0 120 | } 121 | adjust_mode: ADJUST_MODE_FIT 122 | line_break: false 123 | parent: "bg" 124 | layer: "text" 125 | inherit_alpha: true 126 | alpha: 1.0 127 | outline_alpha: 1.0 128 | shadow_alpha: 1.0 129 | template_node_child: false 130 | text_leading: 1.0 131 | text_tracking: 0.0 132 | } 133 | layers { 134 | name: "below" 135 | } 136 | layers { 137 | name: "text" 138 | } 139 | material: "/builtins/materials/gui.material" 140 | adjust_reference: ADJUST_REFERENCE_PARENT 141 | max_nodes: 512 142 | -------------------------------------------------------------------------------- /example/gooey/dirtylarry/dirtylarry.lua: -------------------------------------------------------------------------------- 1 | local gooey = require "gooey.gooey" 2 | 3 | 4 | local M = {} 5 | 6 | 7 | function M.acquire_input() 8 | gooey.acquire_input() 9 | end 10 | 11 | function M.button(node_id, action_id, action, fn) 12 | local button = gooey.button(node_id .. "/bg", action_id, action, fn) 13 | if button.pressed then 14 | gui.play_flipbook(button.node, "button_pressed") 15 | else 16 | gui.play_flipbook(button.node, "button_normal") 17 | end 18 | return button 19 | end 20 | 21 | 22 | function M.checkbox(node_id, action_id, action, fn) 23 | local checkbox = gooey.checkbox(node_id .. "/box", action_id, action, fn) 24 | if checkbox.pressed and not checkbox.checked then 25 | gui.play_flipbook(checkbox.node, "checkbox_pressed") 26 | elseif checkbox.pressed and checkbox.checked then 27 | gui.play_flipbook(checkbox.node, "checkbox_checked_pressed") 28 | elseif checkbox.checked then 29 | gui.play_flipbook(checkbox.node, "checkbox_checked_normal") 30 | else 31 | gui.play_flipbook(checkbox.node, "checkbox_normal") 32 | end 33 | return checkbox 34 | end 35 | 36 | 37 | local function update_radiobutton(radio) 38 | if radio.pressed and not radio.selected then 39 | gui.play_flipbook(radio.node, "radio_pressed") 40 | elseif radio.pressed and radio.selected then 41 | gui.play_flipbook(radio.node, "radio_checked_pressed") 42 | elseif radio.selected then 43 | gui.play_flipbook(radio.node, "radio_checked_normal") 44 | else 45 | gui.play_flipbook(radio.node, "radio_normal") 46 | end 47 | end 48 | 49 | function M.radiogroup(group_id, action_id, action, fn) 50 | local radiobuttons = gooey.radiogroup(group_id, action_id, action, fn) 51 | for _,radio in ipairs(radiobuttons) do 52 | update_radiobutton(radio) 53 | end 54 | return radiobuttons 55 | end 56 | 57 | function M.radio(node_id, group_id, action_id, action, fn) 58 | local radio = gooey.radio(node_id .. "/button", group_id, action_id, action, fn) 59 | update_radiobutton(radio) 60 | return radio 61 | end 62 | 63 | 64 | function M.input(node_id, keyboard_type, action_id, action, empty_text) 65 | local input = gooey.input(node_id .. "/text", keyboard_type, action_id, action) 66 | 67 | if input.empty and not input.selected then 68 | gui.set_text(input.node, empty_text) 69 | end 70 | 71 | local cursor = gui.get_node(node_id .. "/cursor") 72 | if input.selected then 73 | gui.set_enabled(cursor, true) 74 | gui.set_position(cursor, vmath.vector3(14 + input.text_width, 0, 0)) 75 | gui.cancel_animation(cursor, gui.PROP_COLOR) 76 | gui.set_color(cursor, vmath.vector4(1)) 77 | gui.animate(cursor, gui.PROP_COLOR, vmath.vector4(1,1,1,0), gui.EASING_INSINE, 0.8, 0, nil, gui.PLAYBACK_LOOP_PINGPONG) 78 | else 79 | gui.set_enabled(cursor, false) 80 | gui.cancel_animation(cursor, gui.PROP_COLOR) 81 | end 82 | return input 83 | end 84 | 85 | return M -------------------------------------------------------------------------------- /defglot/defglot.lua: -------------------------------------------------------------------------------- 1 | -- DefGlot is a localization module for Defold 2 | -- Your fonts need to have the characters for the languages you want support!! 3 | 4 | 5 | local M = {} 6 | 7 | M.language = nil 8 | M.default_language = "en" 9 | M.language_list = {en = "en"} 10 | M.initilized = false 11 | M.use_default_if_missing = false 12 | 13 | M.locale_data = {} 14 | 15 | local function is_gui_context() 16 | if pcall(go.get_id) then 17 | return false 18 | else 19 | return true 20 | end 21 | end 22 | 23 | function M.init() 24 | local language = M.language or sys.get_sys_info().language 25 | if M.language_list[language] then 26 | M.language = language 27 | else 28 | if M.language_list[M.default_language] then 29 | M.language = M.default_language 30 | else 31 | print("DefGlot: The default language is not in your language list!") 32 | end 33 | end 34 | M.initilized = true 35 | end 36 | 37 | function M.get_langauge() 38 | return M.langauge 39 | end 40 | 41 | function M.get_text(key) 42 | if next(M.locale_data) == nil then 43 | print("DefGlot: You have not set any language data. Check the example.") 44 | end 45 | 46 | local text = M.locale_data[M.language][key] 47 | if text == nil then 48 | if M.use_default_if_missing then 49 | text = M.locale_data[M.default_language][key] 50 | if text ~= nil then 51 | print("DefGlot: Warning using default for " .. key) 52 | return text 53 | else 54 | print("DefGlot: " .. key .. " is missing for " .. M.language ) 55 | return M.locale_data.en.MISSING_KEY .. key 56 | end 57 | else 58 | print("DefGlot: " .. key .. " is missing for " .. M.language ) 59 | return M.locale_data.en.MISSING_KEY .. key 60 | end 61 | 62 | else 63 | return text 64 | end 65 | end 66 | 67 | function M.autofit_text(node, set_scale) 68 | if set_scale == nil then 69 | set_scale = 1 70 | end 71 | local text_metrics = gui.get_text_metrics_from_node(node) 72 | local scale = math.min(1, gui.get_size(node).x / text_metrics.width)*set_scale 73 | gui.set_scale(node, vmath.vector3(scale, scale, scale)) 74 | end 75 | 76 | 77 | function M.set_text(target, key, scale) 78 | 79 | if M.initilized == false then 80 | print("DefGlot: You should init DefGlot with defglot.init() in your script's init!") 81 | print("DefGlot: Check the DefGlot example for the defglot_helper.lua usage") 82 | end 83 | 84 | if is_gui_context() then 85 | 86 | if key == nil then -- set text based on current text of label 87 | local node_text_key = gui.get_text(target) 88 | gui.set_text(target,M.get_text(node_text_key)) 89 | else -- set text based on passed key value 90 | gui.set_text(target,M.get_text(key)) 91 | end 92 | M.autofit_text(target, scale) 93 | else 94 | if key == nil then 95 | print("DefGlot: You must always pass a key when setting GO label text as there is currently no label.get_text") 96 | label.set_text(target, "YOU MUST SET WITH A KEY!") 97 | else 98 | label.set_text(target, M.get_text(key)) 99 | end 100 | 101 | end 102 | end 103 | 104 | 105 | 106 | 107 | return M 108 | -------------------------------------------------------------------------------- /example/gooey/dirtylarry/components/input.gui: -------------------------------------------------------------------------------- 1 | script: "" 2 | fonts { 3 | name: "dirtylarry" 4 | font: "/gooey/themes/dirtylarry/fonts/dirtylarry.font" 5 | } 6 | textures { 7 | name: "dirtylarry" 8 | texture: "/gooey/themes/dirtylarry/images/dirtylarry.atlas" 9 | } 10 | background_color { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 0.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: 400.0 37 | y: 64.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: "dirtylarry/input" 50 | id: "bg" 51 | xanchor: XANCHOR_NONE 52 | yanchor: YANCHOR_NONE 53 | pivot: PIVOT_W 54 | adjust_mode: ADJUST_MODE_FIT 55 | layer: "below" 56 | inherit_alpha: true 57 | slice9 { 58 | x: 12.0 59 | y: 12.0 60 | z: 12.0 61 | w: 15.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: 12.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: 200.0 91 | y: 100.0 92 | z: 0.0 93 | w: 1.0 94 | } 95 | color { 96 | x: 1.0 97 | y: 1.0 98 | z: 1.0 99 | w: 1.0 100 | } 101 | type: TYPE_TEXT 102 | blend_mode: BLEND_MODE_ALPHA 103 | text: "" 104 | font: "dirtylarry" 105 | id: "text" 106 | xanchor: XANCHOR_NONE 107 | yanchor: YANCHOR_NONE 108 | pivot: PIVOT_W 109 | outline { 110 | x: 1.0 111 | y: 1.0 112 | z: 1.0 113 | w: 1.0 114 | } 115 | shadow { 116 | x: 1.0 117 | y: 1.0 118 | z: 1.0 119 | w: 1.0 120 | } 121 | adjust_mode: ADJUST_MODE_FIT 122 | line_break: false 123 | parent: "bg" 124 | layer: "text" 125 | inherit_alpha: true 126 | alpha: 1.0 127 | outline_alpha: 1.0 128 | shadow_alpha: 1.0 129 | template_node_child: false 130 | text_leading: 1.0 131 | text_tracking: 0.0 132 | } 133 | nodes { 134 | position { 135 | x: 12.0 136 | y: 0.0 137 | z: 0.0 138 | w: 1.0 139 | } 140 | rotation { 141 | x: 0.0 142 | y: 0.0 143 | z: 0.0 144 | w: 1.0 145 | } 146 | scale { 147 | x: 1.0 148 | y: 1.0 149 | z: 1.0 150 | w: 1.0 151 | } 152 | size { 153 | x: 2.0 154 | y: 40.0 155 | z: 0.0 156 | w: 1.0 157 | } 158 | color { 159 | x: 0.5019608 160 | y: 0.5019608 161 | z: 0.5019608 162 | w: 1.0 163 | } 164 | type: TYPE_BOX 165 | blend_mode: BLEND_MODE_ALPHA 166 | texture: "" 167 | id: "cursor" 168 | xanchor: XANCHOR_NONE 169 | yanchor: YANCHOR_NONE 170 | pivot: PIVOT_CENTER 171 | adjust_mode: ADJUST_MODE_FIT 172 | parent: "bg" 173 | layer: "" 174 | inherit_alpha: true 175 | slice9 { 176 | x: 0.0 177 | y: 0.0 178 | z: 0.0 179 | w: 0.0 180 | } 181 | clipping_mode: CLIPPING_MODE_NONE 182 | clipping_visible: true 183 | clipping_inverted: false 184 | alpha: 1.0 185 | template_node_child: false 186 | size_mode: SIZE_MODE_MANUAL 187 | } 188 | layers { 189 | name: "below" 190 | } 191 | layers { 192 | name: "text" 193 | } 194 | material: "/builtins/materials/gui.material" 195 | adjust_reference: ADJUST_REFERENCE_PARENT 196 | max_nodes: 512 197 | -------------------------------------------------------------------------------- /example/main.collection: -------------------------------------------------------------------------------- 1 | name: "default" 2 | scale_along_z: 0 3 | embedded_instances { 4 | id: "go" 5 | data: "components {\n" 6 | " id: \"main_russian\"\n" 7 | " component: \"/example/main_russian.gui\"\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 | "components {\n" 21 | " id: \"main\"\n" 22 | " component: \"/example/main.gui\"\n" 23 | " position {\n" 24 | " x: 0.0\n" 25 | " y: 0.0\n" 26 | " z: 0.0\n" 27 | " }\n" 28 | " rotation {\n" 29 | " x: 0.0\n" 30 | " y: 0.0\n" 31 | " z: 0.0\n" 32 | " w: 1.0\n" 33 | " }\n" 34 | "}\n" 35 | "" 36 | position { 37 | x: 0.0 38 | y: 0.0 39 | z: 0.0 40 | } 41 | rotation { 42 | x: 0.0 43 | y: 0.0 44 | z: 0.0 45 | w: 1.0 46 | } 47 | scale3 { 48 | x: 1.0 49 | y: 1.0 50 | z: 1.0 51 | } 52 | } 53 | embedded_instances { 54 | id: "go1" 55 | data: "components {\n" 56 | " id: \"go_label\"\n" 57 | " component: \"/example/go_label.script\"\n" 58 | " position {\n" 59 | " x: 0.0\n" 60 | " y: 0.0\n" 61 | " z: 0.0\n" 62 | " }\n" 63 | " rotation {\n" 64 | " x: 0.0\n" 65 | " y: 0.0\n" 66 | " z: 0.0\n" 67 | " w: 1.0\n" 68 | " }\n" 69 | "}\n" 70 | "embedded_components {\n" 71 | " id: \"label\"\n" 72 | " type: \"label\"\n" 73 | " data: \"size {\\n" 74 | " x: 128.0\\n" 75 | " y: 32.0\\n" 76 | " z: 0.0\\n" 77 | " w: 0.0\\n" 78 | "}\\n" 79 | "scale {\\n" 80 | " x: 1.0\\n" 81 | " y: 1.0\\n" 82 | " z: 1.0\\n" 83 | " w: 0.0\\n" 84 | "}\\n" 85 | "color {\\n" 86 | " x: 1.0\\n" 87 | " y: 1.0\\n" 88 | " z: 1.0\\n" 89 | " w: 1.0\\n" 90 | "}\\n" 91 | "outline {\\n" 92 | " x: 0.0\\n" 93 | " y: 0.0\\n" 94 | " z: 0.0\\n" 95 | " w: 1.0\\n" 96 | "}\\n" 97 | "shadow {\\n" 98 | " x: 0.0\\n" 99 | " y: 0.0\\n" 100 | " z: 0.0\\n" 101 | " w: 1.0\\n" 102 | "}\\n" 103 | "leading: 1.0\\n" 104 | "tracking: 0.0\\n" 105 | "pivot: PIVOT_CENTER\\n" 106 | "blend_mode: BLEND_MODE_ALPHA\\n" 107 | "line_break: false\\n" 108 | "text: \\\"Label\\\"\\n" 109 | "font: \\\"/builtins/fonts/system_font.font\\\"\\n" 110 | "material: \\\"/builtins/fonts/label.material\\\"\\n" 111 | "\"\n" 112 | " position {\n" 113 | " x: 0.0\n" 114 | " y: 0.0\n" 115 | " z: 0.0\n" 116 | " }\n" 117 | " rotation {\n" 118 | " x: 0.0\n" 119 | " y: 0.0\n" 120 | " z: 0.0\n" 121 | " w: 1.0\n" 122 | " }\n" 123 | "}\n" 124 | "embedded_components {\n" 125 | " id: \"label1\"\n" 126 | " type: \"label\"\n" 127 | " data: \"size {\\n" 128 | " x: 128.0\\n" 129 | " y: 32.0\\n" 130 | " z: 0.0\\n" 131 | " w: 0.0\\n" 132 | "}\\n" 133 | "scale {\\n" 134 | " x: 1.0\\n" 135 | " y: 1.0\\n" 136 | " z: 1.0\\n" 137 | " w: 0.0\\n" 138 | "}\\n" 139 | "color {\\n" 140 | " x: 1.0\\n" 141 | " y: 1.0\\n" 142 | " z: 1.0\\n" 143 | " w: 1.0\\n" 144 | "}\\n" 145 | "outline {\\n" 146 | " x: 0.0\\n" 147 | " y: 0.0\\n" 148 | " z: 0.0\\n" 149 | " w: 1.0\\n" 150 | "}\\n" 151 | "shadow {\\n" 152 | " x: 0.0\\n" 153 | " y: 0.0\\n" 154 | " z: 0.0\\n" 155 | " w: 1.0\\n" 156 | "}\\n" 157 | "leading: 1.0\\n" 158 | "tracking: 0.0\\n" 159 | "pivot: PIVOT_CENTER\\n" 160 | "blend_mode: BLEND_MODE_ALPHA\\n" 161 | "line_break: false\\n" 162 | "text: \\\"Label\\\"\\n" 163 | "font: \\\"/builtins/fonts/system_font.font\\\"\\n" 164 | "material: \\\"/builtins/fonts/label.material\\\"\\n" 165 | "\"\n" 166 | " position {\n" 167 | " x: 0.0\n" 168 | " y: -19.0\n" 169 | " z: 0.0\n" 170 | " }\n" 171 | " rotation {\n" 172 | " x: 0.0\n" 173 | " y: 0.0\n" 174 | " z: 0.0\n" 175 | " w: 1.0\n" 176 | " }\n" 177 | "}\n" 178 | "embedded_components {\n" 179 | " id: \"label2\"\n" 180 | " type: \"label\"\n" 181 | " data: \"size {\\n" 182 | " x: 128.0\\n" 183 | " y: 32.0\\n" 184 | " z: 0.0\\n" 185 | " w: 0.0\\n" 186 | "}\\n" 187 | "scale {\\n" 188 | " x: 1.0\\n" 189 | " y: 1.0\\n" 190 | " z: 1.0\\n" 191 | " w: 0.0\\n" 192 | "}\\n" 193 | "color {\\n" 194 | " x: 1.0\\n" 195 | " y: 1.0\\n" 196 | " z: 1.0\\n" 197 | " w: 1.0\\n" 198 | "}\\n" 199 | "outline {\\n" 200 | " x: 0.0\\n" 201 | " y: 0.0\\n" 202 | " z: 0.0\\n" 203 | " w: 1.0\\n" 204 | "}\\n" 205 | "shadow {\\n" 206 | " x: 0.0\\n" 207 | " y: 0.0\\n" 208 | " z: 0.0\\n" 209 | " w: 1.0\\n" 210 | "}\\n" 211 | "leading: 1.0\\n" 212 | "tracking: 0.0\\n" 213 | "pivot: PIVOT_CENTER\\n" 214 | "blend_mode: BLEND_MODE_ALPHA\\n" 215 | "line_break: false\\n" 216 | "text: \\\"Label\\\"\\n" 217 | "font: \\\"/builtins/fonts/system_font.font\\\"\\n" 218 | "material: \\\"/builtins/fonts/label.material\\\"\\n" 219 | "\"\n" 220 | " position {\n" 221 | " x: 0.0\n" 222 | " y: -38.0\n" 223 | " z: 0.0\n" 224 | " }\n" 225 | " rotation {\n" 226 | " x: 0.0\n" 227 | " y: 0.0\n" 228 | " z: 0.0\n" 229 | " w: 1.0\n" 230 | " }\n" 231 | "}\n" 232 | "" 233 | position { 234 | x: 493.0 235 | y: 97.0 236 | z: 0.0 237 | } 238 | rotation { 239 | x: 0.0 240 | y: 0.0 241 | z: 0.0 242 | w: 1.0 243 | } 244 | scale3 { 245 | x: 2.0 246 | y: 2.0 247 | z: 2.0 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | -------------------------------------------------------------------------------- /example/main.gui: -------------------------------------------------------------------------------- 1 | script: "/example/main.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 0.0 7 | } 8 | nodes { 9 | position { 10 | x: 313.0 11 | y: 417.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: "btn_start" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/gooey/themes/dirtylarry/components/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: 220.0 68 | y: 64.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: "dirtylarry/button_normal" 81 | id: "btn_start/bg" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "btn_start" 87 | layer: "below" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 12.0 91 | y: 12.0 92 | z: 12.0 93 | w: 12.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: "START" 136 | font: "dirtylarry" 137 | id: "btn_start/label" 138 | xanchor: XANCHOR_NONE 139 | yanchor: YANCHOR_NONE 140 | pivot: PIVOT_CENTER 141 | outline { 142 | x: 1.0 143 | y: 1.0 144 | z: 1.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: false 155 | parent: "btn_start/bg" 156 | layer: "text" 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: 313.0 169 | y: 333.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: "btn_about" 199 | layer: "" 200 | inherit_alpha: true 201 | alpha: 1.0 202 | template: "/gooey/themes/dirtylarry/components/button.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: 220.0 226 | y: 64.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: "dirtylarry/button_normal" 239 | id: "btn_about/bg" 240 | xanchor: XANCHOR_NONE 241 | yanchor: YANCHOR_NONE 242 | pivot: PIVOT_CENTER 243 | adjust_mode: ADJUST_MODE_FIT 244 | parent: "btn_about" 245 | layer: "below" 246 | inherit_alpha: true 247 | slice9 { 248 | x: 12.0 249 | y: 12.0 250 | z: 12.0 251 | w: 12.0 252 | } 253 | clipping_mode: CLIPPING_MODE_NONE 254 | clipping_visible: true 255 | clipping_inverted: false 256 | alpha: 1.0 257 | template_node_child: true 258 | size_mode: SIZE_MODE_MANUAL 259 | } 260 | nodes { 261 | position { 262 | x: 0.0 263 | y: 0.0 264 | z: 0.0 265 | w: 1.0 266 | } 267 | rotation { 268 | x: 0.0 269 | y: 0.0 270 | z: 0.0 271 | w: 1.0 272 | } 273 | scale { 274 | x: 1.0 275 | y: 1.0 276 | z: 1.0 277 | w: 1.0 278 | } 279 | size { 280 | x: 200.0 281 | y: 100.0 282 | z: 0.0 283 | w: 1.0 284 | } 285 | color { 286 | x: 1.0 287 | y: 1.0 288 | z: 1.0 289 | w: 1.0 290 | } 291 | type: TYPE_TEXT 292 | blend_mode: BLEND_MODE_ALPHA 293 | text: "ABOUT" 294 | font: "dirtylarry" 295 | id: "btn_about/label" 296 | xanchor: XANCHOR_NONE 297 | yanchor: YANCHOR_NONE 298 | pivot: PIVOT_CENTER 299 | outline { 300 | x: 1.0 301 | y: 1.0 302 | z: 1.0 303 | w: 1.0 304 | } 305 | shadow { 306 | x: 1.0 307 | y: 1.0 308 | z: 1.0 309 | w: 1.0 310 | } 311 | adjust_mode: ADJUST_MODE_FIT 312 | line_break: false 313 | parent: "btn_about/bg" 314 | layer: "text" 315 | inherit_alpha: true 316 | alpha: 1.0 317 | outline_alpha: 1.0 318 | shadow_alpha: 1.0 319 | overridden_fields: 8 320 | template_node_child: true 321 | text_leading: 1.0 322 | text_tracking: 0.0 323 | } 324 | nodes { 325 | position { 326 | x: 313.0 327 | y: 251.0 328 | z: 0.0 329 | w: 1.0 330 | } 331 | rotation { 332 | x: 0.0 333 | y: 0.0 334 | z: 0.0 335 | w: 1.0 336 | } 337 | scale { 338 | x: 1.0 339 | y: 1.0 340 | z: 1.0 341 | w: 1.0 342 | } 343 | size { 344 | x: 200.0 345 | y: 100.0 346 | z: 0.0 347 | w: 1.0 348 | } 349 | color { 350 | x: 1.0 351 | y: 1.0 352 | z: 1.0 353 | w: 1.0 354 | } 355 | type: TYPE_TEMPLATE 356 | id: "btn_exit" 357 | layer: "" 358 | inherit_alpha: true 359 | alpha: 1.0 360 | template: "/gooey/themes/dirtylarry/components/button.gui" 361 | template_node_child: false 362 | } 363 | nodes { 364 | position { 365 | x: 0.0 366 | y: 0.0 367 | z: 0.0 368 | w: 1.0 369 | } 370 | rotation { 371 | x: 0.0 372 | y: 0.0 373 | z: 0.0 374 | w: 1.0 375 | } 376 | scale { 377 | x: 1.0 378 | y: 1.0 379 | z: 1.0 380 | w: 1.0 381 | } 382 | size { 383 | x: 220.0 384 | y: 64.0 385 | z: 0.0 386 | w: 1.0 387 | } 388 | color { 389 | x: 1.0 390 | y: 1.0 391 | z: 1.0 392 | w: 1.0 393 | } 394 | type: TYPE_BOX 395 | blend_mode: BLEND_MODE_ALPHA 396 | texture: "dirtylarry/button_normal" 397 | id: "btn_exit/bg" 398 | xanchor: XANCHOR_NONE 399 | yanchor: YANCHOR_NONE 400 | pivot: PIVOT_CENTER 401 | adjust_mode: ADJUST_MODE_FIT 402 | parent: "btn_exit" 403 | layer: "below" 404 | inherit_alpha: true 405 | slice9 { 406 | x: 12.0 407 | y: 12.0 408 | z: 12.0 409 | w: 12.0 410 | } 411 | clipping_mode: CLIPPING_MODE_NONE 412 | clipping_visible: true 413 | clipping_inverted: false 414 | alpha: 1.0 415 | template_node_child: true 416 | size_mode: SIZE_MODE_MANUAL 417 | } 418 | nodes { 419 | position { 420 | x: 0.0 421 | y: 0.0 422 | z: 0.0 423 | w: 1.0 424 | } 425 | rotation { 426 | x: 0.0 427 | y: 0.0 428 | z: 0.0 429 | w: 1.0 430 | } 431 | scale { 432 | x: 1.0 433 | y: 1.0 434 | z: 1.0 435 | w: 1.0 436 | } 437 | size { 438 | x: 200.0 439 | y: 100.0 440 | z: 0.0 441 | w: 1.0 442 | } 443 | color { 444 | x: 1.0 445 | y: 1.0 446 | z: 1.0 447 | w: 1.0 448 | } 449 | type: TYPE_TEXT 450 | blend_mode: BLEND_MODE_ALPHA 451 | text: "EXIT" 452 | font: "dirtylarry" 453 | id: "btn_exit/label" 454 | xanchor: XANCHOR_NONE 455 | yanchor: YANCHOR_NONE 456 | pivot: PIVOT_CENTER 457 | outline { 458 | x: 1.0 459 | y: 1.0 460 | z: 1.0 461 | w: 1.0 462 | } 463 | shadow { 464 | x: 1.0 465 | y: 1.0 466 | z: 1.0 467 | w: 1.0 468 | } 469 | adjust_mode: ADJUST_MODE_FIT 470 | line_break: false 471 | parent: "btn_exit/bg" 472 | layer: "text" 473 | inherit_alpha: true 474 | alpha: 1.0 475 | outline_alpha: 1.0 476 | shadow_alpha: 1.0 477 | overridden_fields: 8 478 | template_node_child: true 479 | text_leading: 1.0 480 | text_tracking: 0.0 481 | } 482 | nodes { 483 | position { 484 | x: 313.0 485 | y: 172.0 486 | z: 0.0 487 | w: 1.0 488 | } 489 | rotation { 490 | x: 0.0 491 | y: 0.0 492 | z: 0.0 493 | w: 1.0 494 | } 495 | scale { 496 | x: 1.0 497 | y: 1.0 498 | z: 1.0 499 | w: 1.0 500 | } 501 | size { 502 | x: 200.0 503 | y: 100.0 504 | z: 0.0 505 | w: 1.0 506 | } 507 | color { 508 | x: 1.0 509 | y: 1.0 510 | z: 1.0 511 | w: 1.0 512 | } 513 | type: TYPE_TEMPLATE 514 | id: "btn_toggle_profiler" 515 | layer: "" 516 | inherit_alpha: true 517 | alpha: 1.0 518 | template: "/gooey/themes/dirtylarry/components/button.gui" 519 | template_node_child: false 520 | } 521 | nodes { 522 | position { 523 | x: 0.0 524 | y: 0.0 525 | z: 0.0 526 | w: 1.0 527 | } 528 | rotation { 529 | x: 0.0 530 | y: 0.0 531 | z: 0.0 532 | w: 1.0 533 | } 534 | scale { 535 | x: 1.0 536 | y: 1.0 537 | z: 1.0 538 | w: 1.0 539 | } 540 | size { 541 | x: 220.0 542 | y: 64.0 543 | z: 0.0 544 | w: 1.0 545 | } 546 | color { 547 | x: 1.0 548 | y: 1.0 549 | z: 1.0 550 | w: 1.0 551 | } 552 | type: TYPE_BOX 553 | blend_mode: BLEND_MODE_ALPHA 554 | texture: "dirtylarry/button_normal" 555 | id: "btn_toggle_profiler/bg" 556 | xanchor: XANCHOR_NONE 557 | yanchor: YANCHOR_NONE 558 | pivot: PIVOT_CENTER 559 | adjust_mode: ADJUST_MODE_FIT 560 | parent: "btn_toggle_profiler" 561 | layer: "below" 562 | inherit_alpha: true 563 | slice9 { 564 | x: 12.0 565 | y: 12.0 566 | z: 12.0 567 | w: 12.0 568 | } 569 | clipping_mode: CLIPPING_MODE_NONE 570 | clipping_visible: true 571 | clipping_inverted: false 572 | alpha: 1.0 573 | template_node_child: true 574 | size_mode: SIZE_MODE_MANUAL 575 | } 576 | nodes { 577 | position { 578 | x: 0.0 579 | y: 0.0 580 | z: 0.0 581 | w: 1.0 582 | } 583 | rotation { 584 | x: 0.0 585 | y: 0.0 586 | z: 0.0 587 | w: 1.0 588 | } 589 | scale { 590 | x: 1.0 591 | y: 1.0 592 | z: 1.0 593 | w: 1.0 594 | } 595 | size { 596 | x: 200.0 597 | y: 100.0 598 | z: 0.0 599 | w: 1.0 600 | } 601 | color { 602 | x: 1.0 603 | y: 1.0 604 | z: 1.0 605 | w: 1.0 606 | } 607 | type: TYPE_TEXT 608 | blend_mode: BLEND_MODE_ALPHA 609 | text: "TOGGLE_PROFILER" 610 | font: "dirtylarry" 611 | id: "btn_toggle_profiler/label" 612 | xanchor: XANCHOR_NONE 613 | yanchor: YANCHOR_NONE 614 | pivot: PIVOT_CENTER 615 | outline { 616 | x: 1.0 617 | y: 1.0 618 | z: 1.0 619 | w: 1.0 620 | } 621 | shadow { 622 | x: 1.0 623 | y: 1.0 624 | z: 1.0 625 | w: 1.0 626 | } 627 | adjust_mode: ADJUST_MODE_FIT 628 | line_break: false 629 | parent: "btn_toggle_profiler/bg" 630 | layer: "text" 631 | inherit_alpha: true 632 | alpha: 1.0 633 | outline_alpha: 1.0 634 | shadow_alpha: 1.0 635 | overridden_fields: 8 636 | template_node_child: true 637 | text_leading: 1.0 638 | text_tracking: 0.0 639 | } 640 | layers { 641 | name: "below" 642 | } 643 | layers { 644 | name: "text" 645 | } 646 | material: "/builtins/materials/gui.material" 647 | adjust_reference: ADJUST_REFERENCE_PARENT 648 | max_nodes: 512 649 | -------------------------------------------------------------------------------- /example/main_russian.gui: -------------------------------------------------------------------------------- 1 | script: "/example/main_russian.gui_script" 2 | background_color { 3 | x: 0.0 4 | y: 0.0 5 | z: 0.0 6 | w: 0.0 7 | } 8 | nodes { 9 | position { 10 | x: 648.0 11 | y: 417.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: "btn_start" 41 | layer: "" 42 | inherit_alpha: true 43 | alpha: 1.0 44 | template: "/example/gooey/dirtylarry/components/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: 220.0 68 | y: 64.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: "dirtylarry/button_normal" 81 | id: "btn_start/bg" 82 | xanchor: XANCHOR_NONE 83 | yanchor: YANCHOR_NONE 84 | pivot: PIVOT_CENTER 85 | adjust_mode: ADJUST_MODE_FIT 86 | parent: "btn_start" 87 | layer: "below" 88 | inherit_alpha: true 89 | slice9 { 90 | x: 12.0 91 | y: 12.0 92 | z: 12.0 93 | w: 12.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: "START" 136 | font: "dirtylarry" 137 | id: "btn_start/label" 138 | xanchor: XANCHOR_NONE 139 | yanchor: YANCHOR_NONE 140 | pivot: PIVOT_CENTER 141 | outline { 142 | x: 1.0 143 | y: 1.0 144 | z: 1.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: false 155 | parent: "btn_start/bg" 156 | layer: "text" 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: 648.0 169 | y: 333.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: "btn_about" 199 | layer: "" 200 | inherit_alpha: true 201 | alpha: 1.0 202 | template: "/example/gooey/dirtylarry/components/button.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: 220.0 226 | y: 64.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: "dirtylarry/button_normal" 239 | id: "btn_about/bg" 240 | xanchor: XANCHOR_NONE 241 | yanchor: YANCHOR_NONE 242 | pivot: PIVOT_CENTER 243 | adjust_mode: ADJUST_MODE_FIT 244 | parent: "btn_about" 245 | layer: "below" 246 | inherit_alpha: true 247 | slice9 { 248 | x: 12.0 249 | y: 12.0 250 | z: 12.0 251 | w: 12.0 252 | } 253 | clipping_mode: CLIPPING_MODE_NONE 254 | clipping_visible: true 255 | clipping_inverted: false 256 | alpha: 1.0 257 | template_node_child: true 258 | size_mode: SIZE_MODE_MANUAL 259 | } 260 | nodes { 261 | position { 262 | x: 0.0 263 | y: 0.0 264 | z: 0.0 265 | w: 1.0 266 | } 267 | rotation { 268 | x: 0.0 269 | y: 0.0 270 | z: 0.0 271 | w: 1.0 272 | } 273 | scale { 274 | x: 1.0 275 | y: 1.0 276 | z: 1.0 277 | w: 1.0 278 | } 279 | size { 280 | x: 200.0 281 | y: 100.0 282 | z: 0.0 283 | w: 1.0 284 | } 285 | color { 286 | x: 1.0 287 | y: 1.0 288 | z: 1.0 289 | w: 1.0 290 | } 291 | type: TYPE_TEXT 292 | blend_mode: BLEND_MODE_ALPHA 293 | text: "ABOUT" 294 | font: "dirtylarry" 295 | id: "btn_about/label" 296 | xanchor: XANCHOR_NONE 297 | yanchor: YANCHOR_NONE 298 | pivot: PIVOT_CENTER 299 | outline { 300 | x: 1.0 301 | y: 1.0 302 | z: 1.0 303 | w: 1.0 304 | } 305 | shadow { 306 | x: 1.0 307 | y: 1.0 308 | z: 1.0 309 | w: 1.0 310 | } 311 | adjust_mode: ADJUST_MODE_FIT 312 | line_break: false 313 | parent: "btn_about/bg" 314 | layer: "text" 315 | inherit_alpha: true 316 | alpha: 1.0 317 | outline_alpha: 1.0 318 | shadow_alpha: 1.0 319 | overridden_fields: 8 320 | template_node_child: true 321 | text_leading: 1.0 322 | text_tracking: 0.0 323 | } 324 | nodes { 325 | position { 326 | x: 648.0 327 | y: 251.0 328 | z: 0.0 329 | w: 1.0 330 | } 331 | rotation { 332 | x: 0.0 333 | y: 0.0 334 | z: 0.0 335 | w: 1.0 336 | } 337 | scale { 338 | x: 1.0 339 | y: 1.0 340 | z: 1.0 341 | w: 1.0 342 | } 343 | size { 344 | x: 200.0 345 | y: 100.0 346 | z: 0.0 347 | w: 1.0 348 | } 349 | color { 350 | x: 1.0 351 | y: 1.0 352 | z: 1.0 353 | w: 1.0 354 | } 355 | type: TYPE_TEMPLATE 356 | id: "btn_exit" 357 | layer: "" 358 | inherit_alpha: true 359 | alpha: 1.0 360 | template: "/example/gooey/dirtylarry/components/button.gui" 361 | template_node_child: false 362 | } 363 | nodes { 364 | position { 365 | x: 0.0 366 | y: 0.0 367 | z: 0.0 368 | w: 1.0 369 | } 370 | rotation { 371 | x: 0.0 372 | y: 0.0 373 | z: 0.0 374 | w: 1.0 375 | } 376 | scale { 377 | x: 1.0 378 | y: 1.0 379 | z: 1.0 380 | w: 1.0 381 | } 382 | size { 383 | x: 220.0 384 | y: 64.0 385 | z: 0.0 386 | w: 1.0 387 | } 388 | color { 389 | x: 1.0 390 | y: 1.0 391 | z: 1.0 392 | w: 1.0 393 | } 394 | type: TYPE_BOX 395 | blend_mode: BLEND_MODE_ALPHA 396 | texture: "dirtylarry/button_normal" 397 | id: "btn_exit/bg" 398 | xanchor: XANCHOR_NONE 399 | yanchor: YANCHOR_NONE 400 | pivot: PIVOT_CENTER 401 | adjust_mode: ADJUST_MODE_FIT 402 | parent: "btn_exit" 403 | layer: "below" 404 | inherit_alpha: true 405 | slice9 { 406 | x: 12.0 407 | y: 12.0 408 | z: 12.0 409 | w: 12.0 410 | } 411 | clipping_mode: CLIPPING_MODE_NONE 412 | clipping_visible: true 413 | clipping_inverted: false 414 | alpha: 1.0 415 | template_node_child: true 416 | size_mode: SIZE_MODE_MANUAL 417 | } 418 | nodes { 419 | position { 420 | x: 0.0 421 | y: 0.0 422 | z: 0.0 423 | w: 1.0 424 | } 425 | rotation { 426 | x: 0.0 427 | y: 0.0 428 | z: 0.0 429 | w: 1.0 430 | } 431 | scale { 432 | x: 1.0 433 | y: 1.0 434 | z: 1.0 435 | w: 1.0 436 | } 437 | size { 438 | x: 200.0 439 | y: 100.0 440 | z: 0.0 441 | w: 1.0 442 | } 443 | color { 444 | x: 1.0 445 | y: 1.0 446 | z: 1.0 447 | w: 1.0 448 | } 449 | type: TYPE_TEXT 450 | blend_mode: BLEND_MODE_ALPHA 451 | text: "EXIT" 452 | font: "dirtylarry" 453 | id: "btn_exit/label" 454 | xanchor: XANCHOR_NONE 455 | yanchor: YANCHOR_NONE 456 | pivot: PIVOT_CENTER 457 | outline { 458 | x: 1.0 459 | y: 1.0 460 | z: 1.0 461 | w: 1.0 462 | } 463 | shadow { 464 | x: 1.0 465 | y: 1.0 466 | z: 1.0 467 | w: 1.0 468 | } 469 | adjust_mode: ADJUST_MODE_FIT 470 | line_break: false 471 | parent: "btn_exit/bg" 472 | layer: "text" 473 | inherit_alpha: true 474 | alpha: 1.0 475 | outline_alpha: 1.0 476 | shadow_alpha: 1.0 477 | overridden_fields: 8 478 | template_node_child: true 479 | text_leading: 1.0 480 | text_tracking: 0.0 481 | } 482 | nodes { 483 | position { 484 | x: 648.0 485 | y: 172.0 486 | z: 0.0 487 | w: 1.0 488 | } 489 | rotation { 490 | x: 0.0 491 | y: 0.0 492 | z: 0.0 493 | w: 1.0 494 | } 495 | scale { 496 | x: 1.0 497 | y: 1.0 498 | z: 1.0 499 | w: 1.0 500 | } 501 | size { 502 | x: 200.0 503 | y: 100.0 504 | z: 0.0 505 | w: 1.0 506 | } 507 | color { 508 | x: 1.0 509 | y: 1.0 510 | z: 1.0 511 | w: 1.0 512 | } 513 | type: TYPE_TEMPLATE 514 | id: "btn_toggle_profiler" 515 | layer: "" 516 | inherit_alpha: true 517 | alpha: 1.0 518 | template: "/example/gooey/dirtylarry/components/button.gui" 519 | template_node_child: false 520 | } 521 | nodes { 522 | position { 523 | x: 0.0 524 | y: 0.0 525 | z: 0.0 526 | w: 1.0 527 | } 528 | rotation { 529 | x: 0.0 530 | y: 0.0 531 | z: 0.0 532 | w: 1.0 533 | } 534 | scale { 535 | x: 1.0 536 | y: 1.0 537 | z: 1.0 538 | w: 1.0 539 | } 540 | size { 541 | x: 220.0 542 | y: 64.0 543 | z: 0.0 544 | w: 1.0 545 | } 546 | color { 547 | x: 1.0 548 | y: 1.0 549 | z: 1.0 550 | w: 1.0 551 | } 552 | type: TYPE_BOX 553 | blend_mode: BLEND_MODE_ALPHA 554 | texture: "dirtylarry/button_normal" 555 | id: "btn_toggle_profiler/bg" 556 | xanchor: XANCHOR_NONE 557 | yanchor: YANCHOR_NONE 558 | pivot: PIVOT_CENTER 559 | adjust_mode: ADJUST_MODE_FIT 560 | parent: "btn_toggle_profiler" 561 | layer: "below" 562 | inherit_alpha: true 563 | slice9 { 564 | x: 12.0 565 | y: 12.0 566 | z: 12.0 567 | w: 12.0 568 | } 569 | clipping_mode: CLIPPING_MODE_NONE 570 | clipping_visible: true 571 | clipping_inverted: false 572 | alpha: 1.0 573 | template_node_child: true 574 | size_mode: SIZE_MODE_MANUAL 575 | } 576 | nodes { 577 | position { 578 | x: 0.0 579 | y: 0.0 580 | z: 0.0 581 | w: 1.0 582 | } 583 | rotation { 584 | x: 0.0 585 | y: 0.0 586 | z: 0.0 587 | w: 1.0 588 | } 589 | scale { 590 | x: 1.0 591 | y: 1.0 592 | z: 1.0 593 | w: 1.0 594 | } 595 | size { 596 | x: 200.0 597 | y: 100.0 598 | z: 0.0 599 | w: 1.0 600 | } 601 | color { 602 | x: 1.0 603 | y: 1.0 604 | z: 1.0 605 | w: 1.0 606 | } 607 | type: TYPE_TEXT 608 | blend_mode: BLEND_MODE_ALPHA 609 | text: "TOGGLE_PROFILER" 610 | font: "dirtylarry" 611 | id: "btn_toggle_profiler/label" 612 | xanchor: XANCHOR_NONE 613 | yanchor: YANCHOR_NONE 614 | pivot: PIVOT_CENTER 615 | outline { 616 | x: 1.0 617 | y: 1.0 618 | z: 1.0 619 | w: 1.0 620 | } 621 | shadow { 622 | x: 1.0 623 | y: 1.0 624 | z: 1.0 625 | w: 1.0 626 | } 627 | adjust_mode: ADJUST_MODE_FIT 628 | line_break: false 629 | parent: "btn_toggle_profiler/bg" 630 | layer: "text" 631 | inherit_alpha: true 632 | alpha: 1.0 633 | outline_alpha: 1.0 634 | shadow_alpha: 1.0 635 | overridden_fields: 8 636 | template_node_child: true 637 | text_leading: 1.0 638 | text_tracking: 0.0 639 | } 640 | layers { 641 | name: "below" 642 | } 643 | layers { 644 | name: "text" 645 | } 646 | material: "/builtins/materials/gui.material" 647 | adjust_reference: ADJUST_REFERENCE_PARENT 648 | max_nodes: 512 649 | --------------------------------------------------------------------------------