ScummVM API documentation
qd_interface_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
23#ifndef QDENGINE_QDCORE_QD_INTERFACE_BACKGROUND_H
24#define QDENGINE_QDCORE_QD_INTERFACE_BACKGROUND_H
25
26#include "qdengine/qdcore/qd_interface_element.h"
27#include "qdengine/qdcore/qd_interface_element_state.h"
28
29
30namespace QDEngine {
31
34public:
38
39 qdInterfaceBackground &operator = (const qdInterfaceBackground &bk);
40
44 }
45
49 bool keyboard_handler(Common::KeyCode vkey);
50
52
55 bool init(bool is_game_active = true);
56
58
63 }
66 return _state.animation_file();
67 }
69 int animation_flags() const {
70 return _state.animation_flags();
71 }
72
74 void set_animation_flag(int fl) {
75 _state.set_animation_flag(fl);
76 }
78 void drop_animation_flag(int fl) {
79 _state.drop_animation_flag(fl);
80 }
82 bool check_animation_flag(int fl) const {
83 return _state.check_animation_flag(fl);
84 }
85
87 bool has_animation() const {
88 return _state.has_animation();
89 }
90
91protected:
92
94 bool save_script_body(Common::WriteStream &fh, int indent = 0) const;
96 bool load_script_body(const xml::tag *p);
97
98private:
99
102};
103
104} // namespace QDEngine
105
106#endif // QDENGINE_QDCORE_QD_INTERFACE_BACKGROUND_H
Definition: path.h:52
Definition: stream.h:77
mouseEvent
События.
Definition: mouse_input.h:41
Интерфейсный элемент - фон.
Definition: qd_interface_background.h:33
bool check_animation_flag(int fl) const
Возвращает true, если для анимации установлен флаг fl.
Definition: qd_interface_background.h:82
bool keyboard_handler(Common::KeyCode vkey)
Обработчик ввода с клавиатуры.
void set_animation_file(const Common::Path &name)
Устанавливает имя файла для анимации.
Definition: qd_interface_background.h:61
bool has_animation() const
Возвращает true, если к фону привязана анимация.
Definition: qd_interface_background.h:87
qdInterfaceElement::element_type get_element_type() const
Возвращает тип элемента.
Definition: qd_interface_background.h:42
bool save_script_body(Common::WriteStream &fh, int indent=0) const
Запись данных в скрипт.
void drop_animation_flag(int fl)
Скидывает флаг анимации.
Definition: qd_interface_background.h:78
void set_animation_flag(int fl)
Устанавливает флаг анимации.
Definition: qd_interface_background.h:74
bool load_script_body(const xml::tag *p)
Загрузка данных из скрипта.
const Common::Path animation_file() const
Возвращает имя файла для анимации.
Definition: qd_interface_background.h:65
bool mouse_handler(int x, int y, mouseDispatcher::mouseEvent ev)
Обработчик событий мыши.
int animation_flags() const
Возвращает флаги анимации.
Definition: qd_interface_background.h:69
bool init(bool is_game_active=true)
Инициализация элемента.
Базовый класс для элементов GUI.
Definition: qd_interface_element.h:41
element_type
Типы элементов интерфейса.
Definition: qd_interface_element.h:65
@ EL_BACKGROUND
фон
Definition: qd_interface_element.h:67
Состояние элемента интерфейса.
Definition: qd_interface_element_state.h:156
void set_animation_flag(int fl, state_mode_t anm_id=DEFAULT_MODE)
Устанавливает флаг анимации.
Definition: qd_interface_element_state.h:212
const Common::Path animation_file(state_mode_t anm_id=DEFAULT_MODE) const
Возвращает имя файла для анимации.
Definition: qd_interface_element_state.h:203
void set_animation_file(const Common::Path &name, state_mode_t anm_id=DEFAULT_MODE)
Устанавливает имя файла для анимации.
bool check_animation_flag(int fl, state_mode_t anm_id=DEFAULT_MODE) const
Возвращает true, если для анимации установлен флаг fl.
Definition: qd_interface_element_state.h:220
int animation_flags(state_mode_t anm_id=DEFAULT_MODE) const
Возвращает флаги анимации.
Definition: qd_interface_element_state.h:207
bool has_animation(state_mode_t anm_id=DEFAULT_MODE) const
Возвращает true, если к состоянию привязана анимация.
Definition: qd_interface_element_state.h:229
void drop_animation_flag(int fl, state_mode_t anm_id=DEFAULT_MODE)
Скидывает флаг анимации.
Definition: qd_interface_element_state.h:216
const char * name() const
Возвращает имя объекта.
Definition: qd_named_object_base.h:40
XML тег.
Definition: xml_tag.h:33
Базовый класс для игровых ресурсов.
Definition: console.h:28