Move all examples to separate collections

This commit is contained in:
Insality
2021-04-04 13:39:08 +03:00
parent 04d6babdff
commit ebabb37761
20 changed files with 6957 additions and 13500 deletions

View File

@@ -0,0 +1,37 @@
name: "input"
scale_along_z: 0
embedded_instances {
id: "go"
data: "components {\n"
" id: \"overview\"\n"
" component: \"/example/examples/general/input/input.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
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,31 @@
local druid = require("druid.druid")
function init(self)
self.druid = druid.new(self)
self.druid:new_input("input_box_usual", "input_text_usual")
self.druid:new_input("input_box_password", "input_text_password", gui.KEYBOARD_TYPE_PASSWORD)
self.druid:new_input("input_box_email", "input_text_email", gui.KEYBOARD_TYPE_EMAIL)
self.druid:new_input("input_box_numpad", "input_text_numpad", gui.KEYBOARD_TYPE_NUMBER_PAD)
:set_allowed_characters("[%d,.]")
end
function final(self)
self.druid:final()
end
function update(self, dt)
self.druid:update(dt)
end
function on_message(self, message_id, message, sender)
self.druid:on_message(message_id, message, sender)
end
function on_input(self, action_id, action)
return self.druid:on_input(action_id, action)
end