The basic minimap class. More...
#include <minimap.hpp>


Public Member Functions | |
| tminimap () | |
| void | set_active (const bool) |
| Inherited from tcontrol. | |
| bool | get_active () const |
| Inherited from tcontrol. | |
| unsigned | get_state () const |
| Inherited from tcontrol. | |
| bool | disable_click_dismiss () const |
| Inherited from tcontrol. | |
| void | set_map_data (const std::string &map_data) |
| std::string | get_map_data () const |
| const std::string & | map_data () const |
| void | set_config (const ::config *terrain) |
Private Member Functions | |
| const surface | get_image (const int w, const int h) const |
| Gets the image for the minimap. | |
| void | impl_draw_background (surface &frame_buffer) |
| Inherited from tcontrol. | |
| void | impl_draw_background (surface &frame_buffer, int x_offset, int y_offset) |
| const std::string & | get_control_type () const |
| Inherited from tcontrol. | |
Private Attributes | |
| std::string | map_data_ |
| The map data to be used to generate the map. | |
| const ::config * | terrain_ |
| The config object with the terrain data. | |
The basic minimap class.
This minimap can only show a minimap, but it can't be interacted with. For that the tminimap_interactive class will be created.
Definition at line 31 of file minimap.hpp.
| gui2::tminimap::tminimap | ( | ) | [inline] |
Definition at line 34 of file minimap.hpp.
| bool gui2::tminimap::disable_click_dismiss | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Definition at line 53 of file minimap.hpp.
| bool gui2::tminimap::get_active | ( | ) | const [inline, virtual] |
| const std::string & gui2::tminimap::get_control_type | ( | ) | const [private, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 260 of file minimap.cpp.
References type.
| const surface gui2::tminimap::get_image | ( | const int | w, | |
| const int | h | |||
| ) | const [private] |
Gets the image for the minimap.
| w | The wanted width of the image. | |
| h | The wanted height of the image. |
Definition at line 163 of file minimap.cpp.
References gui2::cache, gui2::cache_max_size, DBG_GUI_D, ERR_CF, image::getMinimap(), preferences::map(), map_data_, game::error::message, gui2::shrink_cache(), gui2::terrain, and terrain_.
Referenced by impl_draw_background().


| std::string gui2::tminimap::get_map_data | ( | ) | const [inline] |
Definition at line 60 of file minimap.hpp.
References map_data_.
| unsigned gui2::tminimap::get_state | ( | ) | const [inline, virtual] |
| void gui2::tminimap::impl_draw_background | ( | surface & | frame_buffer | ) | [private, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Definition at line 213 of file minimap.cpp.
References DBG_GUI_D, get_image(), gui2::twidget::get_rect(), LOG_HEADER, map_data_, sdl_blit(), and terrain_.

| void gui2::tminimap::impl_draw_background | ( | surface & | frame_buffer, | |
| int | x_offset, | |||
| int | y_offset | |||
| ) | [private, virtual] |
Reimplemented from gui2::tcontrol.
Definition at line 235 of file minimap.cpp.
References gui2::twidget::calculate_blitting_rectangle(), DBG_GUI_D, get_image(), LOG_HEADER, map_data_, sdl_blit(), and terrain_.

| const std::string& gui2::tminimap::map_data | ( | ) | const [inline] |
Definition at line 62 of file minimap.hpp.
References map_data_.
| void gui2::tminimap::set_active | ( | const | bool | ) | [inline, virtual] |
| void gui2::tminimap::set_config | ( | const ::config * | terrain | ) | [inline] |
Definition at line 64 of file minimap.hpp.
References terrain_.
Referenced by gui2::tlobby_main::adjust_game_row_contents().

| void gui2::tminimap::set_map_data | ( | const std::string & | map_data | ) | [inline] |
Definition at line 57 of file minimap.hpp.
References map_data_, and gui2::twidget::set_dirty().
Referenced by gui2::tlobby_main::adjust_game_row_contents(), and gui2::tmp_create_game::update_map_settings().


std::string gui2::tminimap::map_data_ [private] |
The map data to be used to generate the map.
Definition at line 69 of file minimap.hpp.
Referenced by get_image(), get_map_data(), impl_draw_background(), map_data(), and set_map_data().
const ::config* gui2::tminimap::terrain_ [private] |
The config object with the terrain data.
This config must be set before the object can be drawn.
Definition at line 76 of file minimap.hpp.
Referenced by get_image(), impl_draw_background(), and set_config().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:03 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |