mirror of
https://github.com/Insality/druid
synced 2025-06-27 18:37:45 +02:00
Remove grid and scroll from main page in example
This commit is contained in:
parent
c4589857db
commit
1c292f44b7
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user