Update properties for panel

This commit is contained in:
Insality 2025-05-18 13:04:38 +03:00
parent 2133492efe
commit fe955b6e64
3 changed files with 21 additions and 0 deletions

View File

@ -50,6 +50,14 @@ function M:set_text_button(text)
end
---@param enabled boolean
---@return druid.widget.property_button
function M:set_enabled(enabled)
self.button:set_enabled(enabled)
return self
end
function M:set_color(color_value)
color.set_color(self:get_node("button"), color_value)
end

View File

@ -73,4 +73,11 @@ function M:on_change(callback)
end
---Set the enabled state of the checkbox
---@param enabled boolean
function M:set_enabled(enabled)
self.button:set_enabled(enabled)
end
return M

View File

@ -329,6 +329,12 @@ function M:remove(widget)
end
---Force to refresh properties next update
function M:set_dirty()
self.is_dirty = true
end
function M:set_hidden(is_hidden)
self._is_hidden = is_hidden
local hidden_size = gui.get_size(self:get_node("header"))