mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
map editor buttons on the title screen
This commit is contained in:
+14
-6
@@ -1,4 +1,6 @@
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include <vector.h>
|
||||
#include <util.h>
|
||||
|
||||
@@ -327,12 +329,18 @@ namespace battleship{
|
||||
}
|
||||
}
|
||||
|
||||
void GuiAppState::removeAllButtons() {
|
||||
while (buttons.size() > 0) {
|
||||
delete buttons[buttons.size() - 1];
|
||||
buttons.pop_back();
|
||||
}
|
||||
}
|
||||
void GuiAppState::removeAllButtons(vector<Button*> exceptions){
|
||||
int targetId = 0;
|
||||
|
||||
while(targetId != buttons.size()){
|
||||
if(find(exceptions.begin(), exceptions.end(), buttons[targetId]) == exceptions.end()){
|
||||
delete buttons[targetId];
|
||||
buttons.erase(buttons.begin() + targetId);
|
||||
}
|
||||
else
|
||||
targetId++;
|
||||
}
|
||||
}
|
||||
|
||||
void GuiAppState::removeAllListboxes() {
|
||||
while (listboxes.size() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user