Add option to resolve variable values in ToString()

This commit is contained in:
WarmUpTill
2022-12-27 14:40:44 +01:00
committed by WarmUpTill
parent cd74534e4c
commit 7ae490ca25
6 changed files with 21 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ void SourceSelection::SetSource(OBSWeakSource source)
_source = source;
}
std::string SourceSelection::ToString() const
std::string SourceSelection::ToString(bool resolve) const
{
switch (_type) {
case Type::SOURCE:
@@ -92,6 +92,9 @@ std::string SourceSelection::ToString() const
if (!var) {
return "";
}
if (resolve) {
return var->Name() + "[" + var->Value() + "]";
}
return var->Name();
}
default: