map editing screen accessible using the new GUI subsystem

This commit is contained in:
devZoGok
2023-07-01 17:28:33 +03:00
parent 0c3c6b712f
commit 4ee08f1c49
19 changed files with 313 additions and 43 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "exportButton.h"
#include "gameManager.h"
#include "mapEditorAppState.h"
#include <stateManager.h>
namespace battleship{
using namespace std;
using namespace vb01;
using namespace vb01Gui;
using namespace gameBase;
ExportButton::ExportButton(Vector2 pos, Vector2 size) : Button(pos, size, "Export", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}
void ExportButton::onClick(){
StateManager *sm = GameManager::getSingleton()->getStateManager();
MapEditorAppState::MapEditor *mapEditor = ((MapEditorAppState*)sm->getAppStateByType((int)AppStateType::MAP_EDITOR))->getMapEditor();
mapEditor->exportMap();
}
}