mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-30 13:15:43 -05:00
Add option to resolve variable values in ToString()
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user