Graphics Class
Layer for loading (and subsequently caching) graphical resources.
Full description:
The Graphics class handles loading and caching of graphics resources. It can adapt as the API to C changes, and hide these changes from most of the other Lua code.
Method Index
- hasLanguageFont(font)
- loadAnimations(dir, prefix)
- loadBuiltinFont()
- loadCursor(sheet, index, hot_x, hot_y)
- loadFont(sprite_table, x_sep, y_sep, ...)
- loadFontFile()
- loadGhost(dir, name, index)
- loadLanguageFont(name, sprite_table, ...)
- loadMainCursor(id)
- loadPalette(dir, name)
- loadRaw(name, width, height, dir, paldir, pal)
- loadSpriteTable(dir, name, complex, palette)
- makeGreyscaleGhost(pal)
- onChangeLanguage()
- updateTarget(target)
Member Index
- app
- builtin_font
- cache
- language_font
- load_info
- reload_functions
- reload_functions_cursors
- target
- ttf_font_data
function Graphics:Graphics(app)
Parameters:
| Name | Type | Description |
|---|---|---|
| app | ? | ? |
Declared on: line 62 of Lua/graphics.lua.
function Graphics:hasLanguageFont(font)
Parameters:
| Name | Type | Description |
|---|---|---|
| font | ? | ? |
Declared on: line 270 of Lua/graphics.lua.
function Graphics:loadAnimations(dir, prefix)
Parameters:
| Name | Type | Description |
|---|---|---|
| dir | ? | ? |
| prefix | ? | ? |
Declared on: line 388 of Lua/graphics.lua.
function Graphics:loadCursor(sheet, index, hot_x, hot_y)
Parameters:
| Name | Type | Description |
|---|---|---|
| sheet | ? | ? |
| index | ? | ? |
| hot_x | ? | ? |
| hot_y | ? | ? |
Declared on: line 127 of Lua/graphics.lua.
function Graphics:loadFont(sprite_table, x_sep, y_sep, ...)
Parameters:
| Name | Type | Description |
|---|---|---|
| sprite_table | ? | ? |
| x_sep | ? | ? |
| y_sep | ? | ? |
| ... | ? | ? |
Declared on: line 343 of Lua/graphics.lua.
function Graphics:loadFontFile()
Tries to load the font file given in the config file as unicode_font.
If it is not found it tries to find one in the operating system.
Declared on: line 93 of Lua/graphics.lua.
function Graphics:loadGhost(dir, name, index)
Parameters:
| Name | Type | Description |
|---|---|---|
| dir | ? | ? |
| name | ? | ? |
| index | ? | ? |
Declared on: line 202 of Lua/graphics.lua.
function Graphics:loadLanguageFont(name, sprite_table, ...)
Parameters:
| Name | Type | Description |
|---|---|---|
| name | ? | ? |
| sprite_table | ? | ? |
| ... | ? | ? |
Declared on: line 320 of Lua/graphics.lua.
function Graphics:loadMainCursor(id)
Parameters:
| Name | Type | Description |
|---|---|---|
| id | ? | ? |
Declared on: line 114 of Lua/graphics.lua.
function Graphics:loadPalette(dir, name)
Parameters:
| Name | Type | Description |
|---|---|---|
| dir | ? | ? |
| name | ? | ? |
Declared on: line 186 of Lua/graphics.lua.
function Graphics:loadRaw(name, width, height, dir, paldir, pal)
Parameters:
| Name | Type | Description |
|---|---|---|
| name | ? | ? |
| width | ? | ? |
| height | ? | ? |
| dir | ? | ? |
| paldir | ? | ? |
| pal | ? | ? |
Declared on: line 212 of Lua/graphics.lua.
function Graphics:loadSpriteTable(dir, name, complex, palette)
Parameters:
| Name | Type | Description |
|---|---|---|
| dir | ? | ? |
| name | ? | ? |
| complex | ? | ? |
| palette | ? | ? |
Declared on: line 410 of Lua/graphics.lua.
function Graphics:makeGreyscaleGhost(pal)
Parameters:
| Name | Type | Description |
|---|---|---|
| pal | ? | ? |
Declared on: line 156 of Lua/graphics.lua.
function Graphics:updateTarget(target)
Parameters:
| Name | Type | Description |
|---|---|---|
| target | ? | ? |
Declared on: line 436 of Lua/graphics.lua.