1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Issue #219: Supoort for inverted select structs

This commit is contained in:
Marc Zinnschlag 2012-11-08 17:01:26 +01:00
parent 4614d2bc8e
commit b412ebd0af
2 changed files with 9 additions and 2 deletions

View File

@ -51,12 +51,17 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
return Type_None;
}
bool MWDialogue::SelectWrapper::IsInverted() const
{
return false;
}
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
{
return selectCompareImp (mSelect, value);
return selectCompareImp (mSelect, value)!=IsInverted(); // logic XOR
}

View File

@ -31,6 +31,8 @@ namespace MWDialogue
Type getType() const;
bool IsInverted() const;
bool selectCompare (int value) const;
bool selectCompare (float value) const;