convenience method

This commit is contained in:
devZoGok
2023-08-13 12:12:25 +03:00
parent dcb243d737
commit b6c43f5c2c
2 changed files with 20 additions and 2 deletions
+13 -2
View File
@@ -44,8 +44,6 @@ namespace vb01Gui{
for (Textbox *t : textboxes){
t->update();
if(t->isDeleteCharacters())
t->deleteCharacter();
}
}
@@ -252,4 +250,17 @@ namespace vb01Gui{
textboxes.pop_back();
}
}
void AbstractGuiManager::removeAllGuiElements(
vector<Button*> buttonExceptions,
vector<Listbox*> listboxExceptions,
vector<Checkbox*> checkboxExceptions,
vector<Slider*> sliderExceptions,
vector<Textbox*> textboxExceptions){
removeAllButtons(buttonExceptions);
removeAllListboxes();
removeAllCheckboxes();
removeAllSliders();
removeAllTextboxes();
}
}
+7
View File
@@ -31,6 +31,13 @@ namespace vb01Gui{
void removeAllCheckboxes();
void removeAllSliders();
void removeAllTextboxes();
void removeAllGuiElements(
std::vector<Button*> = std::vector<Button*>{},
std::vector<Listbox*> = std::vector<Listbox*>{},
std::vector<Checkbox*> = std::vector<Checkbox*>{},
std::vector<Slider*> = std::vector<Slider*>{},
std::vector<Textbox*> = std::vector<Textbox*>{}
);
inline std::vector<Button*> getButtons(){return buttons;}
inline std::vector<Listbox*> getListboxes(){return listboxes;}
inline std::vector<Textbox*> getTextboxes(){return textboxes;}