mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
simplified back button
This commit is contained in:
+4
-13
@@ -7,20 +7,11 @@ namespace battleship{
|
|||||||
using namespace vb01;
|
using namespace vb01;
|
||||||
using namespace vb01Gui;
|
using namespace vb01Gui;
|
||||||
|
|
||||||
BackButton::BackButton(Vector3 pos, Vector2 size, string name, string screen) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true) {
|
BackButton::BackButton(Vector3 pos, Vector2 size, string name, string scr) :
|
||||||
this->screen = screen;
|
Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true),
|
||||||
}
|
screen(scr){}
|
||||||
|
|
||||||
void BackButton::onClick() {
|
void BackButton::onClick() {
|
||||||
ConcreteGuiManager *guiManager = ConcreteGuiManager::getSingleton();
|
ConcreteGuiManager::getSingleton()->readLuaScreenScript(screen);
|
||||||
guiManager->removeAllButtons(vector<Button*>{this});
|
|
||||||
guiManager->removeAllListboxes();
|
|
||||||
guiManager->removeAllCheckboxes();
|
|
||||||
guiManager->removeAllSliders();
|
|
||||||
guiManager->removeAllTextboxes();
|
|
||||||
|
|
||||||
guiManager->readLuaScreenScript(screen);
|
|
||||||
|
|
||||||
guiManager->removeButton(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user