00001 00005 /* 00006 Copyright (C) 2002-2010 UFO: Alien Invasion. 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 00017 See the GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 00023 */ 00024 00025 #ifndef CLIENT_UI_UI_ICON_H 00026 #define CLIENT_UI_UI_ICON_H 00027 00028 #define UI_MAX_ICONS 128 00029 00030 typedef enum { 00031 ICON_STATUS_NORMAL = 0, 00032 ICON_STATUS_HOVER = 1, 00033 ICON_STATUS_DISABLED = 2, 00034 ICON_STATUS_CLICKED = 3, 00035 00036 ICON_STATUS_MAX 00037 } uiIconStatus_t; 00038 00039 typedef struct uiIcon_s { 00040 char name[MAX_VAR]; 00041 vec2_t size; 00042 qboolean single; 00043 qboolean blend; 00044 qboolean pack64; 00045 00046 vec4_t color[ICON_STATUS_MAX]; 00047 char* image[ICON_STATUS_MAX]; 00048 vec2_t pos[ICON_STATUS_MAX]; 00049 } uiIcon_t; 00050 00051 extern const value_t mn_iconProperties[]; 00052 00053 uiIcon_t* UI_GetIconByName(const char* name); 00054 uiIcon_t* UI_AllocStaticIcon(const char* name) __attribute__ ((warn_unused_result)); 00055 void UI_DrawIconInBox(const uiIcon_t* icon, uiIconStatus_t status, int posX, int posY, int sizeX, int sizeY); 00056 00057 #endif