Minor refactoring to kill various Rubocop warnings

This commit is contained in:
Maruno17
2021-12-17 20:29:47 +00:00
parent b5ee1b211d
commit 5dc64f1709
46 changed files with 145 additions and 151 deletions

View File

@@ -106,11 +106,9 @@ class PictureWindow < SpriteWindow_Base
self.height=@_iconbitmap.bitmap.height+self.borderY
else
@_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue)
self.contents=@_iconbitmap ? @_iconbitmap.bitmap : nil
self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX :
32+self.borderX
self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY :
32+self.borderY
self.contents = @_iconbitmap&.bitmap
self.width = self.borderX + (@_iconbitmap&.bitmap&.width || 32)
self.height = self.borderY + (@_iconbitmap&.bitmap&.height || 32)
end
else
@_iconbitmap=nil