Menu-related panels creation moved to frontend/menu module

This commit is contained in:
MihailRis
2023-11-20 11:28:28 +03:00
parent c712c2239f
commit 926fcb1f79
7 changed files with 51 additions and 297 deletions
+8
View File
@@ -183,10 +183,18 @@ void Panel::lock(){
PagesControl::PagesControl() : Container(vec2(), vec2(1)){
}
bool PagesControl::has(std::string name) {
return pages.find(name) != pages.end();
}
void PagesControl::add(std::string name, std::shared_ptr<UINode> panel) {
pages[name] = Page{panel};
}
void PagesControl::add(std::string name, UINode* panel) {
add(name, shared_ptr<UINode>(panel));
}
void PagesControl::set(std::string name, bool history) {
auto found = pages.find(name);
if (found == pages.end()) {