mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-07 15:31:02 +00:00
- Fixed: Don't warn when an Inventory item's Icon is set to "".
SVN r3720 (trunk)
This commit is contained in:
parent
93a480f52f
commit
ce8ca26bc9
2 changed files with 16 additions and 8 deletions
|
@ -27,6 +27,7 @@ public:
|
||||||
bool isValid() const { return texnum > 0; }
|
bool isValid() const { return texnum > 0; }
|
||||||
bool Exists() const { return texnum >= 0; }
|
bool Exists() const { return texnum >= 0; }
|
||||||
void SetInvalid() { texnum = -1; }
|
void SetInvalid() { texnum = -1; }
|
||||||
|
void SetNull() { texnum = 0; }
|
||||||
bool operator ==(const FTextureID &other) const { return texnum == other.texnum; }
|
bool operator ==(const FTextureID &other) const { return texnum == other.texnum; }
|
||||||
bool operator !=(const FTextureID &other) const { return texnum != other.texnum; }
|
bool operator !=(const FTextureID &other) const { return texnum != other.texnum; }
|
||||||
FTextureID operator +(int offset) throw();
|
FTextureID operator +(int offset) throw();
|
||||||
|
|
|
@ -1473,6 +1473,12 @@ DEFINE_CLASS_PROPERTY(icon, S, Inventory)
|
||||||
{
|
{
|
||||||
PROP_STRING_PARM(i, 0);
|
PROP_STRING_PARM(i, 0);
|
||||||
|
|
||||||
|
if (i == NULL || i[0] == '\0')
|
||||||
|
{
|
||||||
|
defaults->Icon.SetNull();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
defaults->Icon = TexMan.CheckForTexture(i, FTexture::TEX_MiscPatch);
|
defaults->Icon = TexMan.CheckForTexture(i, FTexture::TEX_MiscPatch);
|
||||||
if (!defaults->Icon.isValid())
|
if (!defaults->Icon.isValid())
|
||||||
{
|
{
|
||||||
|
@ -1485,6 +1491,7 @@ DEFINE_CLASS_PROPERTY(icon, S, Inventory)
|
||||||
"Icon '%s' for '%s' not found\n", i, info->Class->TypeName.GetChars());
|
"Icon '%s' for '%s' not found\n", i, info->Class->TypeName.GetChars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue