diff --git a/example/gui/main/main.gui b/example/gui/main/main.gui index 58331c8..3e91200 100644 --- a/example/gui/main/main.gui +++ b/example/gui/main/main.gui @@ -198,7 +198,7 @@ nodes { } size { x: 600.0 - y: 1500.0 + y: 900.0 z: 0.0 w: 1.0 } @@ -2879,116 +2879,6 @@ nodes { template_node_child: true size_mode: SIZE_MODE_AUTO } -nodes { - position { - x: 0.0 - y: -890.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: 1.0 - y: 1.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: "kenney/empty" - id: "section_grid" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "scroll_content" - layer: "image" - 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 -} -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: 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: "kenney/empty" - id: "grid" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "section_grid" - layer: "image" - 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 -} nodes { position { x: 0.0 diff --git a/example/gui/main/main.gui_script b/example/gui/main/main.gui_script index 55b9f81..8973264 100644 --- a/example/gui/main/main.gui_script +++ b/example/gui/main/main.gui_script @@ -65,7 +65,7 @@ function init(self) init_swipe_control(self) - self.page = 7 + self.page = 1 main_page.setup_page(self) text_page.setup_page(self) button_page.setup_page(self) diff --git a/example/page/main_page.lua b/example/page/main_page.lua index 0877c0e..4e0925d 100644 --- a/example/page/main_page.lua +++ b/example/page/main_page.lua @@ -50,22 +50,6 @@ local function setup_progress(self) end -local function setup_grid(self) - local grid = self.druid:new_static_grid("grid", "button_template/button", 3) - - for i = 1, 12 do - local nodes = gui.clone_tree(gui.get_node("button_template/button")) - - local root = nodes["button_template/button"] - self.druid:new_button(root, function(context, param) - grid:set_offset(vmath.vector3(param)) - end, i) - self.druid:new_text(nodes["button_template/text"], "Grid"..i) - grid:add(root) - end -end - - local function setup_slider(self) local slider = self.druid:new_slider("slider_pin", vmath.vector3(95, 0, 0), function(_, value) gui.set_text(gui.get_node("text_progress_slider"), math.ceil(value * 100) .. "%") @@ -96,11 +80,6 @@ local function setup_timer(self) end -local function setup_scroll(self) - self.druid:new_scroll("main_page", "scroll_content") -end - - local function setup_back_handler(self) self.druid:new_back_handler(empty_callback, "back button") end @@ -117,10 +96,8 @@ function M.setup_page(self) setup_button(self) setup_progress(self) - setup_grid(self) setup_timer(self) setup_checkbox(self) - setup_scroll(self) setup_slider(self) setup_back_handler(self) setup_input(self)