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_NODE_MODEL_H 00026 #define CLIENT_UI_UI_NODE_MODEL_H 00027 00028 #include "../ui_nodes.h" 00029 #include "../../cl_renderer.h" 00031 #define UI_MAX_MODELS 128 00032 00034 typedef struct uiModel_s { 00035 char *id; 00036 char *need; 00037 char *anim; 00038 char *parent; 00039 char *tag; 00040 int skin; 00041 char *model; 00042 animState_t animState; 00043 vec3_t origin, scale, angles, center; 00044 vec4_t color; 00045 struct uiModel_s *next; 00046 } uiModel_t; 00047 00051 typedef struct modelExtraData_s { 00052 char *oldRefValue; 00053 vec3_t angles; 00054 vec3_t origin; 00055 vec3_t scale; 00056 void* skin; 00057 void* model; 00058 void* tag; 00059 void* animationState; 00060 void* animation; 00061 qboolean autoscale; 00062 qboolean rotateWithMouse; 00063 qboolean clipOverflow; 00064 qboolean containerLike; 00065 } modelExtraData_t; 00066 00067 uiModel_t *UI_GetUIModel(const char *modelName); 00068 void UI_DrawModelNode(struct uiNode_s *node, const char *source); 00069 void UI_RegisterModelNode(struct uiBehaviour_s *behaviour); 00070 00071 #endif