Add marked_text support. Add input example page

This commit is contained in:
Insality
2020-04-18 12:10:00 +03:00
parent 36d7bcee5a
commit 97509ca30b
10 changed files with 1073 additions and 21 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,7 @@ local text_page = require("example.page.texts")
local button_page = require("example.page.button")
local scroll_page = require("example.page.scroll")
local slider_page = require("example.page.slider")
local input_page = require("example.page.input")
local pages = {
"main_page",
@@ -15,6 +16,7 @@ local pages = {
"button_page",
"scroll_page",
"slider_page",
"input_page",
}
local function on_control_button(self, delta)
@@ -70,6 +72,7 @@ function init(self)
button_page.setup_page(self)
scroll_page.setup_page(self)
slider_page.setup_page(self)
input_page.setup_page(self)
-- Refresh state
on_control_button(self, 0)

View File

@@ -8,6 +8,7 @@ local en = {
button_page = "Button page",
scroll_page = "Scroll page",
slider_page = "Slider page",
input_page = "Input page",
ui_section_button = "Button",
ui_section_text = "Text",
ui_section_timer = "Timer",
@@ -25,6 +26,7 @@ local ru = {
button_page = "Кнопки",
scroll_page = "Скролл",
slider_page = "Слайдеры",
input_page = "Текст. ввод",
ui_section_button = "Кнопка",
ui_section_text = "Текст",
ui_section_timer = "Таймер",

12
example/page/input.lua Normal file
View File

@@ -0,0 +1,12 @@
local M = {}
function M.setup_page(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)
end
return M