mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-18 14:02:33 +00:00
Fixed wrong method called in DSL.progress, removed unneed line, and made DSL.background use element_parent
This commit is contained in:
@@ -70,16 +70,14 @@ module CyberarmEngine
|
|||||||
options[:parent] = element_parent
|
options[:parent] = element_parent
|
||||||
options[:theme] = current_theme
|
options[:theme] = current_theme
|
||||||
|
|
||||||
element_parent( Element::Progress.new(options, block) )
|
add_element( Element::Progress.new(options, block) )
|
||||||
end
|
end
|
||||||
|
|
||||||
def background(color = Gosu::Color::NONE)
|
def background(color = Gosu::Color::NONE)
|
||||||
@containers.last.style.background = color
|
element_parent.style.background = color
|
||||||
end
|
end
|
||||||
|
|
||||||
def theme(theme)
|
def theme(theme)
|
||||||
self.is_a?(CyberarmEngine::Element::Container) ? self : @containers.last
|
|
||||||
|
|
||||||
element_parent.options[:theme] = theme
|
element_parent.options[:theme] = theme
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user