Namespace: ImageManager

ImageManager

The static class that loads images, creates bitmap objects and retains them.

Members

ImageManager.faceHeightnumberstatic

The height of a face image

ImageManager.faceWidthnumberstatic

The width of a face image

ImageManager.iconHeightnumberstatic

The height of an icon

ImageManager.iconWidthnumberstatic

The width of an icon

ImageManager.standardFaceHeightnumberstatic

The standard height of a face image
Since:
  • 1.9.0

ImageManager.standardFaceWidthnumberstatic

The standard width of a face image
Since:
  • 1.9.0

ImageManager.standardIconHeightnumberstatic

The standard height of an icon
Since:
  • 1.9.0

ImageManager.standardIconWidthnumberstatic

The standard width of an icon
Since:
  • 1.9.0

Methods

ImageManager.clear()static

Destroys all bitmap objects in the image cache

ImageManager.getFaceSize()numberstatic

Gets the face image size from database if possible, otherwise a default face size
Since:
  • 1.9.0
Returns:
TypeDescription
numberThe face image width

ImageManager.getIconSize()numberstatic

Gets the icon size from database if possible, otherwise a default icon size
Since:
  • 1.9.0
Returns:
TypeDescription
numberThe icon width

ImageManager.isBigCharacter(filename)booleanstatic

Check if the filename begins with a $ character
NameTypeDescription
filenamestringThe filename to check
Returns:
TypeDescription
booleanTrue if the filename begins with $

ImageManager.isObjectCharacter(filename)booleanstatic

Check if the filename begins with a ! character
NameTypeDescription
filenamestringThe filename to check
Returns:
TypeDescription
booleanTrue if the filename begins with !

ImageManager.isReady()booleanstatic

Check if there are any bitmaps loading
Returns:
TypeDescription
booleanTrue if there are no bitmaps loading, false if any bitmap is still loading

ImageManager.isZeroParallax(filename)booleanstatic

Check if the filename begins with a ! character
NameTypeDescription
filenamestringThe filename to check
Returns:
TypeDescription
booleanTrue if the filename begins with !

ImageManager.loadAnimation(filename)Bitmapstatic

Loads an animation with given filename, from the animations folder
NameTypeDescription
filenamestringFilename of the animation to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadBattleback1(filename)Bitmapstatic

Loads a battleback1 with given filename, from the battlebacks1 folder
NameTypeDescription
filenamestringFilename of the battleback1 to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadBattleback2(filename)Bitmapstatic

Loads a battleback2 with given filename, from the battlebacks2 folder
NameTypeDescription
filenamestringFilename of the battleback2 to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadBitmap(folder, filename)Bitmapstatic

Loads a bitmap from the given folder with given filename
NameTypeDescription
folderstringFolder part of the path to the file, for example "img/titles2/"
filenamestringFilename of the image to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap. If no filename, returns empty bitmap

ImageManager.loadBitmapFromUrl(url)Bitmapstatic

Loads a bitmap from the given url
NameTypeDescription
urlstringThe full folder + filename + extension path to the file
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadCharacter(filename)Bitmapstatic

Loads a character with given filename, from the characters folder
NameTypeDescription
filenamestringFilename of the character sheet to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadEnemy(filename)Bitmapstatic

Loads an enemy with given filename, from the enemies folder
NameTypeDescription
filenamestringFilename of the enemy to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadFace(filename)Bitmapstatic

Loads a face with given filename, from the faces folder
NameTypeDescription
filenamestringFilename of the face sheet to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadParallax(filename)Bitmapstatic

Loads a parallax with given filename, from the parallaxes folder
NameTypeDescription
filenamestringFilename of the parallax to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadPicture(filename)Bitmapstatic

Loads a picture with given filename, from the pictures folder
NameTypeDescription
filenamestringFilename of the picture to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadSvActor(filename)Bitmapstatic

Loads a side view actor sheet with given filename, from the sv_actors folder
NameTypeDescription
filenamestringFilename of the side view actor sheet to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadSvEnemy(filename)Bitmapstatic

Loads a side view enemy with given filename, from the sv_enemies folder
NameTypeDescription
filenamestringFilename of the side view enemy to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadSystem(filename)Bitmapstatic

Loads a system graphic with given filename, from the system folder
NameTypeDescription
filenamestringFilename of the system graphic to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadTileset(filename)Bitmapstatic

Loads a tileset with given filename, from the tilesets folder
NameTypeDescription
filenamestringFilename of the tileset to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadTitle1(filename)Bitmapstatic

Loads a title1 with given filename, from the titles1 folder
NameTypeDescription
filenamestringFilename of the title1 to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.loadTitle2(filename)Bitmapstatic

Loads a title2 with given filename, from the titles2 folder
NameTypeDescription
filenamestringFilename of the title2 to load (no file extension)
Returns:
TypeDescription
BitmapThe image file as a bitmap

ImageManager.throwLoadError()static

Throw a retry screen error when bitmap could not be loaded
Throws:
Retry screen error