mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#ifndef MAP_EDITOR_APP_STATE_H
|
|
#define MAP_EDITOR_APP_STATE_H
|
|
|
|
#include <abstractAppState.h>
|
|
|
|
#include <vector.h>
|
|
|
|
#include <string>
|
|
|
|
namespace vb01{
|
|
class Texture;
|
|
}
|
|
|
|
namespace battleship{
|
|
class MapEditor;
|
|
class Map;
|
|
|
|
class MapEditorAppState : public gameBase::AbstractAppState{
|
|
public:
|
|
class MapEditor{
|
|
public:
|
|
MapEditor(std::string, vb01::Vector2);
|
|
private:
|
|
void generatePlane(vb01::Vector2);
|
|
void prepareGui();
|
|
void prepareTextures(std::string, bool, std::vector<vb01::Texture*>&);
|
|
inline vb01::Texture* getSkyTexture(int i){return skyTextures[i];}
|
|
inline vb01::Texture* getLandmassTexture(int i){return landmassTextures[i];}
|
|
|
|
Map *map;
|
|
std::vector<vb01::Texture*> skyTextures, landmassTextures;
|
|
};
|
|
|
|
MapEditorAppState(std::string, vb01::Vector2);
|
|
void update();
|
|
void onAttached();
|
|
void onDettached();
|
|
void onAction(int, bool);
|
|
void onAnalog(int, float);
|
|
inline MapEditor* getMapEditor(){return mapEditor;}
|
|
private:
|
|
MapEditor *mapEditor = nullptr;
|
|
std::string mapName;
|
|
vb01::Vector2 mapSize;
|
|
};
|
|
}
|
|
|
|
#endif
|