mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
widget.* to druid.widget lls class
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local color = require("druid.color")
|
||||
|
||||
---@class widget.property_button: druid.widget
|
||||
---@class druid.widget.property_button: druid.widget
|
||||
---@field root node
|
||||
---@field container druid.container
|
||||
---@field text_name druid.text
|
||||
@@ -36,7 +36,7 @@ end
|
||||
|
||||
|
||||
---@param text string
|
||||
---@return widget.property_button
|
||||
---@return druid.widget.property_button
|
||||
function M:set_text_property(text)
|
||||
self.text_name:set_text(text)
|
||||
return self
|
||||
@@ -44,7 +44,7 @@ end
|
||||
|
||||
|
||||
---@param text string
|
||||
---@return widget.property_button
|
||||
---@return druid.widget.property_button
|
||||
function M:set_text_button(text)
|
||||
self.text_button:set_text(text)
|
||||
return self
|
||||
|
@@ -1,6 +1,6 @@
|
||||
local event = require("event.event")
|
||||
|
||||
---@class widget.property_checkbox: druid.widget
|
||||
---@class druid.widget.property_checkbox: druid.widget
|
||||
---@field root node
|
||||
---@field druid druid.instance
|
||||
---@field text_name druid.text
|
||||
|
@@ -1,4 +1,4 @@
|
||||
---@class widget.property_input: druid.widget
|
||||
---@class druid.widget.property_input: druid.widget
|
||||
---@field root node
|
||||
---@field container druid.container
|
||||
---@field text_name druid.text
|
||||
@@ -23,7 +23,7 @@ end
|
||||
|
||||
|
||||
---@param text string
|
||||
---@return widget.property_input
|
||||
---@return druid.widget.property_input
|
||||
function M:set_text_property(text)
|
||||
self.text_name:set_text(text)
|
||||
return self
|
||||
@@ -31,14 +31,14 @@ end
|
||||
|
||||
|
||||
---@param text string|number
|
||||
---@return widget.property_input
|
||||
---@return druid.widget.property_input
|
||||
function M:set_text_value(text)
|
||||
self.rich_input:set_text(tostring(text))
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
---@param callback fun(self: widget.property_input, text: string)
|
||||
---@param callback fun(self: druid.widget.property_input, text: string)
|
||||
---@param callback_context any
|
||||
function M:on_change(callback, callback_context)
|
||||
self.rich_input.input.on_input_unselect:subscribe(callback, callback_context)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
local event = require("event.event")
|
||||
|
||||
---@class widget.property_left_right_selector: druid.widget
|
||||
---@class druid.widget.property_left_right_selector: druid.widget
|
||||
---@field root node
|
||||
---@field druid druid.instance
|
||||
---@field text_name druid.text
|
||||
|
@@ -1,7 +1,7 @@
|
||||
local event = require("event.event")
|
||||
local helper = require("druid.helper")
|
||||
|
||||
---@class widget.property_slider: druid.widget
|
||||
---@class druid.widget.property_slider: druid.widget
|
||||
---@field root node
|
||||
---@field container druid.container
|
||||
---@field druid druid.instance
|
||||
|
@@ -1,4 +1,4 @@
|
||||
---@class widget.property_text: druid.widget
|
||||
---@class druid.widget.property_text: druid.widget
|
||||
---@field root node
|
||||
---@field container druid.container
|
||||
---@field text_name druid.text
|
||||
@@ -24,7 +24,7 @@ end
|
||||
|
||||
|
||||
---@param text string
|
||||
---@return widget.property_text
|
||||
---@return druid.widget.property_text
|
||||
function M:set_text_property(text)
|
||||
self.text_name:set_text(text)
|
||||
return self
|
||||
@@ -32,7 +32,7 @@ end
|
||||
|
||||
|
||||
---@param text string|nil
|
||||
---@return widget.property_text
|
||||
---@return druid.widget.property_text
|
||||
function M:set_text_value(text)
|
||||
self.text_right:set_text(text or "")
|
||||
return self
|
||||
|
@@ -1,7 +1,7 @@
|
||||
local event = require("event.event")
|
||||
|
||||
|
||||
---@class widget.property_vector3: druid.widget
|
||||
---@class druid.widget.property_vector3: druid.widget
|
||||
---@field root node
|
||||
---@field container druid.container
|
||||
---@field text_name druid.text
|
||||
@@ -53,7 +53,7 @@ end
|
||||
|
||||
|
||||
---@param text string
|
||||
---@return widget.property_vector3
|
||||
---@return druid.widget.property_vector3
|
||||
function M:set_text_property(text)
|
||||
self.text_name:set_text(text)
|
||||
return self
|
||||
@@ -63,7 +63,7 @@ end
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param z number
|
||||
---@return widget.property_vector3
|
||||
---@return druid.widget.property_vector3
|
||||
function M:set_value(x, y, z)
|
||||
self.rich_input_x:set_text(tostring(x))
|
||||
self.rich_input_y:set_text(tostring(y))
|
||||
|
Reference in New Issue
Block a user