mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-09-03 04:23:36 +00:00
map editing screen accessible using the new GUI subsystem
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user