mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add hud.is_open(layoutid) --> bool
This commit is contained in:
parent
65bba0088b
commit
db05527fcf
3 changed files with 18 additions and 0 deletions
|
|
@ -756,3 +756,13 @@ void Hud::setAllowPause(bool flag) {
|
|||
}
|
||||
allowPause = flag;
|
||||
}
|
||||
|
||||
bool Hud::isOpen(const std::string& layoutid) const {
|
||||
for (const auto& element : elements) {
|
||||
auto doc = element.getDocument();
|
||||
if (doc && doc->getId() == layoutid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue