ScummVM API documentation
map_editor_view.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 NUVIE_VIEWS_MAP_EDITOR_VIEW_H
23 #define NUVIE_VIEWS_MAP_EDITOR_VIEW_H
24 
25 #include "ultima/nuvie/views/view.h"
26 
27 namespace Ultima {
28 namespace Nuvie {
29 
30 class Configuration;
31 class GUI_Button;
32 class MapWindow;
33 
34 class MapEditorView: public View {
35 private:
36  Graphics::ManagedSurface *roof_tiles;
37  MapWindow *map_window;
38  uint16 selectedTile;
39  uint16 tile_offset;
40  GUI_Button *up_button;
41  GUI_Button *down_button;
42 public:
43  MapEditorView(const Configuration *config);
44  ~MapEditorView() override;
45 
46  bool init(Screen *tmp_screen, void *view_manager, uint16 x, uint16 y, Font *f, Party *p, TileManager *tm, ObjManager *om);
47  void Display(bool full_redraw) override;
48  GUI_status KeyDown(const Common::KeyState &key) override;
49  GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
50  GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
51  GUI_status MouseMotion(int x, int y, uint8 state) override;
52 
53  void close_view() override;
54  GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override;
55 protected:
56  void setTile(uint16 x, uint16 y, uint8 level);
57  void toggleGrid();
58 private:
59  void update_selected_tile_relative(sint32 rel_value);
60 };
61 
62 } // End of namespace Nuvie
63 } // End of namespace Ultima
64 
65 #endif
Definition: managed_surface.h:51
Definition: map_window.h:73
Definition: configuration.h:61
Definition: gui_button.h:70
Definition: tile_manager.h:145
Definition: party.h:92
Definition: screen.h:41
Definition: detection.h:27
Definition: view.h:42
Definition: map_editor_view.h:34
Definition: obj_manager.h:75
Definition: keyboard.h:294
Definition: font.h:42
Definition: gui_callback.h:31