Update documentation, refactoring

This commit is contained in:
Insality
2020-05-04 00:16:08 +03:00
parent 0c1bf63e13
commit 1e568c2fa6
12 changed files with 631 additions and 678 deletions

View File

@@ -5925,7 +5925,7 @@ nodes {
}
nodes {
position {
x: -300.0
x: -287.0
y: 0.0
z: 0.0
w: 1.0
@@ -7174,6 +7174,69 @@ nodes {
template_node_child: false
size_mode: SIZE_MODE_MANUAL
}
nodes {
position {
x: -197.0
y: 223.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_TEXT
blend_mode: BLEND_MODE_ALPHA
text: "View"
font: "game"
id: "scroll_smaller_view_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: "scroll_smaller_view"
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
}
nodes {
position {
x: 0.0
@@ -7264,7 +7327,7 @@ nodes {
blend_mode: BLEND_MODE_ALPHA
text: "Content"
font: "game"
id: "text"
id: "scroll_smaller_content_hint"
xanchor: XANCHOR_NONE
yanchor: YANCHOR_NONE
pivot: PIVOT_CENTER

View File

@@ -31,6 +31,7 @@ end
local function init_top_panel(self)
self.druid:new_blocker("panel_top")
self.druid:new_button("button_left/button", on_control_button, -1)
self.druid:new_button("button_right/button", on_control_button, 1)
self.header = self.druid:new_lang_text("text_header", "main_page")
@@ -60,9 +61,9 @@ function init(self)
window.set_listener(on_window_callback)
init_top_panel(self)
init_swipe_control(self)
self.page = 4
self.page = 1
main_page.setup_page(self)
text_page.setup_page(self)
button_page.setup_page(self)
@@ -70,6 +71,8 @@ function init(self)
slider_page.setup_page(self)
input_page.setup_page(self)
init_top_panel(self)
-- Refresh state
on_control_button(self, 0)
end

View File

@@ -24,7 +24,7 @@ local function init_scroll_with_grid(self)
grid_scroll:set_size(grid:get_size())
local scroll_slider = self.druid:new_slider("grid_scroll_pin", vmath.vector3(300, 0, 0), function(_, value)
local scroll_slider = self.druid:new_slider("grid_scroll_pin", vmath.vector3(287, 0, 0), function(_, value)
grid_scroll:scroll_to_percent(vmath.vector3(value, 0, 0), true)
end)
@@ -55,6 +55,7 @@ function M.setup_page(self)
-- Content with less size than view
self.druid:new_scroll("scroll_smaller_view", "scroll_smaller_content")
:set_extra_strech_size(0)
:set_inert(false)
-- Scroll with points of interests
self.druid:new_scroll("scroll_with_points", "scroll_with_points_content")