mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:53:51 +00:00
Issue #219: Supoort for inverted select structs
This commit is contained in:
parent
4614d2bc8e
commit
b412ebd0af
2 changed files with 9 additions and 2 deletions
|
@ -51,12 +51,17 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
|
||||||
return Type_None;
|
return Type_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MWDialogue::SelectWrapper::IsInverted() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool MWDialogue::SelectWrapper::selectCompare (int value) const
|
bool MWDialogue::SelectWrapper::selectCompare (int value) const
|
||||||
{
|
{
|
||||||
return selectCompareImp (mSelect, value);
|
return selectCompareImp (mSelect, value)!=IsInverted(); // logic XOR
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MWDialogue::SelectWrapper::selectCompare (float value) const
|
bool MWDialogue::SelectWrapper::selectCompare (float value) const
|
||||||
{
|
{
|
||||||
return selectCompareImp (mSelect, value);
|
return selectCompareImp (mSelect, value)!=IsInverted(); // logic XOR
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,8 @@ namespace MWDialogue
|
||||||
|
|
||||||
Type getType() const;
|
Type getType() const;
|
||||||
|
|
||||||
|
bool IsInverted() const;
|
||||||
|
|
||||||
bool selectCompare (int value) const;
|
bool selectCompare (int value) const;
|
||||||
|
|
||||||
bool selectCompare (float value) const;
|
bool selectCompare (float value) const;
|
||||||
|
|
Loading…
Reference in a new issue