IconManager
Constructor Summary
Public Constructor | ||
public |
images is a list of dom ids of img tags |
Member Summary
Public Members | ||
public |
|
|
public |
customIcons: * |
|
public |
iconsheets: *[] |
|
public |
tilex: * |
Method Summary
Public Methods | ||
public |
add(image: *, size: *, drawsize: *): * |
|
public |
addCustomIcon(key: *, image: *): * |
|
public |
canvasDraw(elem: *, canvas: *, g: *, icon: *, x: number, y: number, sheet: number) |
|
public |
findClosestSheet(size: *): * |
|
public |
findSheet(sheet: *): * |
|
public |
|
|
public |
getRealSize(sheet: number): * |
|
public |
getTileSize(sheet: number): * |
|
public |
|
|
public |
load(manager2: *): * |
|
public |
reset(horizontal_tile_count: *) |
|
public |
|
Public Constructors
public constructor() source
images is a list of dom ids of img tags
sizes is a list of tile sizes, one per image. you can control the final draw size by passing an array of [tilesize, drawsize] instead of just a number.
Public Members
public customIconIDMap: * source
public customIcons: * source
public iconsheets: *[] source
public tilex: * source
Public Methods
public add(image: *, size: *, drawsize: *): * source
Params:
Name | Type | Attribute | Description |
image | * | ||
size | * | ||
drawsize | * |
|
Return:
* |
public addCustomIcon(key: *, image: *): * source
Params:
Name | Type | Attribute | Description |
key | * | ||
image | * |
Return:
* |
public getCSS(icon: *, sheet: number): * source
Params:
Name | Type | Attribute | Description |
icon | * | ||
sheet | number |
|
Return:
* |
public getRealSize(sheet: number): * source
Params:
Name | Type | Attribute | Description |
sheet | number |
|
Return:
* |
public getTileSize(sheet: number): * source
Params:
Name | Type | Attribute | Description |
sheet | number |
|
Return:
* |
public isReady(sheet: number): * source
Params:
Name | Type | Attribute | Description |
sheet | number |
|
Return:
* |
public reset(horizontal_tile_count: *) source
Params:
Name | Type | Attribute | Description |
horizontal_tile_count | * |