mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
21 lines
663 B
C++
21 lines
663 B
C++
#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(Vector3 pos, Vector2 size) : PfButtonBase(pos, size, "Export", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", -1, true){}
|
|
|
|
void ExportButton::onClick(){
|
|
StateManager *sm = GameManager::getSingleton()->getStateManager();
|
|
MapEditorAppState::MapEditor *mapEditor = ((MapEditorAppState*)sm->getAppStateByType((int)AppStateType::MAP_EDITOR))->getMapEditor();
|
|
mapEditor->exportMap();
|
|
}
|
|
}
|