Skip to content

Commit

Permalink
#132 Add example: add/remove grid with animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed May 23, 2021
1 parent 63a6af3 commit 271fdd2
Show file tree
Hide file tree
Showing 5 changed files with 792 additions and 0 deletions.
63 changes: 63 additions & 0 deletions example/example.collection
Original file line number Diff line number Diff line change
Expand Up @@ -869,3 +869,66 @@ embedded_instances {
z: 1.0
}
}
embedded_instances {
id: "grid_animations"
data: "components {\n"
" id: \"screen_factory\"\n"
" component: \"/monarch/screen_factory.script\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
" properties {\n"
" id: \"screen_id\"\n"
" value: \"grid_animations\"\n"
" type: PROPERTY_TYPE_HASH\n"
" }\n"
" properties {\n"
" id: \"popup\"\n"
" value: \"true\"\n"
" type: PROPERTY_TYPE_BOOLEAN\n"
" }\n"
"}\n"
"embedded_components {\n"
" id: \"collectionfactory\"\n"
" type: \"collectionfactory\"\n"
" data: \"prototype: \\\"/example/examples/grid/grid_animations/grid_animations.collection\\\"\\n"
"load_dynamically: false\\n"
"\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: 0.0
y: 0.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
1 change: 1 addition & 0 deletions example/example.gui_script
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ local function init_lobby(self)
self.lobby_grid:add(get_button_disabled(self, "Static grid", "scroll_scene"))
self.lobby_grid:add(get_button_disabled(self, "Dynamic grid", "scroll_scene"))
self.lobby_grid:add(get_button_disabled(self, "Scroll binding", "scroll_scene"))
self.lobby_grid:add(get_button(self, "Add/Remove animations", "grid_animations"))

self.lobby_grid:add(get_title(self, "Data list / Infinity scroll"))
self.lobby_grid:add(get_button(self, "With static grid", "data_list_static_grid"))
Expand Down
37 changes: 37 additions & 0 deletions example/examples/grid/grid_animations/grid_animations.collection
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "grid_animations"
scale_along_z: 0
embedded_instances {
id: "go"
data: "components {\n"
" id: \"grid_animations\"\n"
" component: \"/example/examples/grid/grid_animations/grid_animations.gui\"\n"
" position {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" }\n"
" rotation {\n"
" x: 0.0\n"
" y: 0.0\n"
" z: 0.0\n"
" w: 1.0\n"
" }\n"
"}\n"
""
position {
x: 0.0
y: 0.0
z: 0.0
}
rotation {
x: 0.0
y: 0.0
z: 0.0
w: 1.0
}
scale3 {
x: 1.0
y: 1.0
z: 1.0
}
}
Loading

0 comments on commit 271fdd2

Please sign in to comment.