|
UFO: Alien Invasion
|
#include "ui_main.h"#include "ui_internal.h"#include "ui_parse.h"#include "ui_sprite.h"#include "ui_render.h"Go to the source code of this file.
Functions | |
| static uiSprite_t * | UI_AutoGenerateSprite (const char *name) |
| Search a file name inside pics/ according to the sprite name If it exists, generate a "single" sprite using the size of the image. | |
| static bool | UI_SpriteExists (const char *name) |
| Check if an sprite name exists. | |
| uiSprite_t * | UI_GetSpriteByName (const char *name) |
| Return an sprite by is name. | |
| uiSprite_t * | UI_AllocStaticSprite (const char *name) |
| Allocate an sprite to the UI static memory. | |
| void | UI_DrawSpriteInBox (bool flip, const uiSprite_t *sprite, uiSpriteStatus_t status, int posX, int posY, int sizeX, int sizeY) |
Variables | |
| const value_t | ui_spriteProperties [] |
| static const int | tile_template_17_1_3 [] |
| static const int | tile_template_25_1_3 [] |
| static const int | tile_template_popup [] |
| uiSprite_t * UI_AllocStaticSprite | ( | const char * | name | ) |
Allocate an sprite to the UI static memory.
| [in] | name | Name of the sprite |
Definition at line 130 of file ui_sprite.cpp.
References Com_Error(), ERR_FATAL, name, uiSprite_t::name, OBJZERO, Q_strncpyz(), ui_global, UI_MAX_SPRITES, and UI_SpriteExists().
Referenced by UI_AutoGenerateSprite(), and UI_ParseSprite().
|
static |
Search a file name inside pics/ according to the sprite name If it exists, generate a "single" sprite using the size of the image.
| name | Name of the sprite |
Definition at line 65 of file ui_sprite.cpp.
References Com_sprintf(), image_t::height, i, uiSprite_t::image, MAX_QPATH, name, Q_strncpyz(), uiSprite_t::size, SPRITE_STATUS_MAX, SPRITE_STATUS_NORMAL, UI_AllocStaticSprite(), UI_AllocStaticString(), UI_LoadImage(), and image_t::width.
Referenced by UI_GetSpriteByName().
| void UI_DrawSpriteInBox | ( | bool | flip, |
| const uiSprite_t * | sprite, | ||
| uiSpriteStatus_t | status, | ||
| int | posX, | ||
| int | posY, | ||
| int | sizeX, | ||
| int | sizeY ) |
| [in] | flip | Flip the icon rendering (horizontal) |
| [in] | sprite | Context sprite |
| [in] | status | The state of the sprite node |
| [in] | posX,posY | Absolute X/Y position of the top-left corner |
| [in] | sizeX,sizeY | Width/height of the bounding box |
Definition at line 187 of file ui_sprite.cpp.
References uiSprite_t::blend, uiSprite_t::border, uiSprite_t::color, uiSprite_t::image, uiSprite_t::pack64, uiSprite_t::pos, R_Color(), uiSprite_t::single, uiSprite_t::size, SPRITE_STATUS_MAX, SPRITE_STATUS_NORMAL, tile_template_17_1_3, tile_template_25_1_3, tile_template_popup, uiSprite_t::tiled_17_1_3, uiSprite_t::tiled_25_1_3, uiSprite_t::tiled_popup, UI_DrawBorderedPanel(), UI_DrawNormImageByName(), UI_DrawPanel(), and Vector2FromInt.
Referenced by uiButtonNode::draw(), uiCheckBoxNode::draw(), uiOptionListNode::draw(), uiOptionTreeNode::draw(), uiPanelNode::draw(), uiRadioButtonNode::draw(), uiSpinnerNode::draw(), uiTabNode::draw(), uiTextEntryNode::draw(), uiWindowNode::draw(), and UI_MessageDraw().
| uiSprite_t * UI_GetSpriteByName | ( | const char * | name | ) |
Return an sprite by is name.
| [in] | name | Name of the sprite |
Definition at line 115 of file ui_sprite.cpp.
References i, name, Q_streq, UI_AutoGenerateSprite(), and ui_global.
Referenced by uiOptionTreeNode::draw(), GAME_GetImportData(), UI_AbstractOption_SetBackgroundByName(), UI_Button_SetBackgroundByName(), UI_Button_SetIconByName(), UI_CheckBox_SetBackgroundByName(), UI_CheckBox_SetIconCheckedByName(), UI_CheckBox_SetIconUncheckedByName(), UI_CheckBox_SetIconUnknownByName(), UI_InitRawActionValue(), UI_MessageGetIcon(), UI_NodeSetProperty(), UI_Option_SetIconByName(), UI_Panel_SetBackgroundByName(), UI_ParseProperty(), UI_RadioButton_SetBackgroundByName(), UI_RadioButton_SetIconByName(), UI_Spinner_SetBackgroundByName(), UI_Spinner_SetBottomIconByName(), UI_Spinner_SetTopIconByName(), UI_TextEntry_SetBackgroundByName(), and UI_Window_SetBackgroundByName().
|
static |
Check if an sprite name exists.
| [in] | name | Name of the sprite |
Definition at line 99 of file ui_sprite.cpp.
References i, MEMBER_SIZEOF, name, and ui_global.
Referenced by UI_AllocStaticSprite().
|
static |
Template to draw a tiled texture with corner size of 17 pixels, middle size of 1 pixel, margin between tiles of 3 pixels
Definition at line 153 of file ui_sprite.cpp.
Referenced by UI_DrawSpriteInBox().
|
static |
Template to draw a tiled texture with corner size of 17 pixels, middle size of 1 pixel, margin between tiles of 3 pixels
Definition at line 164 of file ui_sprite.cpp.
Referenced by UI_DrawSpriteInBox().
|
static |
Template to draw a tiled texture with used for popup windows
Definition at line 174 of file ui_sprite.cpp.
Referenced by UI_DrawSpriteInBox().
| const value_t ui_spriteProperties[] |
Definition at line 31 of file ui_sprite.cpp.
Referenced by UI_ParseSprite().