ScummVM API documentation
background.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_CORE_BACKGROUND_H
23 #define NUVIE_CORE_BACKGROUND_H
24 
25 #include "ultima/nuvie/gui/widgets/gui_widget.h"
26 
27 namespace Ultima {
28 namespace Nuvie {
29 
30 class Configuration;
31 class U6Shape;
32 
33 class Background: public GUI_Widget {
34  const Configuration *config;
35  int game_type;
36 
37  U6Shape *background;
38  uint16 bg_w, bg_h;
39  uint16 x_off, y_off, right_bg_x_off, left_bg_x_off, border_width;
40 
41 public:
42 
43  Background(const Configuration *cfg);
44  ~Background() override;
45 
46  bool init();
47  uint16 get_border_width() const {
48  return border_width;
49  }
50  void Display(bool full_redraw) override;
51  bool drag_accept_drop(int x, int y, int message, void *data) override; // needed for original+_full_map
52  void drag_perform_drop(int x, int y, int message, void *data) override; // needed for original+_full_map
53  U6Shape *get_bg_shape() {
54  return background;
55  }
56  uint16 get_bg_w() const {
57  return bg_w;
58  }
59 };
60 
61 } // End of namespace Nuvie
62 } // End of namespace Ultima
63 
64 #endif
Definition: background.h:33
Definition: gui_widget.h:38
Definition: configuration.h:61
Definition: u6_shape.h:47
Definition: detection.h:27