mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Add functions stubs
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
--- Component to handle basic GUI button
|
||||
-- @module druid.button
|
||||
|
||||
-- TODO: Add button mode:
|
||||
-- Long tap
|
||||
-- Repeated tap
|
||||
-- Double tap?
|
||||
|
||||
local const = require("druid.const")
|
||||
local helper = require("druid.helper")
|
||||
local component = require("druid.component")
|
||||
@@ -148,4 +143,41 @@ function M.set_click_zone(self, zone)
|
||||
end
|
||||
|
||||
|
||||
-- TODO: implement them all!
|
||||
--- Set key-code to trigger this button
|
||||
function M.set_key_trigger(self, key)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Get key-code to trigger this button
|
||||
function M.get_key_trigger(self)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Set usual button callback
|
||||
function M.set_callback(self, callback)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Repeat callback always, while holding button
|
||||
function M.set_hold_callback(self, callback)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Get doubletap callback on this button
|
||||
function M.set_double_tap_callback(self, callback)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Single callbacka after long_tap. No usual callback invoked
|
||||
function M.set_long_tap_callback(self, callback)
|
||||
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
15
druid/base/input.lua
Normal file
15
druid/base/input.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
--- Druid input text component
|
||||
-- @local unimplemented
|
||||
-- @module druid.input
|
||||
|
||||
local component = require("druid.component")
|
||||
|
||||
local M = component.create("input")
|
||||
|
||||
|
||||
function M.init(self, node, callback, click_node)
|
||||
self.style = self:get_style()
|
||||
end
|
||||
|
||||
|
||||
return M
|
Reference in New Issue
Block a user