| 1 | // Aseprite | 
|---|
| 2 | // Copyright (c) 2019-2020  Igara Studio S.A. | 
|---|
| 3 | // | 
|---|
| 4 | // This program is distributed under the terms of | 
|---|
| 5 | // the End-User License Agreement for Aseprite. | 
|---|
| 6 |  | 
|---|
| 7 | #ifndef APP_UI_TILESET_SELECTOR_H_INCLUDED | 
|---|
| 8 | #define APP_UI_TILESET_SELECTOR_H_INCLUDED | 
|---|
| 9 | #pragma once | 
|---|
| 10 |  | 
|---|
| 11 | #include "doc/grid.h" | 
|---|
| 12 | #include "doc/tile.h" | 
|---|
| 13 |  | 
|---|
| 14 | #include <string> | 
|---|
| 15 |  | 
|---|
| 16 | #include "tileset_selector.xml.h" | 
|---|
| 17 |  | 
|---|
| 18 | namespace doc { | 
|---|
| 19 | class Sprite; | 
|---|
| 20 | class Tileset; | 
|---|
| 21 | } | 
|---|
| 22 |  | 
|---|
| 23 | namespace app { | 
|---|
| 24 |  | 
|---|
| 25 | class TilesetSelector : public app::gen::TilesetSelector { | 
|---|
| 26 | public: | 
|---|
| 27 | struct Info { | 
|---|
| 28 | bool enabled = true; | 
|---|
| 29 | bool newTileset = true; | 
|---|
| 30 | std::string name; | 
|---|
| 31 | doc::Grid grid; | 
|---|
| 32 | int baseIndex = 1; | 
|---|
| 33 | doc::tileset_index tsi = -1; | 
|---|
| 34 | }; | 
|---|
| 35 |  | 
|---|
| 36 | TilesetSelector(const doc::Sprite* sprite, | 
|---|
| 37 | const TilesetSelector::Info& info); | 
|---|
| 38 |  | 
|---|
| 39 | Info getInfo(); | 
|---|
| 40 | }; | 
|---|
| 41 |  | 
|---|
| 42 | } // namespace app | 
|---|
| 43 |  | 
|---|
| 44 | #endif | 
|---|
| 45 |  | 
|---|