ScummVM API documentation
explorer.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef SCUMM_EDITOR_EXPLORER_H
23#define SCUMM_EDITOR_EXPLORER_H
24
25#include "common/array.h"
26#include "common/formats/json.h"
27
28#include "scumm/debugger/resource.h"
29
30namespace Scumm {
31
32namespace Editor {
33
34class Explorer {
35private:
36 enum {
37 kColorData,
38 kColorZero,
39 kColorCount
40 };
41
42 Resource *_resource;
43
44 Common::Array<ImVec4> &_colors;
45 Common::Array<ImVec4> _explorerColors;
46
47 Common::Array<int> _selectedBlocks;
48
49 void renderTab(int fileIndex);
50 void renderTree(const Common::Array<Block> &blocks, int &selectedBlock);
51 void renderTreeNode(const Common::Array<Block> &blocks, int blockIndex, int &selectedBlock);
52 void renderBlock(int fileIndex);
53
54public:
55 Explorer(Resource *resource, Common::Array<ImVec4> &colors);
56
57 void loadState(const Common::JSONObject &json);
58 Common::JSONObject saveState() const;
59
60 void showSettings();
61
62 void render(const char *icon, ImGuiID dockSpaceId, bool *open);
63};
64
65} // End of namespace Editor
66
67} // End of namespace Scumm
68
69#endif
Definition: hashmap.h:85
Definition: explorer.h:34
Definition: resource.h:43
Definition: actor.h:30