UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_parse.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
../../common/scripts.h
"
28
29
struct
uiNode_t
;
30
struct
uiAction_s;
31
struct
value_s;
32
33
bool
UI_ParseWindow
(
const
char
*
type
,
const
char
*
name
,
const
char
** text);
34
bool
UI_ParseComponent
(
const
char
*
type
,
const
char
*
name
,
const
char
** text);
35
bool
UI_ParseSprite
(
const
char
*
name
,
const
char
** text);
36
bool
UI_ParseUIModel
(
const
char
*
name
,
const
char
** text);
37
float
UI_GetReferenceFloat
(
uiNode_t
const
* node,
const
void
* ref);
38
const
char
*
UI_GetReferenceString
(
uiNode_t
const
* node,
const
char
* ref)
__attribute__
((warn_unused_result));
39
const
value_t
*
UI_FindPropertyByName
(
const
value_t
* propertyList,
const
char
*
name
)
__attribute__
((warn_unused_result));
40
char
*
UI_AllocStaticString
(
const
char
*
string
,
int
size
)
__attribute__
((warn_unused_result));
41
float
*
UI_AllocStaticFloat
(
int
count
)
__attribute__
((warn_unused_result));
42
vec4_t
*
UI_AllocStaticColor
(
int
count
)
__attribute__
((warn_unused_result));
43
struct
uiAction_s*
UI_AllocStaticAction
(
void
)
__attribute__
((warn_unused_result));
44
bool
UI_InitRawActionValue
(
struct
uiAction_s* action,
uiNode_t
* node,
const
struct
value_s* property,
const
char
*
string
);
45
46
bool
UI_TokenIsReserved
(
const
char
*
name
);
47
bool
UI_TokenIsName
(
const
char
*
name
,
bool
isQuoted);
48
49
/* main special type */
51
#define V_UI_MASK 0x8F00
52
#define V_UI 0x8000
53
#define V_NOT_UI 0
54
#define V_UI_ACTION (V_UI + 0)
55
#define V_UI_EXCLUDERECT (V_UI + 1)
56
#define V_UI_SPRITEREF (V_UI + 3)
57
#define V_UI_IF (V_UI + 4)
58
#define V_UI_DATAID (V_UI + 5)
59
#define V_UI_CVAR (V_UI + 0x0100)
60
#define V_UI_REF (V_UI + 0x0200)
61
#define V_UI_NODEMETHOD (V_UI + 0x0400)
62
#define V_UI_NODEMETHOD_LUA (V_UI + 0x0800)
63
64
/* alias */
65
#define V_UI_ALIGN V_INT
66
67
/* composite special type */
68
#define V_CVAR_OR_FLOAT (V_UI_CVAR + V_FLOAT)
69
#define V_CVAR_OR_STRING (V_UI_CVAR + V_STRING)
70
#define V_CVAR_OR_LONGSTRING (V_UI_CVAR + V_LONGSTRING)
71
#define V_REF_OF_STRING (V_UI_REF + V_STRING)
__attribute__
#define __attribute__(x)
Definition
cxx.h:37
size
voidpf void uLong size
Definition
ioapi.h:42
count
QGL_EXTERN GLuint count
Definition
r_gl.h:99
type
QGL_EXTERN GLint GLenum type
Definition
r_gl.h:94
name
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition
r_gl.h:110
scripts.h
Header for script parsing functions.
uiNode_t
Atomic structure used to define most of the UI.
Definition
ui_nodes.h:80
value_t
Definition
scripts.h:167
vec4_t
vec_t vec4_t[4]
Definition
ufotypes.h:40
UI_GetReferenceFloat
float UI_GetReferenceFloat(const uiNode_t *const node, const void *ref)
Returns the value of the reference variable.
Definition
ui_parse.cpp:1434
UI_GetReferenceString
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
Definition
ui_parse.cpp:1406
UI_FindPropertyByName
const value_t * UI_FindPropertyByName(const value_t *propertyList, const char *name)
Find a value_t by name into a array of value_t.
Definition
ui_parse.cpp:154
UI_ParseWindow
bool UI_ParseWindow(const char *type, const char *name, const char **text)
Parse a window.
Definition
ui_parse.cpp:1336
UI_AllocStaticString
char * UI_AllocStaticString(const char *string, int size)
Allocate a string into the UI static memory.
Definition
ui_parse.cpp:204
UI_AllocStaticColor
vec4_t * UI_AllocStaticColor(int count)
Allocate a color into the UI static memory.
Definition
ui_parse.cpp:187
UI_ParseSprite
bool UI_ParseSprite(const char *name, const char **text)
Definition
ui_parse.cpp:1213
UI_InitRawActionValue
bool UI_InitRawActionValue(uiAction_t *action, uiNode_t *node, const value_t *property, const char *string)
Definition
ui_parse.cpp:238
UI_ParseUIModel
bool UI_ParseUIModel(const char *name, const char **text)
parses the models.ufo and all files where UI models (menu_model) are defined
Definition
ui_parse.cpp:1134
UI_TokenIsName
bool UI_TokenIsName(const char *name, bool isQuoted)
Definition
ui_parse.cpp:126
UI_AllocStaticAction
uiAction_t * UI_AllocStaticAction(void)
Allocate an action.
Definition
ui_parse.cpp:221
UI_AllocStaticFloat
float * UI_AllocStaticFloat(int count)
Allocate a float into the UI static memory.
Definition
ui_parse.cpp:171
UI_ParseComponent
bool UI_ParseComponent(const char *type, const char *name, const char **text)
Parse a component.
Definition
ui_parse.cpp:1261
UI_TokenIsReserved
bool UI_TokenIsReserved(const char *name)
Definition
ui_parse.cpp:82
src
client
ui
ui_parse.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.18.0