memory tooling, state handling changes
This commit is contained in:
@@ -763,17 +763,10 @@ function ThemeManager.new(config)
|
||||
self.scalingAlgorithm = config.scalingAlgorithm
|
||||
|
||||
self._themeState = "normal"
|
||||
self._element = nil
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
---Initialize the ThemeManager with a parent element
|
||||
---@param element Element The parent Element
|
||||
function ThemeManager:initialize(element)
|
||||
self._element = element
|
||||
end
|
||||
|
||||
---Update the theme state based on element interaction state
|
||||
---@param isHovered boolean Whether element is hovered
|
||||
---@param isPressed boolean Whether element is pressed
|
||||
@@ -968,6 +961,13 @@ function ThemeManager:setTheme(themeName, componentName)
|
||||
self.themeComponent = componentName
|
||||
end
|
||||
|
||||
|
||||
--- Cleanup method to break circular references (for immediate mode)
|
||||
function ThemeManager:_cleanup()
|
||||
-- ThemeManager doesn't create circular references
|
||||
-- Theme refs are to shared theme objects
|
||||
end
|
||||
|
||||
-- Export both Theme and ThemeManager
|
||||
Theme.Manager = ThemeManager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user