![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Subpage for tileset editing and use. Used by the map editor page. More...
#include <Tileset.hpp>
Public Types | |
enum | Active { Tiles , Animations , CollisionTiles , TownTiles , CatchTiles , LevelTiles } |
using | DeleteCb = std::function< void(core::map::Tile::IdType, bool)> |
Public Member Functions | |
Tileset (bl::engine::Engine &engine, const DeleteCb &deleteCb, MapArea &map) | |
Creates the GUI elements. More... | |
bool | loadTileset (const std::string &tileset) |
Loads the given tileset and updates the GUI elements. More... | |
void | setGUI (bl::gui::GUI *gui) |
Sets the parent GUI object. More... | |
bl::gui::Element::Ptr | getContent () |
Returns the gui element to pack. More... | |
Active | getActiveTool () const |
Returns what is currently selected as the active edit type. More... | |
core::map::Tile::IdType | getActiveTile () const |
Returns the id of the active tile. More... | |
core::map::Tile::IdType | getActiveAnim () const |
Returns the id of the active animation. More... | |
core::map::Collision | getActiveCollision () const |
Returns the active collision type. More... | |
std::uint8_t | getActiveCatch () const |
Returns the active catch type. More... | |
std::uint8_t | getActiveTown () const |
Returns the currently selected town. More... | |
core::map::LevelTransition | getActiveLevel () const |
Returns the actively selected level transition type. More... | |
bool | unsavedChanges () const |
Returns whether or not the tileset is in a dirty state. More... | |
void | markSaved () |
Marks the tileset clean. More... | |
void | refresh () |
Refreshes the GUI. More... | |
Subpage for tileset editing and use. Used by the map editor page.
Definition at line 27 of file Tileset.hpp.
using editor::page::Tileset::DeleteCb = std::function<void(core::map::Tile::IdType, bool)> |
Definition at line 30 of file Tileset.hpp.
Enumerator | |
---|---|
Tiles | |
Animations | |
CollisionTiles | |
TownTiles | |
CatchTiles | |
LevelTiles |
Definition at line 29 of file Tileset.hpp.
editor::page::Tileset::Tileset | ( | bl::engine::Engine & | engine, |
const DeleteCb & | deleteCb, | ||
MapArea & | map | ||
) |
Creates the GUI elements.
engine | The game engine instance |
deleteCb | Called when a tile or animation is removed |
map | The map being edited |
Definition at line 32 of file Tileset.cpp.
core::map::Tile::IdType editor::page::Tileset::getActiveAnim | ( | ) | const |
Returns the id of the active animation.
Definition at line 183 of file Tileset.cpp.
std::uint8_t editor::page::Tileset::getActiveCatch | ( | ) | const |
Returns the active catch type.
Definition at line 187 of file Tileset.cpp.
core::map::Collision editor::page::Tileset::getActiveCollision | ( | ) | const |
Returns the active collision type.
Definition at line 185 of file Tileset.cpp.
core::map::LevelTransition editor::page::Tileset::getActiveLevel | ( | ) | const |
Returns the actively selected level transition type.
Definition at line 191 of file Tileset.cpp.
core::map::Tile::IdType editor::page::Tileset::getActiveTile | ( | ) | const |
Returns the id of the active tile.
Definition at line 181 of file Tileset.cpp.
Tileset::Active editor::page::Tileset::getActiveTool | ( | ) | const |
Returns what is currently selected as the active edit type.
Definition at line 179 of file Tileset.cpp.
std::uint8_t editor::page::Tileset::getActiveTown | ( | ) | const |
Returns the currently selected town.
Definition at line 189 of file Tileset.cpp.
Element::Ptr editor::page::Tileset::getContent | ( | ) |
Returns the gui element to pack.
Definition at line 177 of file Tileset.cpp.
bool editor::page::Tileset::loadTileset | ( | const std::string & | tileset | ) |
Loads the given tileset and updates the GUI elements.
tileset | The path to the tileset to load |
Definition at line 193 of file Tileset.cpp.
void editor::page::Tileset::markSaved | ( | ) |
Marks the tileset clean.
Definition at line 250 of file Tileset.cpp.
void editor::page::Tileset::refresh | ( | ) |
Refreshes the GUI.
Definition at line 252 of file Tileset.cpp.
void editor::page::Tileset::setGUI | ( | bl::gui::GUI * | gui | ) |
Sets the parent GUI object.
Definition at line 172 of file Tileset.cpp.
bool editor::page::Tileset::unsavedChanges | ( | ) | const |
Returns whether or not the tileset is in a dirty state.
Definition at line 248 of file Tileset.cpp.