34 static const char *VAR_GUIPREFIX =
"gui::";
35 static const int VAR_GUIPREFIX_LEN = strlen(VAR_GUIPREFIX);
57 name =
new char[strlen(_name)+1];
72 virtual void Set(
const char *val) = 0;
74 virtual const char *
c_str()
const = 0;
75 virtual size_t Size() {
size_t sz = (
name) ? strlen(
name) : 0;
return sz +
sizeof(*this); }
80 virtual float x(
void )
const = 0;
120 virtual void Set(
const char *val) {
121 data = ( atoi( val ) != 0 );
129 if (
guiDict && s[0] !=
'\0' ) {
146 virtual float x(
void )
const {
return data ? 1.0f : 0.0f; };
163 return (other ==
data);
166 return (
data == other);
180 operator const char *()
const {
190 return data.LengthWithoutColors();
196 return data.Length();
208 virtual void Set(
const char *val) {
217 if (
guiDict && s[0] !=
'\0' ) {
224 return sz +
data.Allocated();
232 savefile->
Write( &len,
sizeof( len ) );
241 savefile->
Read( &len,
sizeof( len ) );
243 data.Fill(
' ', len );
249 virtual float x(
void )
const {
return data[0] ? 1.0f : 0.0f; };
280 virtual void Set(
const char *val) {
289 if (
guiDict && s[0] !=
'\0' ) {
308 virtual float x(
void )
const {
assert(
false );
return 0.0f; };
339 virtual void Set(
const char *val) {
347 if (
guiDict && s[0] !=
'\0' ) {
364 virtual float x(
void )
const {
return data; };
385 return (other ==
data);
430 return data.Bottom();
437 virtual void Set(
const char *val) {
438 if ( strchr ( val,
',' ) ) {
450 if (
guiDict && s[0] !=
'\0' ) {
460 return data.ToVec4().ToString();
487 return (other ==
data);
508 virtual void Set(
const char *val) {
509 if ( strchr ( val,
',' ) ) {
510 sscanf( val,
"%f,%f", &
data.x, &
data.y );
512 sscanf( val,
"%f %f", &
data.x, &
data.y);
523 if (
guiDict && s[0] !=
'\0' ) {
528 return data.ToString();
558 return (other ==
data);
591 virtual void Set(
const char *val) {
592 if ( strchr ( val,
',' ) ) {
603 if (
guiDict && s[0] !=
'\0' ) {
608 return data.ToString();
619 return data.ToVec3();
646 return (other ==
data);
676 virtual void Set(
const char *val) {
684 if (
guiDict && s[0] !=
'\0' ) {
689 return data.ToString();
725 return (other ==
data);
728 return (
data == other);
757 operator const char *()
const {
767 return data.Length();
773 virtual void Set(
const char *val) {
789 if (
guiDict && s[0] !=
'\0' ) {
803 return sz +
data.Allocated();
814 savefile->
Write( &len,
sizeof( len ) );
823 savefile->
Read( &len,
sizeof( len ) );
825 data.Fill(
' ', len );
850 void Set(
const char *val );
int operator==(const idVec2 &other) const
virtual void WriteToSaveGame(idFile *savefile)=0
idWinFloat & operator=(const idWinFloat &other)
idVec4 & operator=(const idVec4 &other)
float & operator=(const float &other)
float GetFloat(const char *key, const char *defaultString="0") const
virtual void Set(const char *val)=0
int GetInt(const char *key, const char *defaultString="0") const
int operator==(const idVec3 &other) const
virtual void Init(const char *_name, idWindow *win)
assert(prefInfo.fullscreenBtn)
virtual float x(void) const =0
int LengthWithoutColors()
virtual void Init(const char *_name, idWindow *win)
virtual void WriteToSaveGame(idFile *savefile)
virtual const char * c_str() const
virtual float x(void) const
virtual void ReadFromSaveGame(idFile *savefile)
idWinVec2 & operator=(const idWinVec2 &other)
virtual const char * c_str() const
virtual void Set(const char *val)
virtual void Init(const char *_name, idWindow *win)
virtual void ReadFromSaveGame(idFile *savefile)
virtual const char * c_str() const
virtual void Set(const char *val)
virtual void ReadFromSaveGame(idFile *savefile)
const idVec3 & ToVec3() const
bool & operator=(const bool &other)
virtual void WriteToSaveGame(idFile *savefile)
idVec2 GetVec2(const char *key, const char *defaultString=NULL) const
int operator==(const char *other) const
virtual void Init(const char *_name, idWindow *win)
virtual void WriteToSaveGame(idFile *savefile)
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
void Set(const char *key, const char *value)
virtual const char * c_str() const
virtual float x(void) const
idWinVec4 & operator=(const idWinVec4 &other)
idRectangle & operator=(const idRectangle &other)
idWinRectangle & operator=(const idWinRectangle &other)
virtual void Init(const char *_name, idWindow *win)
void SetFloat(const char *key, float val)
virtual void Set(const char *val)
int & operator=(const int &other)
void SetGuiInfo(idDict *gd, const char *_name)
virtual void WriteToSaveGame(idFile *savefile)
idWinVar & operator=(const idWinVar &other)
idWinVec3 & operator=(const idWinVec3 &other)
virtual const char * c_str() const =0
virtual void WriteToSaveGame(idFile *savefile)
virtual void ReadFromSaveGame(idFile *savefile)
const char * GetString(const char *key, const char *defaultString="") const
virtual void WriteToSaveGame(idFile *savefile)
virtual const char * c_str() const
int operator==(const bool &other)
virtual const char * c_str() const
idVec4 GetVec4(const char *key, const char *defaultString=NULL) const
virtual void Init(const char *_name, idWindow *win)=0
virtual float x(void) const
void SetVec2(const char *key, const idVec2 &val)
bool GetBool(const char *key, const char *defaultString="0") const
GLsizei GLsizei GLenum GLenum const GLvoid * data
virtual void Init(const char *_name, idWindow *win)
idVec3 GetVector(const char *key, const char *defaultString=NULL) const
virtual void ReadFromSaveGame(idFile *savefile)=0
virtual int Read(void *buffer, int len)
virtual void Set(const char *val)
int operator==(const idVec4 &other) const
void SetMaterialPtr(const idMaterial **m)
void SetName(const char *_name)
virtual void WriteToSaveGame(idFile *savefile)
virtual void ReadFromSaveGame(idFile *savefile)
idVec3 & operator=(const idVec3 &other)
void SetBool(const char *key, bool val)
idStr & operator=(const idStr &other)
idVec2 & operator=(const idVec2 &other)
idStr & operator=(const idStr &other)
virtual void ReadFromSaveGame(idFile *savefile)
virtual float x(void) const
idDeclManager * declManager
virtual void ReadFromSaveGame(idFile *savefile)
idRectangle & operator=(const idVec4 &other)
void SetInt(const char *key, int val)
virtual const char * c_str() const
virtual void Set(const char *val)
virtual int Write(const void *buffer, int len)
virtual void ReadFromSaveGame(idFile *savefile)
virtual const char * c_str() const
int operator==(const idRectangle &other) const
const char * c_str(void) const
int operator==(const idStr &other) const
void SetGuiInfo(idDict *dict)
idWinStr & operator=(const idWinStr &other)
virtual void Set(const char *val)
void SetVec4(const char *key, const idVec4 &val)
idWinBool & operator=(const idWinBool &other)
idWinInt & operator=(const idWinInt &other)
idWinBackground & operator=(const idWinBackground &other)
void Set(const char *val)
char * va(const char *fmt,...)
int operator==(const idStr &other) const
const char * GetName() const
virtual void WriteToSaveGame(idFile *savefile)
virtual void Set(const char *val)
virtual void Init(const char *_name, idWindow *win)
virtual void Set(const char *val)
virtual void ReadFromSaveGame(idFile *savefile)
int operator==(const char *other) const
virtual void Init(const char *_name, idWindow *win)
virtual void Set(const char *val)
virtual const char * c_str() const
virtual void Init(const char *_name, idWindow *win)
void SetVector(const char *key, const idVec3 &val)
virtual void WriteToSaveGame(idFile *savefile)