mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-22 15:47:00 +00:00
Update 6.8
This commit is contained in:
@@ -407,6 +407,11 @@ class IconSprite < SpriteWrapper
|
||||
|
||||
# Sets the icon's filename.
|
||||
def setBitmap(file, hue = 0)
|
||||
file = pbLocalizedBitmapFilename(file)
|
||||
if isDarkMode
|
||||
darkmode_file = file + "_dark"
|
||||
file = darkmode_file if pbResolveBitmap(darkmode_file)
|
||||
end
|
||||
oldrc = self.src_rect
|
||||
clearBitmaps()
|
||||
@name = file
|
||||
@@ -468,8 +473,11 @@ class ChangelingSprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def addBitmap(key, path)
|
||||
path = pbLocalizedBitmapFilename(path)
|
||||
path_dark = path + "_dark"
|
||||
finalPath = (isDarkMode && pbResolveBitmap(path_dark)) ? path_dark : path
|
||||
@bitmaps[key].dispose if @bitmaps[key]
|
||||
@bitmaps[key] = AnimatedBitmap.new(path)
|
||||
@bitmaps[key] = AnimatedBitmap.new(finalPath)
|
||||
end
|
||||
|
||||
def changeBitmap(key)
|
||||
|
||||
Reference in New Issue
Block a user