mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2026-11-06 09:23:54 +00:00
Many ux and api improvements
This commit is contained in:
@@ -56,12 +56,18 @@ module CyberarmEngine
|
||||
end
|
||||
|
||||
def value=(path_or_image, retro: false, tileable: false)
|
||||
old_value = self.value
|
||||
|
||||
@path = path_or_image if path_or_image.is_a?(String)
|
||||
|
||||
@image = Gosu::Image.new(path_or_image, retro: retro, tileable: tileable) if @path
|
||||
@image = path_or_image unless @path
|
||||
|
||||
recalculate
|
||||
|
||||
publish(:changed, @image) if old_value != self.value
|
||||
|
||||
self.value
|
||||
end
|
||||
|
||||
def path
|
||||
|
||||
Reference in New Issue
Block a user