mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Remove on_message_input functional
This commit is contained in:
@@ -444,31 +444,6 @@ function M:on_input_interrupt()
|
||||
end
|
||||
|
||||
|
||||
function M:on_message_input(node_id, message)
|
||||
if node_id ~= self.node_id or self.disabled or not gui.is_enabled(self.node) then
|
||||
return false
|
||||
end
|
||||
|
||||
if message.action == const.MESSAGE_INPUT.BUTTON_CLICK then
|
||||
on_button_click(self)
|
||||
end
|
||||
|
||||
if message.action == const.MESSAGE_INPUT.BUTTON_LONG_CLICK then
|
||||
on_button_long_click(self)
|
||||
end
|
||||
|
||||
if message.action == const.MESSAGE_INPUT.BUTTON_DOUBLE_CLICK then
|
||||
on_button_double_click(self)
|
||||
end
|
||||
|
||||
if message.action == const.MESSAGE_INPUT.BUTTON_REPEATED_CLICK then
|
||||
on_button_repeated_click(self)
|
||||
self.is_repeated_started = false
|
||||
self.last_pressed_time = socket.gettime()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Set button enabled state.
|
||||
-- The style.on_set_enabled will be triggered.
|
||||
-- Disabled button is not clickable.
|
||||
|
@@ -357,17 +357,6 @@ function M:on_layout_change()
|
||||
end
|
||||
|
||||
|
||||
function M:on_message_input(node_id, message)
|
||||
if node_id ~= self.node_id then
|
||||
return false
|
||||
end
|
||||
|
||||
if message.action == const.MESSAGE_INPUT.TEXT_SET then
|
||||
M.set_text(self, message.value)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Calculate text width with font with respect to trailing space
|
||||
---@param text string|nil
|
||||
---@return number Width
|
||||
|
Reference in New Issue
Block a user