From 7ea8691fc5b26cb8bce9882c726fad8500c6b685 Mon Sep 17 00:00:00 2001 From: Insality Date: Wed, 20 Nov 2024 23:36:04 +0200 Subject: [PATCH] Update --- docs_md/01-components.md | 2 +- druid/base/static_grid.lua | 12 +- druid/custom/rich_input/rich_input.gui | 4 +- .../editor_scripts/create_druid_component.py | 9 +- druid/editor_scripts/druid.editor_script | 4 +- druid/editor_scripts/widget.lua_template | 9 +- .../{text_bold.font => druid_text_bold.font} | 0 ...t_regular.font => druid_text_regular.font} | 0 druid/templates/component.template.lua | 20 +- druid/widget/fps_panel/fps_panel.gui | 12 +- druid/widget/fps_panel/fps_panel.lua | 4 +- druid/widget/memory_panel/memory_panel.gui | 14 +- druid/widget/memory_panel/memory_panel.lua | 8 +- druid/widget/mini_graph/mini_graph.gui | 10 +- .../properties/property_button.gui | 4 +- .../properties/property_checkbox.gui | 4 +- .../properties/property_input.gui | 4 +- .../property_left_right_selector.gui | 4 +- .../properties/property_slider.gui | 8 +- .../properties/property_text.gui | 4 +- .../properties_panel/properties_panel.gui | 10 +- .../{druid.atlas => druid_example.atlas} | 0 example/components/druid_logo/druid_logo.gui | 311 +-- .../examples_list_view/examples_list_view.gui | 470 +--- .../examples_list_view/examples_list_view.lua | 4 +- .../examples_list_view_item.gui | 197 +- .../components/output_list/output_list.gui | 4 +- .../components/output_list/output_list.lua | 2 +- .../panel_druid_profiler.gui | 527 +---- .../panel_information/panel_information.gui | 4 +- .../properties/property_button.gui | 192 +- .../properties/property_checkbox.gui | 204 +- .../properties/property_slider.gui | 4 +- .../properties_panel/properties_panel.gui | 1466 +----------- .../properties_panel/properties_panel.lua | 2 +- example/druid.gui | 107 +- .../basic/back_handler/basic_back_handler.gui | 4 +- .../examples/basic/blocker/basic_blocker.gui | 4 +- .../basic/button/basic_button_hold.gui | 4 +- example/examples/basic/checkbox/checkbox.gui | 4 +- .../basic/checkbox_group/checkbox_group.gui | 4 +- example/examples/basic/drag/drag.gui | 208 +- example/examples/basic/drag/drag_to_node.gui | 4 +- example/examples/basic/grid/grid.gui | 211 +- example/examples/basic/grid/grid.lua | 4 +- example/examples/basic/hover/hover.gui | 350 +-- example/examples/basic/input/rich_input.gui | 803 +------ .../basic/progress_bar/basic_progress_bar.gui | 4 +- .../basic_progress_bar_slice9.gui | 4 +- .../basic/radio_group/radio_group.gui | 4 +- .../basic/rich_text/basic_rich_text.gui | 4 +- .../basic/rich_text/rich_text_tags.gui | 4 +- .../basic/rich_text/rich_text_tags_custom.gui | 4 +- example/examples/basic/scroll/scroll.gui | 4 +- .../scroll_bind_grid/scroll_bind_grid.gui | 257 +-- .../scroll_bind_grid/scroll_bind_grid.lua | 4 +- .../scroll_bind_grid_horizontal.gui | 256 +-- .../scroll_bind_grid_horizontal.lua | 4 +- .../scroll_bind_grid_points.gui | 4 +- .../scroll_bind_grid_points.lua | 4 +- .../basic/scroll_slider/scroll_slider.gui | 2019 +---------------- .../examples/basic/slider/basic_slider.gui | 278 +-- .../basic/slider/basic_slider_stepped.gui | 278 +-- .../basic/slider/basic_slider_vertical.gui | 4 +- example/examples/basic/swipe/basic_swipe.gui | 87 +- example/examples/basic/text/basic_text.gui | 135 +- .../examples/basic/text/multiline_text.gui | 134 +- .../data_list_add_remove_clear.gui | 266 +-- .../data_list_add_remove_clear.lua | 2 +- .../data_list/basic/data_list_basic.gui | 266 +-- .../data_list/basic/data_list_basic.lua | 2 +- .../basic/data_list_horizontal_basic.gui | 265 +-- .../basic/data_list_horizontal_basic.lua | 2 +- .../cache_with_component/button_component.gui | 135 +- .../cache_with_component.gui | 345 +-- .../cache_with_component.lua | 2 +- .../gamepad/gamepad_tester/gamepad_tester.gui | 4 +- .../templates/gamepad_button.gui | 131 +- .../templates/gamepad_stick.gui | 4 +- .../templates/gamepad_trigger.gui | 117 +- .../on_screen_control/on_screen_control.gui | 4 +- .../on_screen_control/on_screen_input.gui | 4 +- example/examples/intro/intro/intro.gui | 4 +- .../examples/layout/basic/basic_layout.gui | 133 +- .../animation_blend/animation_blend.gui | 4 +- .../basic_animation/basic_animation.gui | 207 +- example/examples/widgets/examples_list.lua | 8 + .../widgets/hover_hint/hover_hint.gui | 4 +- .../widgets/hover_hint/hover_hint_example.gui | 4 +- .../memory_panel/example_memory_panel.gui | 98 + .../memory_panel/example_memory_panel.lua | 12 + .../window_confirmation.gui | 604 +---- .../windows/window_info/window_info.gui | 460 +--- .../window_language/window_language.gui | 471 +--- .../window_language/window_language.lua | 4 +- example/templates/button_text_blue.gui | 89 +- example/templates/button_text_green.gui | 85 +- example/templates/button_text_red.gui | 85 +- example/templates/button_text_white.gui | 86 +- example/templates/button_text_yellow.gui | 89 +- example/templates/input.gui | 83 +- example/templates/rich_input.gui | 253 +-- example/templates/slider.gui | 126 +- test/tests/test_static_grid.lua | 4 +- 104 files changed, 451 insertions(+), 12743 deletions(-) rename druid/fonts/{text_bold.font => druid_text_bold.font} (100%) rename druid/fonts/{text_regular.font => druid_text_regular.font} (100%) rename example/assets/{druid.atlas => druid_example.atlas} (100%) create mode 100644 example/examples/widgets/memory_panel/example_memory_panel.gui create mode 100644 example/examples/widgets/memory_panel/example_memory_panel.lua diff --git a/docs_md/01-components.md b/docs_md/01-components.md index edb1fa3..ce33f02 100644 --- a/docs_md/01-components.md +++ b/docs_md/01-components.md @@ -216,7 +216,7 @@ Static grid have constant node size, so it possible to calculate node positions Static grid can shift elements on add/remove functions. ### Setup -Create component with druid: `grid = druid:new_static_grid(parent_node, prefab_node, max_in_row_elements)` +Create component with druid: `grid = druid:new_grid(parent_node, prefab_node, max_in_row_elements)` ### Notes - On _add node_ grid will set nodeup parent to _parent_node_ diff --git a/druid/base/static_grid.lua b/druid/base/static_grid.lua index 51589f4..48f0e7d 100644 --- a/druid/base/static_grid.lua +++ b/druid/base/static_grid.lua @@ -34,7 +34,7 @@ -- Example Link -- @module StaticGrid -- @within BaseComponent --- @alias druid.static_grid +-- @alias druid.grid --- On item add callback(self, node, index) -- @tfield druid.event on_add_item druid.event @@ -377,7 +377,7 @@ end --- Change set position function for grid nodes. It will call on -- update poses on grid elements. Default: gui.set_position ---@param callback function Function on node set position ----@return druid.static_grid Current grid instance +---@return druid.grid Current grid instance function M:set_position_function(callback) self._set_position_function = callback or gui.set_position @@ -387,7 +387,7 @@ end --- Clear grid nodes array. GUI nodes will be not deleted! -- If you want to delete GUI nodes, use static_grid.nodes array before grid:clear ----@return druid.static_grid Current grid instance +---@return druid.grid Current grid instance function M:clear() self.border.x = 0 self.border.y = 0 @@ -421,7 +421,7 @@ end --- Set new in_row elements for grid ---@param in_row number The new in_row value ----@return druid.static_grid Current grid instance +---@return druid.grid Current grid instance function M:set_in_row(in_row) self.in_row = in_row self._grid_horizonal_offset = self.node_size.x * (self.in_row - 1) * self.anchor.x @@ -440,7 +440,7 @@ end --- Set new node size for grid -- @tparam[opt] number width The new node width -- @tparam[opt] number height The new node height ----@return druid.static_grid Current grid instance +---@return druid.grid Current grid instance function M:set_item_size(width, height) if width then self.node_size.x = width @@ -463,7 +463,7 @@ end --- Sort grid nodes by custom comparator function ---@param comparator function The comparator function. (a, b) -> boolean ----@return druid.static_grid Current grid instance +---@return druid.grid Current grid instance function M:sort_nodes(comparator) table.sort(self.nodes, comparator) self:_update(true) diff --git a/druid/custom/rich_input/rich_input.gui b/druid/custom/rich_input/rich_input.gui index 46c7d7f..ad0bb1d 100644 --- a/druid/custom/rich_input/rich_input.gui +++ b/druid/custom/rich_input/rich_input.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/editor_scripts/create_druid_component.py b/druid/editor_scripts/create_druid_component.py index 195429a..f27d57f 100644 --- a/druid/editor_scripts/create_druid_component.py +++ b/druid/editor_scripts/create_druid_component.py @@ -1,12 +1,9 @@ -# @license MIT, Insality 2021 -# @source https://github.com/Insality/druid - import os import sys import deftree current_filepath = os.path.abspath(os.path.dirname(__file__)) -TEMPLATE_PATH = current_filepath + "/component.lua_template" +TEMPLATE_PATH = current_filepath + "/widget.lua_template" component_annotations = "" component_functions = "" @@ -44,9 +41,9 @@ def process_component(node_name, component_name): component_define += "\n\tself.{0} = self.druid:new_lang_text(\"{1}\", \"lang_id\")".format(node_name, node_name) if node_name.startswith("grid") or node_name.startswith("static_grid"): - component_annotations += "\n---@field {0} druid.static_grid".format(node_name) + component_annotations += "\n---@field {0} druid.grid".format(node_name) component_define += "\n--TODO: Replace prefab_name with grid element prefab" - component_define += "\n\tself.{0} = self.druid:new_static_grid(\"{1}\", \"prefab_name\", 1)".format(node_name, node_name) + component_define += "\n\tself.{0} = self.druid:new_grid(\"{1}\", \"prefab_name\", 1)".format(node_name, node_name) if node_name.startswith("scroll_view"): field_name = node_name.replace("_view", "") diff --git a/druid/editor_scripts/druid.editor_script b/druid/editor_scripts/druid.editor_script index 27d4adc..96076c5 100644 --- a/druid/editor_scripts/druid.editor_script +++ b/druid/editor_scripts/druid.editor_script @@ -50,7 +50,7 @@ function M.get_commands() }, { - label = "Create Druid Component", + label = "Create Druid Widget", locations = { "Edit", "Assets" }, query = { selection = {type = "resource", cardinality = "one"} }, active = function(opts) @@ -62,7 +62,7 @@ function M.get_commands() print("Run script for", editor.get(file, "path")) save_file_from_dependency('/druid/editor_scripts/run_python_script_on_gui.sh', "./build/run_python_script_on_gui.sh") save_file_from_dependency('/druid/editor_scripts/create_druid_component.py', "./build/create_druid_component.py") - save_file_from_dependency('/druid/editor_scripts/component.lua_template', "./build/component.lua_template") + save_file_from_dependency('/druid/editor_scripts/widget.lua_template', "./build/widget.lua_template") return { { action = "shell", diff --git a/druid/editor_scripts/widget.lua_template b/druid/editor_scripts/widget.lua_template index 18875f6..9d0f2c6 100644 --- a/druid/editor_scripts/widget.lua_template +++ b/druid/editor_scripts/widget.lua_template @@ -1,9 +1,14 @@ ----@class widget.TEMPLATE: druid.widget +---This is a template for a {COMPONENT_NAME} Druid widget. +---Instantiate this template with `druid.new_widget(widget_module, [template_id], [nodes])`. +---Read more about Druid Widgets here: ... + +---@class widget.{COMPONENT_TYPE}: druid.widget local M = {} + function M:init() self.root = self:get_node("root") - self.button = self.druid:new_button("button"), self.on_button, self) + self.button = self.druid:new_button("button", self.on_button, self) end diff --git a/druid/fonts/text_bold.font b/druid/fonts/druid_text_bold.font similarity index 100% rename from druid/fonts/text_bold.font rename to druid/fonts/druid_text_bold.font diff --git a/druid/fonts/text_regular.font b/druid/fonts/druid_text_regular.font similarity index 100% rename from druid/fonts/text_regular.font rename to druid/fonts/druid_text_regular.font diff --git a/druid/templates/component.template.lua b/druid/templates/component.template.lua index 059ef31..202cd42 100644 --- a/druid/templates/component.template.lua +++ b/druid/templates/component.template.lua @@ -1,16 +1,16 @@ -local component = require("druid.component") - ----@class component_name : druid.base_component -local M = component.create("component_name") +---@class widget.TEMPLATE: druid.widget +local M = {} --- Component constructor. Template name and nodes are optional. Pass it if you use it in your component -function M:init(template, nodes) - self.druid = self:get_druid(template, nodes) +function M:init() self.root = self:get_node("root") - - self.button = self.druid:new_button("button", function() end) + self.button = self.druid:new_button("button", self.on_button, self) end -return M +function M:on_button() + print("Root node", self.root) +end + + +return M \ No newline at end of file diff --git a/druid/widget/fps_panel/fps_panel.gui b/druid/widget/fps_panel/fps_panel.gui index fed43d9..bf8b20b 100644 --- a/druid/widget/fps_panel/fps_panel.gui +++ b/druid/widget/fps_panel/fps_panel.gui @@ -1,10 +1,10 @@ fonts { - name: "text_regular" - font: "/druid/fonts/text_regular.font" + name: "druid_text_regular" + font: "/druid/fonts/druid_text_regular.font" } fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" @@ -122,7 +122,7 @@ nodes { } type: TYPE_TEXT text: "12 FPS" - font: "text_regular" + font: "druid_text_regular" id: "text_min_fps" pivot: PIVOT_W outline { @@ -159,7 +159,7 @@ nodes { } type: TYPE_TEXT text: "60 FPS" - font: "text_bold" + font: "druid_text_bold" id: "text_fps" outline { x: 1.0 diff --git a/druid/widget/fps_panel/fps_panel.lua b/druid/widget/fps_panel/fps_panel.lua index 1517d97..1b0edaa 100644 --- a/druid/widget/fps_panel/fps_panel.lua +++ b/druid/widget/fps_panel/fps_panel.lua @@ -75,9 +75,9 @@ function M:push_fps_value() self.mini_graph:push_line_value(1 / average_frame_time) - self.text_fps:set_to(tostring(math.ceil(1 / average_frame_time) .. " FPS")) + self.text_fps:set_text(tostring(math.ceil(1 / average_frame_time) .. " FPS")) local lowest_value = math.ceil(self.mini_graph:get_lowest_value()) - self.text_min_fps:set_to(lowest_value .. " lowest") + self.text_min_fps:set_text(lowest_value .. " lowest") end diff --git a/druid/widget/memory_panel/memory_panel.gui b/druid/widget/memory_panel/memory_panel.gui index d0c9c9a..99e8cf2 100644 --- a/druid/widget/memory_panel/memory_panel.gui +++ b/druid/widget/memory_panel/memory_panel.gui @@ -1,10 +1,10 @@ fonts { - name: "text_regular" - font: "/druid/fonts/text_regular.font" + name: "druid_text_regular" + font: "/druid/fonts/druid_text_regular.font" } fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" @@ -104,7 +104,7 @@ nodes { } type: TYPE_TEXT text: "120.23 KB" - font: "text_regular" + font: "druid_text_regular" id: "text_max_value" pivot: PIVOT_W outline { @@ -142,7 +142,7 @@ nodes { } type: TYPE_TEXT text: "120 KB/s" - font: "text_regular" + font: "druid_text_regular" id: "text_per_second" pivot: PIVOT_E outline { @@ -221,7 +221,7 @@ nodes { } type: TYPE_TEXT text: "120 KB" - font: "text_bold" + font: "druid_text_bold" id: "text_memory" outline { x: 1.0 diff --git a/druid/widget/memory_panel/memory_panel.lua b/druid/widget/memory_panel/memory_panel.lua index 672751a..213a3e5 100644 --- a/druid/widget/memory_panel/memory_panel.lua +++ b/druid/widget/memory_panel/memory_panel.lua @@ -51,14 +51,14 @@ function M:push_next_value() self.mini_graph:set_max_value(max_value) local max_memory = math.ceil(self.mini_graph:get_highest_value()) - self.max_value:set_to(max_memory .. " KB") + self.max_value:set_text(max_memory .. " KB") local last_second = 0 local last_second_samples = math.ceil(1 / self.delta_time) for index = #self.memory_samples - last_second_samples + 1, #self.memory_samples do last_second = last_second + (self.memory_samples[index] or 0) end - self.text_per_second:set_to(math.ceil(last_second) .. " KB/s") + self.text_per_second:set_text(math.ceil(last_second) .. " KB/s") end @@ -66,9 +66,9 @@ function M:update_text_memory() local memory = math.ceil(collectgarbage("count")) -- in KB if memory > 1024 then memory = memory / 1024 - self.text_memory:set_to(string.format("%.2f", memory) .. " MB") + self.text_memory:set_text(string.format("%.2f", memory) .. " MB") else - self.text_memory:set_to(memory .. " KB") + self.text_memory:set_text(memory .. " KB") end end diff --git a/druid/widget/mini_graph/mini_graph.gui b/druid/widget/mini_graph/mini_graph.gui index ceefa96..161f0df 100644 --- a/druid/widget/mini_graph/mini_graph.gui +++ b/druid/widget/mini_graph/mini_graph.gui @@ -1,10 +1,10 @@ fonts { - name: "text_regular" - font: "/druid/fonts/text_regular.font" + name: "druid_text_regular" + font: "/druid/fonts/druid_text_regular.font" } fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" @@ -67,7 +67,7 @@ nodes { } type: TYPE_TEXT text: "Mini Graph" - font: "text_regular" + font: "druid_text_regular" id: "text_header" pivot: PIVOT_NW outline { diff --git a/druid/widget/properties_panel/properties/property_button.gui b/druid/widget/properties_panel/properties/property_button.gui index 6efe3df..2175a1c 100644 --- a/druid/widget/properties_panel/properties/property_button.gui +++ b/druid/widget/properties_panel/properties/property_button.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/widget/properties_panel/properties/property_checkbox.gui b/druid/widget/properties_panel/properties/property_checkbox.gui index 59824fd..80740ca 100644 --- a/druid/widget/properties_panel/properties/property_checkbox.gui +++ b/druid/widget/properties_panel/properties/property_checkbox.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/widget/properties_panel/properties/property_input.gui b/druid/widget/properties_panel/properties/property_input.gui index ac4e786..e82aaf3 100644 --- a/druid/widget/properties_panel/properties/property_input.gui +++ b/druid/widget/properties_panel/properties/property_input.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/widget/properties_panel/properties/property_left_right_selector.gui b/druid/widget/properties_panel/properties/property_left_right_selector.gui index c7d528b..e959dd5 100644 --- a/druid/widget/properties_panel/properties/property_left_right_selector.gui +++ b/druid/widget/properties_panel/properties/property_left_right_selector.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/widget/properties_panel/properties/property_slider.gui b/druid/widget/properties_panel/properties/property_slider.gui index a0bb0a4..c0a9564 100644 --- a/druid/widget/properties_panel/properties/property_slider.gui +++ b/druid/widget/properties_panel/properties/property_slider.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" @@ -37,7 +37,7 @@ nodes { } type: TYPE_TEXT text: "Slider" - font: "text_bold" + font: "druid_text_bold" id: "text_name" pivot: PIVOT_W outline { @@ -201,7 +201,7 @@ nodes { } type: TYPE_TEXT text: "25 %" - font: "text_bold" + font: "druid_text_bold" id: "text_value" outline { x: 1.0 diff --git a/druid/widget/properties_panel/properties/property_text.gui b/druid/widget/properties_panel/properties/property_text.gui index 8966c90..3ebf171 100644 --- a/druid/widget/properties_panel/properties/property_text.gui +++ b/druid/widget/properties_panel/properties/property_text.gui @@ -1,6 +1,6 @@ fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" diff --git a/druid/widget/properties_panel/properties_panel.gui b/druid/widget/properties_panel/properties_panel.gui index 0352b4d..70f6db0 100644 --- a/druid/widget/properties_panel/properties_panel.gui +++ b/druid/widget/properties_panel/properties_panel.gui @@ -1,10 +1,10 @@ fonts { - name: "text_regular" - font: "/druid/fonts/text_regular.font" + name: "druid_text_regular" + font: "/druid/fonts/druid_text_regular.font" } fonts { - name: "text_bold" - font: "/druid/fonts/text_bold.font" + name: "druid_text_bold" + font: "/druid/fonts/druid_text_bold.font" } textures { name: "druid" @@ -67,7 +67,7 @@ nodes { } type: TYPE_TEXT text: "Properties" - font: "text_regular" + font: "druid_text_regular" id: "text_header" pivot: PIVOT_NW outline { diff --git a/example/assets/druid.atlas b/example/assets/druid_example.atlas similarity index 100% rename from example/assets/druid.atlas rename to example/assets/druid_example.atlas diff --git a/example/components/druid_logo/druid_logo.gui b/example/components/druid_logo/druid_logo.gui index 15b549d..2347db1 100644 --- a/example/components/druid_logo/druid_logo.gui +++ b/example/components/druid_logo/druid_logo.gui @@ -1,4 +1,3 @@ -script: "" fonts { name: "text_regular" font: "/example/assets/fonts/text_regular.font" @@ -8,434 +7,129 @@ textures { texture: "/example/assets/druid_logo.atlas" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 170.0 - z: 0.0 - w: 1.0 } color { x: 0.129 y: 0.141 z: 0.157 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 200.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 16.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "E_Anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_E adjust_mode: ADJUST_MODE_STRETCH parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: 10.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid_logo/icon_druid" id: "icon_druid_right" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "E_Anchor" layer: "druid_logo" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 0.5 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -200.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 16.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "W_Anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W adjust_mode: ADJUST_MODE_STRETCH parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -10.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid_logo/icon_druid" id: "icon_druid_left" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "W_Anchor" layer: "druid_logo" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 0.5 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid_logo/logo_druid" id: "icon_logo" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "druid_logo" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.6 y: 0.6 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Defold UI Framework" font: "text_regular" id: "text_description" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_regular" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -448,4 +142,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/examples_list_view/examples_list_view.gui b/example/components/examples_list_view/examples_list_view.gui index 750684c..21f5dc5 100644 --- a/example/components/examples_list_view/examples_list_view.gui +++ b/example/components/examples_list_view/examples_list_view.gui @@ -1,605 +1,140 @@ -script: "" fonts { name: "text_regular" font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 910.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -190.0 y: 445.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 } size { x: 250.0 y: 60.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Examples" font: "text_regular" id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_regular" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -200.0 y: 395.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 850.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "scroll_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 850.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "scroll_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH parent: "scroll_view" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -52.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "examples_list_view_item" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/components/examples_list_view/examples_list_view_item.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.173 - y: 0.184 - z: 0.204 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "examples_list_view_item/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_STRETCH parent: "examples_list_view_item" - layer: "druid" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/pixel" id: "examples_list_view_item/panel_highlight" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "examples_list_view_item/root" - layer: "druid" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 4.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.894 - y: 0.506 - z: 0.333 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/pixel" id: "examples_list_view_item/panel_selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "examples_list_view_item/root" - layer: "druid" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: false - visible: true - material: "" } nodes { - position { - x: 18.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.851 - y: 0.851 - z: 0.851 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/icon_arrow" id: "examples_list_view_item/icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "examples_list_view_item/root" - layer: "druid" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: false - visible: true - material: "" } nodes { - position { - x: 36.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Basic" - font: "text_bold" id: "examples_list_view_item/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.941 - y: 0.984 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "examples_list_view_item/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -609,4 +144,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/examples_list_view/examples_list_view.lua b/example/components/examples_list_view/examples_list_view.lua index 7f66b4d..9d06af6 100644 --- a/example/components/examples_list_view/examples_list_view.lua +++ b/example/components/examples_list_view/examples_list_view.lua @@ -10,7 +10,7 @@ local examples_list_view_item = require("example.components.examples_list_view.e ---@field root druid.container ---@field druid druid_instance ---@field scroll druid.scroll ----@field grid druid.static_grid +---@field grid druid.grid local M = component.create("examples_list_view") @@ -29,7 +29,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") - self.grid = self.druid:new_static_grid("scroll_content", self.prefab, 1) + self.grid = self.druid:new_grid("scroll_content", self.prefab, 1) self.scroll:bind_grid(self.grid) self.root:add_container("scroll_view", nil, function(_, size) diff --git a/example/components/examples_list_view/examples_list_view_item.gui b/example/components/examples_list_view/examples_list_view_item.gui index 2cef928..f9ad962 100644 --- a/example/components/examples_list_view/examples_list_view_item.gui +++ b/example/components/examples_list_view/examples_list_view_item.gui @@ -1,319 +1,127 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W adjust_mode: ADJUST_MODE_STRETCH layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "panel_highlight" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 0.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 4.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.894 y: 0.506 z: 0.333 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "panel_selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 enabled: false - visible: true - material: "" } nodes { position { x: 18.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.6 y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 } color { x: 0.851 y: 0.851 z: 0.851 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_arrow" id: "icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 enabled: false - visible: true - material: "" } nodes { position { x: 36.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.7 y: 0.7 - z: 1.0 - w: 1.0 } size { x: 500.0 y: 60.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Basic" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W outline { x: 0.941 y: 0.984 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -323,4 +131,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/output_list/output_list.gui b/example/components/output_list/output_list.gui index 5063895..45b6a06 100644 --- a/example/components/output_list/output_list.gui +++ b/example/components/output_list/output_list.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/components/output_list/output_list.lua b/example/components/output_list/output_list.lua index 3dabc2a..39d3323 100644 --- a/example/components/output_list/output_list.lua +++ b/example/components/output_list/output_list.lua @@ -22,7 +22,7 @@ function M:init(template, nodes) self.prefab = self:get_node("text") gui.set_enabled(self.prefab, false) - self.grid = self.druid:new_static_grid("scroll_content", "text", 1) + self.grid = self.druid:new_grid("scroll_content", "text", 1) self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") self.scroll:bind_grid(self.grid) self.scroll:set_horizontal_scroll(false) diff --git a/example/components/panel_druid_profiler/panel_druid_profiler.gui b/example/components/panel_druid_profiler/panel_druid_profiler.gui index e157c46..2470901 100644 --- a/example/components/panel_druid_profiler/panel_druid_profiler.gui +++ b/example/components/panel_druid_profiler/panel_druid_profiler.gui @@ -1,981 +1,459 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1080.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.129 y: 0.141 z: 0.157 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -530.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "group_memory" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: 89.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.306 y: 0.31 z: 0.314 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Memory" font: "text_bold" id: "text_memory" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_memory" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 199.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "2048" font: "text_bold" id: "text_memory_amount" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_memory" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 273.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.306 y: 0.31 z: 0.314 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "KB" font: "text_bold" id: "text_memory_kb" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_memory" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "group_fps" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -50.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 120.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.306 y: 0.31 z: 0.314 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "FPS" font: "text_bold" id: "text_fps" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_fps" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 17.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "60" font: "text_bold" id: "text_fps_amount" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_S outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_fps" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 65.0 y: -17.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.6 y: 0.6 - z: 1.0 - w: 1.0 } size { x: 100.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "/60" font: "text_bold" id: "text_fps_min" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_S outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_fps" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "group_components" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -50.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 350.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.306 y: 0.31 z: 0.314 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Components" font: "text_bold" id: "text_components" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_components" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 90.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "2004" font: "text_bold" id: "text_components_amount" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_components" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 530.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "group_events" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_E - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -163.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.306 y: 0.31 z: 0.314 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Events" font: "text_bold" id: "text_events" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_events" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -59.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.8 y: 0.8 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "6000" font: "text_bold" id: "text_events_amount" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "group_events" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -985,4 +463,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/panel_information/panel_information.gui b/example/components/panel_information/panel_information.gui index e9df7b8..6e9a8e1 100644 --- a/example/components/panel_information/panel_information.gui +++ b/example/components/panel_information/panel_information.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/components/properties_panel/properties/property_button.gui b/example/components/properties_panel/properties/property_button.gui index 20e4680..09831f0 100644 --- a/example/components/properties_panel/properties/property_button.gui +++ b/example/components/properties_panel/properties/property_button.gui @@ -1,184 +1,79 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.65 y: 0.65 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Button" font: "text_bold" id: "text_name" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 267.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 226.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/rect_round2_width1" id: "button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -186,143 +81,60 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 226.0 y: 4.0 - z: 0.0 - w: 1.0 } color { x: 0.894 y: 0.506 z: 0.333 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_S adjust_mode: ADJUST_MODE_STRETCH parent: "button" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.65 y: 0.65 - z: 1.0 - w: 1.0 } size { x: 250.0 y: 30.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Button" font: "text_bold" id: "text_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/properties_panel/properties/property_checkbox.gui b/example/components/properties_panel/properties/property_checkbox.gui index 69de501..0a4f7ef 100644 --- a/example/components/properties_panel/properties/property_checkbox.gui +++ b/example/components/properties_panel/properties/property_checkbox.gui @@ -1,184 +1,79 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.65 y: 0.65 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Checkbox" font: "text_bold" id: "text_name" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 174.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 40.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/rect_round2_width1" id: "button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -186,135 +81,40 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_check" id: "icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 40.0 y: 4.0 - z: 0.0 - w: 1.0 } color { x: 0.894 y: 0.506 z: 0.333 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_S adjust_mode: ADJUST_MODE_STRETCH parent: "button" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/properties_panel/properties/property_slider.gui b/example/components/properties_panel/properties/property_slider.gui index 4c47d1b..ee3b114 100644 --- a/example/components/properties_panel/properties/property_slider.gui +++ b/example/components/properties_panel/properties/property_slider.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/components/properties_panel/properties_panel.gui b/example/components/properties_panel/properties_panel.gui index 49cc600..b7833d5 100644 --- a/example/components/properties_panel/properties_panel.gui +++ b/example/components/properties_panel/properties_panel.gui @@ -1,1791 +1,330 @@ -script: "" fonts { name: "text_regular" font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 440.0 y: 350.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -210.0 y: 165.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Properties" font: "text_regular" id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_regular" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -200.0 y: 115.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 290.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "scroll_view" xanchor: XANCHOR_LEFT - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 290.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "scroll_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW adjust_mode: ADJUST_MODE_STRETCH parent: "scroll_view" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -35.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "item_size" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_FIT parent: "scroll_content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 175.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 440.0 y: 4.0 - z: 0.0 - w: 1.0 } color { x: 0.129 y: 0.141 z: 0.157 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "separator" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "druid" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -200.0 y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "propeties" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "property_slider" parent: "propeties" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/components/properties_panel/properties/property_slider.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "property_slider/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_STRETCH parent: "property_slider" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.65 - y: 0.65 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Checkbox" - font: "text_bold" id: "property_slider/text_name" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "property_slider/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 400.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "property_slider/E_Anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - adjust_mode: ADJUST_MODE_STRETCH parent: "property_slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: -20.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 60.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/rect_round2_width1" id: "property_slider/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - adjust_mode: ADJUST_MODE_FIT parent: "property_slider/E_Anchor" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 60.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.894 - y: 0.506 - z: 0.333 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/pixel" id: "property_slider/selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_SE - adjust_mode: ADJUST_MODE_STRETCH parent: "property_slider/button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: -30.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.55 - y: 0.55 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "25 %" - font: "text_bold" id: "property_slider/text_value" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "property_slider/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 234.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 160.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "property_slider/slider" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 160.0 - y: 8.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "property_slider/slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_slider/slider" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: -68.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 24.0 - y: 24.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "property_slider/slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_slider/slider" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "property_checkbox" parent: "propeties" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/components/properties_panel/properties/property_checkbox.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "property_checkbox/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_STRETCH parent: "property_checkbox" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.65 - y: 0.65 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Checkbox" - font: "text_bold" id: "property_checkbox/text_name" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "property_checkbox/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 174.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 40.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/rect_round2_width1" id: "property_checkbox/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_checkbox/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/icon_check" id: "property_checkbox/icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_checkbox/button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 40.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.894 - y: 0.506 - z: 0.333 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/pixel" id: "property_checkbox/selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_STRETCH parent: "property_checkbox/button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "property_button" parent: "propeties" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/components/properties_panel/properties/property_button.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "property_button/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_STRETCH parent: "property_button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.65 - y: 0.65 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Button" - font: "text_bold" id: "property_button/text_name" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "property_button/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 267.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 226.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.463 - y: 0.475 - z: 0.49 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/rect_round2_width1" id: "property_button/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "property_button/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 226.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.894 - y: 0.506 - z: 0.333 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/pixel" id: "property_button/selected" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_STRETCH parent: "property_button/button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.65 - y: 0.65 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 30.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Button" - font: "text_bold" id: "property_button/text_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "property_button/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -200.0 y: 115.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 0.7 y: 0.7 - z: 1.0 - w: 1.0 } size { x: 570.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "No properties for this example" font: "text_regular" id: "text_no_properties" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NW outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_regular" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -1795,4 +334,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/components/properties_panel/properties_panel.lua b/example/components/properties_panel/properties_panel.lua index 60a9f78..667aa93 100644 --- a/example/components/properties_panel/properties_panel.lua +++ b/example/components/properties_panel/properties_panel.lua @@ -31,7 +31,7 @@ function M:init(template, nodes) self.text_no_properties = self.druid:new(lang_text, "text_no_properties", "ui_no_properties") --[[@as druid.lang_text]] self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") - self.grid = self.druid:new_static_grid("scroll_content", "item_size", 1) + self.grid = self.druid:new_grid("scroll_content", "item_size", 1) self.scroll:bind_grid(self.grid) self.property_checkbox_prefab = self:get_node("property_checkbox/root") diff --git a/example/druid.gui b/example/druid.gui index 4918bc8..804ad47 100644 --- a/example/druid.gui +++ b/example/druid.gui @@ -8,8 +8,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } textures { name: "druid_logo" @@ -3919,6 +3919,109 @@ nodes { parent: "property_slider/slider" template_node_child: true } +nodes { + type: TYPE_TEMPLATE + id: "example_memory_panel" + parent: "widgets" + inherit_alpha: true + template: "/example/examples/widgets/memory_panel/example_memory_panel.gui" +} +nodes { + type: TYPE_TEMPLATE + id: "example_memory_panel/memory_panel" + parent: "example_memory_panel" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/root" + parent: "example_memory_panel/memory_panel" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "example_memory_panel/memory_panel/mini_graph" + parent: "example_memory_panel/memory_panel/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/root" + parent: "example_memory_panel/memory_panel/mini_graph" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/header" + parent: "example_memory_panel/memory_panel/mini_graph/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "example_memory_panel/memory_panel/mini_graph/text_header" + parent: "example_memory_panel/memory_panel/mini_graph/header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/icon_drag" + parent: "example_memory_panel/memory_panel/mini_graph/header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/content" + parent: "example_memory_panel/memory_panel/mini_graph/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/prefab_line" + parent: "example_memory_panel/memory_panel/mini_graph/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/mini_graph/color_low" + parent: "example_memory_panel/memory_panel/mini_graph/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/content" + parent: "example_memory_panel/memory_panel/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "example_memory_panel/memory_panel/text_max_value" + parent: "example_memory_panel/memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "example_memory_panel/memory_panel/text_per_second" + parent: "example_memory_panel/memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/line_second_1" + parent: "example_memory_panel/memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "example_memory_panel/memory_panel/line_second_2" + parent: "example_memory_panel/memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "example_memory_panel/memory_panel/text_memory" + parent: "example_memory_panel/memory_panel/content" + template_node_child: true +} nodes { position { x: -20.0 diff --git a/example/examples/basic/back_handler/basic_back_handler.gui b/example/examples/basic/back_handler/basic_back_handler.gui index 06c7705..c2a132b 100644 --- a/example/examples/basic/back_handler/basic_back_handler.gui +++ b/example/examples/basic/back_handler/basic_back_handler.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/blocker/basic_blocker.gui b/example/examples/basic/blocker/basic_blocker.gui index 96a1886..d51775b 100644 --- a/example/examples/basic/blocker/basic_blocker.gui +++ b/example/examples/basic/blocker/basic_blocker.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/button/basic_button_hold.gui b/example/examples/basic/button/basic_button_hold.gui index 23d6be9..698b082 100644 --- a/example/examples/basic/button/basic_button_hold.gui +++ b/example/examples/basic/button/basic_button_hold.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/checkbox/checkbox.gui b/example/examples/basic/checkbox/checkbox.gui index 287fcdb..3424105 100644 --- a/example/examples/basic/checkbox/checkbox.gui +++ b/example/examples/basic/checkbox/checkbox.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/checkbox_group/checkbox_group.gui b/example/examples/basic/checkbox_group/checkbox_group.gui index 275a269..2eeaef4 100644 --- a/example/examples/basic/checkbox_group/checkbox_group.gui +++ b/example/examples/basic/checkbox_group/checkbox_group.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/drag/drag.gui b/example/examples/basic/drag/drag.gui index 80572e3..563e9bd 100644 --- a/example/examples/basic/drag/drag.gui +++ b/example/examples/basic/drag/drag.gui @@ -1,241 +1,37 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "drag" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_blue.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.631 - y: 0.843 - z: 0.961 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "drag/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "drag" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Drag Me" - font: "text_bold" id: "drag/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "drag/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/drag/drag_to_node.gui b/example/examples/basic/drag/drag_to_node.gui index ec8257a..156bff0 100644 --- a/example/examples/basic/drag/drag_to_node.gui +++ b/example/examples/basic/drag/drag_to_node.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/grid/grid.gui b/example/examples/basic/grid/grid.gui index c649b07..99b7011 100644 --- a/example/examples/basic/grid/grid.gui +++ b/example/examples/basic/grid/grid.gui @@ -1,117 +1,40 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 600.0 y: 600.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "grid" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,117 +42,32 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 100.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "grid" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 90.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -237,84 +75,39 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 50.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/grid/grid.lua b/example/examples/basic/grid/grid.lua index b9928b5..db0bd16 100644 --- a/example/examples/basic/grid/grid.lua +++ b/example/examples/basic/grid/grid.lua @@ -1,7 +1,7 @@ local component = require("druid.component") ---@class grid: druid.base_component ----@field grid druid.static_grid +---@field grid druid.grid ---@field text druid.text ---@field druid druid_instance local M = component.create("grid") @@ -17,7 +17,7 @@ function M:init(template, nodes) self.prefab = self:get_node("prefab") gui.set_enabled(self.prefab, false) - self.grid = self.druid:new_static_grid("grid", "prefab", 3) + self.grid = self.druid:new_grid("grid", "prefab", 3) for index = 1, 9 do self:add_element() diff --git a/example/examples/basic/hover/hover.gui b/example/examples/basic/hover/hover.gui index 45adecd..1d6b74e 100644 --- a/example/examples/basic/hover/hover.gui +++ b/example/examples/basic/hover/hover.gui @@ -1,410 +1,64 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_mouse_hover" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_mouse_hover/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_mouse_hover" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Mouse Hover" - font: "text_bold" id: "button_mouse_hover/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_mouse_hover/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_mobile_hover" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_mobile_hover/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_mobile_hover" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Mobile Hover" - font: "text_bold" id: "button_mobile_hover/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_mobile_hover/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/input/rich_input.gui b/example/examples/basic/input/rich_input.gui index 108dc41..1e09607 100644 --- a/example/examples/basic/input/rich_input.gui +++ b/example/examples/basic/input/rich_input.gui @@ -1,918 +1,119 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "rich_input" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/rich_input.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "rich_input/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/rect_round2_width1" id: "rich_input/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -240.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 480.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Placeholder" - font: "text_bold" id: "rich_input/placeholder_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - outline { - x: 0.4 - y: 0.4 - z: 0.4 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 1 overridden_fields: 14 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -240.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 480.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "User input" - font: "text_bold" id: "rich_input/input_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 1 overridden_fields: 14 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 16.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.631 - y: 0.843 - z: 0.961 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_16" id: "rich_input/cursor_node" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input/button" - layer: "" - inherit_alpha: true - slice9 { - x: 8.0 - y: 8.0 - z: 8.0 - w: 8.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 overridden_fields: 1 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.2 - y: 1.2 - z: 1.0 - w: 1.0 - } - size { - x: 20.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "|" - font: "text_bold" id: "rich_input/cursor_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input/cursor_node" - layer: "" - inherit_alpha: false - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -150.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "rich_input_2" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/rich_input.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "rich_input_2/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input_2" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/rect_round2_width1" id: "rich_input_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input_2/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 480.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Placeholder" - font: "text_bold" id: "rich_input_2/placeholder_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.4 - y: 0.4 - z: 0.4 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input_2/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 480.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "User input" - font: "text_bold" id: "rich_input_2/input_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input_2/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 16.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.631 - y: 0.843 - z: 0.961 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_16" id: "rich_input_2/cursor_node" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "rich_input_2/button" - layer: "" - inherit_alpha: true - slice9 { - x: 8.0 - y: 8.0 - z: 8.0 - w: 8.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 overridden_fields: 1 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.2 - y: 1.2 - z: 1.0 - w: 1.0 - } - size { - x: 20.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "|" - font: "text_bold" id: "rich_input_2/cursor_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "rich_input_2/cursor_node" - layer: "" - inherit_alpha: false - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/progress_bar/basic_progress_bar.gui b/example/examples/basic/progress_bar/basic_progress_bar.gui index 975d78c..c119df4 100644 --- a/example/examples/basic/progress_bar/basic_progress_bar.gui +++ b/example/examples/basic/progress_bar/basic_progress_bar.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui b/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui index cfeff26..271abd2 100644 --- a/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui +++ b/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/radio_group/radio_group.gui b/example/examples/basic/radio_group/radio_group.gui index f4b822a..7b7f98c 100644 --- a/example/examples/basic/radio_group/radio_group.gui +++ b/example/examples/basic/radio_group/radio_group.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/rich_text/basic_rich_text.gui b/example/examples/basic/rich_text/basic_rich_text.gui index 659924a..f51575b 100644 --- a/example/examples/basic/rich_text/basic_rich_text.gui +++ b/example/examples/basic/rich_text/basic_rich_text.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/rich_text/rich_text_tags.gui b/example/examples/basic/rich_text/rich_text_tags.gui index de6d63e..f81b596 100644 --- a/example/examples/basic/rich_text/rich_text_tags.gui +++ b/example/examples/basic/rich_text/rich_text_tags.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } textures { name: "druid_logo" diff --git a/example/examples/basic/rich_text/rich_text_tags_custom.gui b/example/examples/basic/rich_text/rich_text_tags_custom.gui index 3c17183..28981a8 100644 --- a/example/examples/basic/rich_text/rich_text_tags_custom.gui +++ b/example/examples/basic/rich_text/rich_text_tags_custom.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/scroll/scroll.gui b/example/examples/basic/scroll/scroll.gui index 8931adf..335b0e5 100644 --- a/example/examples/basic/scroll/scroll.gui +++ b/example/examples/basic/scroll/scroll.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui index f713ea6..a0eb02f 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui @@ -1,117 +1,40 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 400.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 800.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -120,175 +43,48 @@ nodes { w: 16.0 } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 800.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -400.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 300.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -296,84 +92,35 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 240.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Grid Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua index ba62a6e..f026f74 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua @@ -2,7 +2,7 @@ local component = require("druid.component") ---@class scroll_bind_grid: druid.base_component ---@field scroll druid.scroll ----@field grid druid.static_grid +---@field grid druid.grid ---@field text druid.text ---@field druid druid_instance local M = component.create("scroll_bind_grid") @@ -19,7 +19,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", "prefab", 1) + self.grid = self.druid:new_grid("content", "prefab", 1) self.scroll:bind_grid(self.grid) for index = 1, 20 do diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui index 7165b82..f16a69e 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui @@ -1,117 +1,40 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -450.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 900.0 y: 360.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -120,175 +43,48 @@ nodes { w: 16.0 } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 900.0 y: 360.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: 450.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 270.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 190.0 y: 250.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -296,84 +92,36 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 150.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Grid Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua index ce762f5..7e26681 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua @@ -2,7 +2,7 @@ local component = require("druid.component") ---@class scroll_bind_grid_horizontal: druid.base_component ---@field scroll druid.scroll ----@field grid druid.static_grid +---@field grid druid.grid ---@field text druid.text ---@field druid druid_instance local M = component.create("scroll_bind_grid_horizontal") @@ -19,7 +19,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", "prefab", 99999) + self.grid = self.druid:new_grid("content", "prefab", 99999) self.scroll:bind_grid(self.grid) for index = 1, 30 do diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui index 165fbf2..603dbfd 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua index d1d6ccc..91f185a 100644 --- a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua @@ -2,7 +2,7 @@ local component = require("druid.component") ---@class scroll_bind_grid_points: druid.base_component ---@field scroll druid.scroll ----@field grid druid.static_grid +---@field grid druid.grid ---@field text druid.text ---@field druid druid_instance local M = component.create("scroll_bind_grid_points") @@ -19,7 +19,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", "prefab", 1) + self.grid = self.druid:new_grid("content", "prefab", 1) self.scroll:bind_grid(self.grid) for index = 1, 20 do diff --git a/example/examples/basic/scroll_slider/scroll_slider.gui b/example/examples/basic/scroll_slider/scroll_slider.gui index caf0a41..c056010 100644 --- a/example/examples/basic/scroll_slider/scroll_slider.gui +++ b/example/examples/basic/scroll_slider/scroll_slider.gui @@ -1,117 +1,35 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 200.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 400.0 y: 1000.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "scroll_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -120,57 +38,25 @@ nodes { w: 16.0 } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 500.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 400.0 y: 2600.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "scroll_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "scroll_view" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -178,2340 +64,450 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button1" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button1/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button1" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 1" - font: "text_bold" id: "button1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button1/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button2" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button2/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button2" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 2" - font: "text_bold" id: "button2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button2/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -500.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button3" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button3/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button3" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 3" - font: "text_bold" id: "button3/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button3/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -700.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button4" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button4/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button4" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 4" - font: "text_bold" id: "button4/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button4/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -900.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button5" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button5/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button5" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 5" - font: "text_bold" id: "button5/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button5/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -1100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button6" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button6/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button6" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 6" - font: "text_bold" id: "button6/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button6/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -1300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button7" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button7/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button7" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 7" - font: "text_bold" id: "button7/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button7/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -1500.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button8" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button8/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button8" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 8" - font: "text_bold" id: "button8/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button8/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -1700.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button9" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button9/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button9" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 9" - font: "text_bold" id: "button9/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button9/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -1900.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button10" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button10/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button10" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 10" - font: "text_bold" id: "button10/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button10/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -2100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button11" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button11/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button11" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 11" - font: "text_bold" id: "button11/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button11/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -2300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button12" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button12/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button12" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 12" - font: "text_bold" id: "button12/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button12/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -2500.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button13" parent: "scroll_content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button13/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button13" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 0.9 y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap to scroll 13" - font: "text_bold" id: "button13/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "button13/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 3 overridden_fields: 8 overridden_fields: 18 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 200.0 y: 500.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 1000.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_NE - adjust_mode: ADJUST_MODE_FIT parent: "scroll_view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -8.0 y: -24.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 48.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_16" id: "slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider_back" - layer: "" inherit_alpha: true slice9 { x: 8.0 @@ -2519,17 +515,6 @@ nodes { z: 8.0 w: 8.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/slider/basic_slider.gui b/example/examples/basic/slider/basic_slider.gui index a8f132a..7b39ff8 100644 --- a/example/examples/basic/slider/basic_slider.gui +++ b/example/examples/basic/slider/basic_slider.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_64" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 32.0 @@ -60,303 +26,63 @@ nodes { z: 32.0 w: 32.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "slider" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/slider.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "slider/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 8.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "slider/slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: -118.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 24.0 - y: 24.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "slider/slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 150.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "0 %" font: "text_bold" id: "slider_value" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/slider/basic_slider_stepped.gui b/example/examples/basic/slider/basic_slider_stepped.gui index a8f132a..7b39ff8 100644 --- a/example/examples/basic/slider/basic_slider_stepped.gui +++ b/example/examples/basic/slider/basic_slider_stepped.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_64" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 32.0 @@ -60,303 +26,63 @@ nodes { z: 32.0 w: 32.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "slider" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/slider.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/empty" id: "slider/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 8.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.129 - y: 0.141 - z: 0.157 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "slider/slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: -118.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 24.0 - y: 24.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.722 - y: 0.741 - z: 0.761 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_8" id: "slider/slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "slider/root" - layer: "" - inherit_alpha: true - slice9 { - x: 4.0 - y: 4.0 - z: 4.0 - w: 4.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 150.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "0 %" font: "text_bold" id: "slider_value" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/slider/basic_slider_vertical.gui b/example/examples/basic/slider/basic_slider_vertical.gui index f039094..bcddcd4 100644 --- a/example/examples/basic/slider/basic_slider_vertical.gui +++ b/example/examples/basic/slider/basic_slider_vertical.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/basic/swipe/basic_swipe.gui b/example/examples/basic/swipe/basic_swipe.gui index 8faba60..aa45a77 100644 --- a/example/examples/basic/swipe/basic_swipe.gui +++ b/example/examples/basic/swipe/basic_swipe.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 1000.0 y: 1000.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_64" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 32.0 @@ -60,84 +26,35 @@ nodes { z: 32.0 w: 32.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Swipe across area to action" font: "text_bold" id: "swipe_hint" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/text/basic_text.gui b/example/examples/basic/text/basic_text.gui index 185debb..24b413a 100644 --- a/example/examples/basic/text/basic_text.gui +++ b/example/examples/basic/text/basic_text.gui @@ -1,117 +1,36 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 200.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 100.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "text_area" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,84 +38,34 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 100.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Example text with default adjust" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "text_area" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/basic/text/multiline_text.gui b/example/examples/basic/text/multiline_text.gui index 3a66171..5025ac8 100644 --- a/example/examples/basic/text/multiline_text.gui +++ b/example/examples/basic/text/multiline_text.gui @@ -1,117 +1,36 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 200.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 100.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "text_area" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,84 +38,35 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 100.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Example multiline text with default adjust" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "text_area" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui index c45c867..01a8037 100644 --- a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui +++ b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui @@ -1,294 +1,81 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -400.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 300.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -296,84 +83,35 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 250.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Data Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua index bdc6eca..fb3d95e 100644 --- a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua +++ b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua @@ -17,7 +17,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.grid = self.druid:new_grid("content", self.prefab, 1) self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] local data = {} diff --git a/example/examples/data_list/basic/data_list_basic.gui b/example/examples/data_list/basic/data_list_basic.gui index c45c867..01a8037 100644 --- a/example/examples/data_list/basic/data_list_basic.gui +++ b/example/examples/data_list/basic/data_list_basic.gui @@ -1,294 +1,81 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -400.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 300.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -296,84 +83,35 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 250.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Data Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/basic/data_list_basic.lua b/example/examples/data_list/basic/data_list_basic.lua index b3a3d81..b520c1b 100644 --- a/example/examples/data_list/basic/data_list_basic.lua +++ b/example/examples/data_list/basic/data_list_basic.lua @@ -16,7 +16,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.grid = self.druid:new_grid("content", self.prefab, 1) self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] local data = {} diff --git a/example/examples/data_list/basic/data_list_horizontal_basic.gui b/example/examples/data_list/basic/data_list_horizontal_basic.gui index 31f4823..7113e09 100644 --- a/example/examples/data_list/basic/data_list_horizontal_basic.gui +++ b/example/examples/data_list/basic/data_list_horizontal_basic.gui @@ -1,294 +1,81 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: -450.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 900.0 y: 350.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 900.0 y: 350.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { x: 450.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 200.0 y: 270.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 190.0 y: 250.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "prefab" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -296,84 +83,36 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 150.0 y: 200.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Data Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "prefab" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/basic/data_list_horizontal_basic.lua b/example/examples/data_list/basic/data_list_horizontal_basic.lua index 0f21fc7..2bc5aff 100644 --- a/example/examples/data_list/basic/data_list_horizontal_basic.lua +++ b/example/examples/data_list/basic/data_list_horizontal_basic.lua @@ -15,7 +15,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", self.prefab, 1000) + self.grid = self.druid:new_grid("content", self.prefab, 1000) self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] local data = {} diff --git a/example/examples/data_list/cache_with_component/button_component.gui b/example/examples/data_list/cache_with_component/button_component.gui index f3c8623..108be79 100644 --- a/example/examples/data_list/cache_with_component/button_component.gui +++ b/example/examples/data_list/cache_with_component/button_component.gui @@ -1,117 +1,35 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 300.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 300.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,84 +37,35 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 250.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Data Item 1" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/cache_with_component/cache_with_component.gui b/example/examples/data_list/cache_with_component/cache_with_component.gui index f39b933..e5fed03 100644 --- a/example/examples/data_list/cache_with_component/cache_with_component.gui +++ b/example/examples/data_list/cache_with_component/cache_with_component.gui @@ -1,421 +1,80 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/pixel" id: "view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 350.0 y: 700.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "view" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: -300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_component" parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/examples/data_list/cache_with_component/button_component.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "button_component/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_component" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.631 - y: 0.843 - z: 0.961 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_component/panel" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_component/root" - layer: "" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Data Item 1" - font: "text_bold" id: "button_component/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_component/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/cache_with_component/cache_with_component.lua b/example/examples/data_list/cache_with_component/cache_with_component.lua index ca308e2..f336a2d 100644 --- a/example/examples/data_list/cache_with_component/cache_with_component.lua +++ b/example/examples/data_list/cache_with_component/cache_with_component.lua @@ -18,7 +18,7 @@ function M:init(template, nodes) gui.set_enabled(self.prefab, false) self.scroll = self.druid:new_scroll("view", "content") - self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.grid = self.druid:new_grid("content", self.prefab, 1) self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] self.data_list:set_use_cache(true) self.data_list.on_element_add:subscribe(self.on_element_add) diff --git a/example/examples/gamepad/gamepad_tester/gamepad_tester.gui b/example/examples/gamepad/gamepad_tester/gamepad_tester.gui index a6904ed..993e543 100644 --- a/example/examples/gamepad/gamepad_tester/gamepad_tester.gui +++ b/example/examples/gamepad/gamepad_tester/gamepad_tester.gui @@ -1,6 +1,6 @@ textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui index a7f8b55..93d6581 100644 --- a/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 90.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -60,143 +26,50 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 40.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "X" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_arrow" id: "icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui index ffa86d2..3505a94 100644 --- a/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui index ffe202d..e057ec9 100644 --- a/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 180.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -60,58 +26,25 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -90.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 180.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "fill" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,84 +52,38 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 40.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "X" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/gamepad/on_screen_control/on_screen_control.gui b/example/examples/gamepad/on_screen_control/on_screen_control.gui index 63c4bf5..774696e 100644 --- a/example/examples/gamepad/on_screen_control/on_screen_control.gui +++ b/example/examples/gamepad/on_screen_control/on_screen_control.gui @@ -1,6 +1,6 @@ textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/gamepad/on_screen_control/on_screen_input.gui b/example/examples/gamepad/on_screen_control/on_screen_input.gui index b1d3488..f005c06 100644 --- a/example/examples/gamepad/on_screen_control/on_screen_input.gui +++ b/example/examples/gamepad/on_screen_control/on_screen_input.gui @@ -1,6 +1,6 @@ textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/intro/intro/intro.gui b/example/examples/intro/intro/intro.gui index 834e285..61de634 100644 --- a/example/examples/intro/intro/intro.gui +++ b/example/examples/intro/intro/intro.gui @@ -7,8 +7,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } textures { name: "druid_logo" diff --git a/example/examples/layout/basic/basic_layout.gui b/example/examples/layout/basic/basic_layout.gui index 4bb12af..c411061 100644 --- a/example/examples/layout/basic/basic_layout.gui +++ b/example/examples/layout/basic/basic_layout.gui @@ -1,54 +1,20 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 500.0 y: 500.0 - z: 0.0 - w: 1.0 } color { x: 0.173 y: 0.184 z: 0.204 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_64" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 32.0 @@ -56,117 +22,33 @@ nodes { z: 32.0 w: 32.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 500.0 y: 500.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "layout" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 70.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_16" id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "layout" - layer: "" inherit_alpha: true slice9 { x: 8.0 @@ -174,17 +56,6 @@ nodes { z: 8.0 w: 8.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/panthera/animation_blend/animation_blend.gui b/example/examples/panthera/animation_blend/animation_blend.gui index eb98b38..ee5efc2 100644 --- a/example/examples/panthera/animation_blend/animation_blend.gui +++ b/example/examples/panthera/animation_blend/animation_blend.gui @@ -7,8 +7,8 @@ textures { texture: "/example/examples/panthera/animation_blend/assets/animation_blend.atlas" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/panthera/basic_animation/basic_animation.gui b/example/examples/panthera/basic_animation/basic_animation.gui index fef1c91..0dd7236 100644 --- a/example/examples/panthera/basic_animation/basic_animation.gui +++ b/example/examples/panthera/basic_animation/basic_animation.gui @@ -1,241 +1,38 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 200.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "button" parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_blue.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.631 - y: 0.843 - z: 0.961 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Hover Me!" - font: "text_bold" id: "button/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/widgets/examples_list.lua b/example/examples/widgets/examples_list.lua index 6209cdd..5329bc2 100644 --- a/example/examples/widgets/examples_list.lua +++ b/example/examples/widgets/examples_list.lua @@ -53,6 +53,14 @@ function M.get_examples() end) end, }, + { + name_id = "ui_example_widget_memory_panel", + information_text_id = "ui_example_widget_memory_panel_description", + template = "example_memory_panel", + root = "example_memory_panel/root", + code_url = "example/examples/widgets/memory_panel/example_memory_panel.lua", + component_class = require("example.examples.widgets.memory_panel.example_memory_panel"), + }, } end diff --git a/example/examples/widgets/hover_hint/hover_hint.gui b/example/examples/widgets/hover_hint/hover_hint.gui index 9c8190c..ce4b3c2 100644 --- a/example/examples/widgets/hover_hint/hover_hint.gui +++ b/example/examples/widgets/hover_hint/hover_hint.gui @@ -3,8 +3,8 @@ fonts { font: "/example/assets/fonts/text_regular.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/widgets/hover_hint/hover_hint_example.gui b/example/examples/widgets/hover_hint/hover_hint_example.gui index 8bb74a9..61ca0d8 100644 --- a/example/examples/widgets/hover_hint/hover_hint_example.gui +++ b/example/examples/widgets/hover_hint/hover_hint_example.gui @@ -1,6 +1,6 @@ textures { - name: "druid" - texture: "/example/assets/druid.atlas" + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { size { diff --git a/example/examples/widgets/memory_panel/example_memory_panel.gui b/example/examples/widgets/memory_panel/example_memory_panel.gui new file mode 100644 index 0000000..2732694 --- /dev/null +++ b/example/examples/widgets/memory_panel/example_memory_panel.gui @@ -0,0 +1,98 @@ +nodes { + type: TYPE_TEMPLATE + id: "memory_panel" + inherit_alpha: true + template: "/druid/widget/memory_panel/memory_panel.gui" +} +nodes { + type: TYPE_BOX + id: "memory_panel/root" + parent: "memory_panel" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "memory_panel/mini_graph" + parent: "memory_panel/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/root" + parent: "memory_panel/mini_graph" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/header" + parent: "memory_panel/mini_graph/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "memory_panel/mini_graph/text_header" + parent: "memory_panel/mini_graph/header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/icon_drag" + parent: "memory_panel/mini_graph/header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/content" + parent: "memory_panel/mini_graph/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/prefab_line" + parent: "memory_panel/mini_graph/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/mini_graph/color_low" + parent: "memory_panel/mini_graph/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/content" + parent: "memory_panel/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "memory_panel/text_max_value" + parent: "memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "memory_panel/text_per_second" + parent: "memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/line_second_1" + parent: "memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "memory_panel/line_second_2" + parent: "memory_panel/content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "memory_panel/text_memory" + parent: "memory_panel/content" + template_node_child: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/widgets/memory_panel/example_memory_panel.lua b/example/examples/widgets/memory_panel/example_memory_panel.lua new file mode 100644 index 0000000..f42f0f6 --- /dev/null +++ b/example/examples/widgets/memory_panel/example_memory_panel.lua @@ -0,0 +1,12 @@ +local memory_panel = require("druid.widget.memory_panel.memory_panel") + +---@class widget.example_memory_panel: druid.widget +local M = {} + + +function M:init() + self.memory_panel = self.druid:new_widget(memory_panel, "memory_panel") +end + + +return M \ No newline at end of file diff --git a/example/examples/windows/window_confirmation/window_confirmation.gui b/example/examples/windows/window_confirmation/window_confirmation.gui index 27ed7fc..185880f 100644 --- a/example/examples/windows/window_confirmation/window_confirmation.gui +++ b/example/examples/windows/window_confirmation/window_confirmation.gui @@ -4,55 +4,22 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { position { x: 960.0 y: 540.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 500.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -60,58 +27,22 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 700.0 y: 500.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "window" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,58 +50,25 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 250.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 92.0 - z: 0.0 - w: 1.0 } color { x: 0.902 y: 0.875 z: 0.624 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_rounded_top_32" id: "panel_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "window" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -178,663 +76,166 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Confirmation" font: "text_bold" id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "panel_header" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 300.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 100.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "button_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "panel_header" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_cross" id: "icon_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_close" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -45.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 75.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 420.0 y: 140.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Do you agree with selected action?" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -160.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_accept" parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_accept/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_accept" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Confirm" - font: "text_bold" id: "button_accept/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_accept/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 160.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_decline" parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_red.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.957 - y: 0.608 - z: 0.608 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_decline/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_decline" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Cancel" - font: "text_bold" id: "button_decline/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_decline/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -844,4 +245,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/windows/window_info/window_info.gui b/example/examples/windows/window_info/window_info.gui index 1d45e4f..3601b50 100644 --- a/example/examples/windows/window_info/window_info.gui +++ b/example/examples/windows/window_info/window_info.gui @@ -4,55 +4,22 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { position { x: 960.0 y: 540.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 500.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -60,58 +27,22 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 700.0 y: 500.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "window" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,58 +50,25 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 250.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 92.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_rounded_top_32" id: "panel_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "window" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -178,495 +76,142 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Information" font: "text_bold" id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "panel_header" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 300.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 100.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "button_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "panel_header" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_cross" id: "icon_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_close" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -45.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 700.0 y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { position { - x: 0.0 y: 75.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 420.0 y: 140.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "You are the best!" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT line_break: true parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_TEMPLATE id: "button_accept" parent: "content" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_green.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 280.0 - y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.557 - y: 0.835 - z: 0.62 - w: 1.0 - } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button_accept/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_accept" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 245.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 - } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Confirm" - font: "text_bold" id: "button_accept/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button_accept/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -676,4 +221,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/windows/window_language/window_language.gui b/example/examples/windows/window_language/window_language.gui index 1076352..4a5bd26 100644 --- a/example/examples/windows/window_language/window_language.gui +++ b/example/examples/windows/window_language/window_language.gui @@ -4,55 +4,22 @@ fonts { font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { position { x: 960.0 y: 540.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 600.0 y: 580.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_STRETCH - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -60,58 +27,22 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 600.0 y: 580.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "window" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -119,58 +50,25 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 290.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 600.0 y: 92.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_rounded_top_32" id: "panel_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT parent: "window" - layer: "" inherit_alpha: true slice9 { x: 16.0 @@ -178,490 +76,126 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.5 y: 1.5 - z: 1.0 - w: 1.0 } size { x: 300.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Language" font: "text_bold" id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "panel_header" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 250.0 y: -46.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 100.0 y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "button_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "panel_header" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/icon_cross" id: "icon_close" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button_close" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: -45.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 600.0 y: 470.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 260.0 y: 90.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "button_prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "content" - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } type: TYPE_TEMPLATE id: "button" parent: "button_prefab" - layer: "" inherit_alpha: true - alpha: 1.0 template: "/example/templates/button_text_white.gui" - template_node_child: false - custom_type: 0 - enabled: true } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 240.0 y: 70.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.941 - y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "druid/ui_circle_32" id: "button/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "druid" - inherit_alpha: true - slice9 { - x: 16.0 - y: 16.0 - z: 16.0 - w: 16.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 overridden_fields: 4 template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 220.0 y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.31 - y: 0.318 - z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "English" - font: "text_bold" id: "button/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button/root" - layer: "text_bold" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 overridden_fields: 4 overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -671,4 +205,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/windows/window_language/window_language.lua b/example/examples/windows/window_language/window_language.lua index f5f4120..8f899bc 100644 --- a/example/examples/windows/window_language/window_language.lua +++ b/example/examples/windows/window_language/window_language.lua @@ -12,7 +12,7 @@ local window_animation_panthera = require("example.examples.windows.window_anima ---@field button_close druid.button ---@field druid druid_instance ---@field lang_buttons table ----@field grid druid.static_grid +---@field grid druid.grid ---@field on_language_change druid.event local M = component.create("window_language") @@ -36,7 +36,7 @@ function M:init(template, nodes) self.button_close = self.druid:new_button("button_close", self.on_button_close) self.druid:new(lang_text, "text_header", "ui_language") - self.grid = self.druid:new_static_grid("content", self.prefab, 2) + self.grid = self.druid:new_grid("content", self.prefab, 2) self.grid.style.IS_DYNAMIC_NODE_POSES = true self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), nodes) diff --git a/example/templates/button_text_blue.gui b/example/templates/button_text_blue.gui index ca44671..1560d06 100644 --- a/example/templates/button_text_blue.gui +++ b/example/templates/button_text_blue.gui @@ -1,57 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 280.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true slice9 { @@ -60,90 +27,42 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Info" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 layers { name: "druid" } layers { name: "text_bold" } +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/templates/button_text_green.gui b/example/templates/button_text_green.gui index 41d3b0f..543f4fa 100644 --- a/example/templates/button_text_green.gui +++ b/example/templates/button_text_green.gui @@ -1,57 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 280.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.557 y: 0.835 z: 0.62 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true slice9 { @@ -60,83 +27,36 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Confirm" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -146,4 +66,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/templates/button_text_red.gui b/example/templates/button_text_red.gui index 737878b..07b46e0 100644 --- a/example/templates/button_text_red.gui +++ b/example/templates/button_text_red.gui @@ -1,57 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 280.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.957 y: 0.608 z: 0.608 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true slice9 { @@ -60,83 +27,36 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Cancel" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -146,4 +66,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/templates/button_text_white.gui b/example/templates/button_text_white.gui index 2935f42..8398f81 100644 --- a/example/templates/button_text_white.gui +++ b/example/templates/button_text_white.gui @@ -1,57 +1,23 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 280.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.941 y: 0.984 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true slice9 { @@ -60,83 +26,36 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Action" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } layers { name: "druid" @@ -146,4 +65,3 @@ layers { } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/templates/button_text_yellow.gui b/example/templates/button_text_yellow.gui index 99593a5..2e06dc6 100644 --- a/example/templates/button_text_yellow.gui +++ b/example/templates/button_text_yellow.gui @@ -1,57 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 280.0 y: 90.0 - z: 0.0 - w: 1.0 } color { x: 0.902 y: 0.875 z: 0.624 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_32" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT layer: "druid" inherit_alpha: true slice9 { @@ -60,90 +27,42 @@ nodes { z: 16.0 w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 245.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Warn" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "text_bold" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 layers { name: "druid" } layers { name: "text_bold" } +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/templates/input.gui b/example/templates/input.gui index 776bbbf..4389038 100644 --- a/example/templates/input.gui +++ b/example/templates/input.gui @@ -1,58 +1,24 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 500.0 y: 80.0 - z: 0.0 - w: 1.0 } color { x: 0.463 y: 0.475 z: 0.49 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/rect_round2_width1" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -60,84 +26,39 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -240.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 480.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Tap me to input" font: "text_bold" id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE pivot: PIVOT_W outline { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/templates/rich_input.gui b/example/templates/rich_input.gui index 5467ee9..0f109d7 100644 --- a/example/templates/rich_input.gui +++ b/example/templates/rich_input.gui @@ -1,117 +1,30 @@ -script: "" fonts { name: "text_bold" font: "/example/assets/fonts/text_bold.font" } textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 500.0 y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true visible: false - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 500.0 y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/rect_round2_width1" id: "button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -119,192 +32,77 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 480.0 y: 60.0 - z: 0.0 - w: 1.0 } color { x: 0.31 y: 0.318 z: 0.322 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "Placeholder" font: "text_bold" id: "placeholder_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER outline { x: 0.4 y: 0.4 z: 0.4 - w: 1.0 } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 480.0 y: 60.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "User input" font: "text_bold" id: "input_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "button" - layer: "" inherit_alpha: true - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: 118.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 16.0 y: 50.0 - z: 0.0 - w: 1.0 } color { x: 0.631 y: 0.843 z: 0.961 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_16" id: "cursor_node" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "button" - layer: "" inherit_alpha: true slice9 { x: 8.0 @@ -312,84 +110,37 @@ nodes { z: 8.0 w: 8.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { - x: 0.0 y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 } scale { x: 1.2 y: 1.2 - z: 1.0 - w: 1.0 } size { x: 20.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA text: "|" font: "text_bold" id: "cursor_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } shadow { x: 1.0 y: 1.0 z: 1.0 - w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "cursor_node" - layer: "" - inherit_alpha: false - alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/templates/slider.gui b/example/templates/slider.gui index ac7f71e..a1f363a 100644 --- a/example/templates/slider.gui +++ b/example/templates/slider.gui @@ -1,113 +1,36 @@ -script: "" textures { - name: "druid" - texture: "/example/assets/druid.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + name: "druid_example" + texture: "/example/assets/druid_example.atlas" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 260.0 y: 40.0 - z: 0.0 - w: 1.0 } color { x: 0.129 y: 0.141 z: 0.157 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/empty" id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } size { x: 260.0 y: 8.0 - z: 0.0 - w: 1.0 } color { x: 0.129 y: 0.141 z: 0.157 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_8" id: "slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -115,58 +38,24 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } nodes { position { x: -118.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 } size { x: 24.0 y: 24.0 - z: 0.0 - w: 1.0 } color { x: 0.722 y: 0.741 z: 0.761 - w: 1.0 } type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA texture: "druid/ui_circle_8" id: "slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "" inherit_alpha: true slice9 { x: 4.0 @@ -174,17 +63,6 @@ nodes { z: 4.0 w: 4.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true - material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/test/tests/test_static_grid.lua b/test/tests/test_static_grid.lua index 4e17ce7..0ffef0c 100644 --- a/test/tests/test_static_grid.lua +++ b/test/tests/test_static_grid.lua @@ -10,7 +10,7 @@ return function() describe("Static Grid component", function() local parent = nil - ---@type druid.static_grid + ---@type druid.grid local grid = nil local prefab = nil @@ -30,7 +30,7 @@ return function() parent = mock_gui.add_box("parent", 0, 0, 50, 50) prefab = mock_gui.add_box("prefab", 50, 50, 25, 25) - grid = druid:new_static_grid(parent, prefab, 3) + grid = druid:new_grid(parent, prefab, 3) end) after(function()