mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Yet more Rubocopping
This commit is contained in:
@@ -26,7 +26,7 @@ class IconWindow < SpriteWindow_Base
|
||||
end
|
||||
|
||||
def clearBitmaps
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap&.dispose
|
||||
@_iconbitmap = nil
|
||||
self.contents = nil if !self.disposed?
|
||||
end
|
||||
@@ -40,13 +40,13 @@ class IconWindow < SpriteWindow_Base
|
||||
def setBitmap(file, hue = 0)
|
||||
clearBitmaps
|
||||
@name = file
|
||||
return if file == nil
|
||||
if file != ""
|
||||
return if file.nil?
|
||||
if file == ""
|
||||
@_iconbitmap = nil
|
||||
else
|
||||
@_iconbitmap = AnimatedBitmap.new(file, hue)
|
||||
# for compatibility
|
||||
self.contents = @_iconbitmap ? @_iconbitmap.bitmap : nil
|
||||
else
|
||||
@_iconbitmap = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -84,7 +84,7 @@ class PictureWindow < SpriteWindow_Base
|
||||
end
|
||||
|
||||
def clearBitmaps
|
||||
@_iconbitmap.dispose if @_iconbitmap
|
||||
@_iconbitmap&.dispose
|
||||
@_iconbitmap = nil
|
||||
self.contents = nil if !self.disposed?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user