1 | // Aseprite |
2 | // Copyright (C) 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_CMD_SET_TILESET_BASE_INDEX_H_INCLUDED |
8 | #define APP_CMD_SET_TILESET_BASE_INDEX_H_INCLUDED |
9 | #pragma once |
10 | |
11 | #include "app/cmd.h" |
12 | #include "app/cmd/with_tileset.h" |
13 | |
14 | namespace app { |
15 | namespace cmd { |
16 | using namespace doc; |
17 | |
18 | class SetTilesetBaseIndex : public Cmd |
19 | , public WithTileset { |
20 | public: |
21 | SetTilesetBaseIndex(Tileset* tileset, int baseIndex); |
22 | |
23 | protected: |
24 | void onExecute() override; |
25 | void onUndo() override; |
26 | size_t onMemSize() const override { |
27 | return sizeof(*this); |
28 | } |
29 | |
30 | private: |
31 | int m_oldBaseIndex; |
32 | int m_newBaseIndex; |
33 | }; |
34 | |
35 | } // namespace cmd |
36 | } // namespace app |
37 | |
38 | #endif |
39 | |