#include <menu.hpp>
Public Member Functions | |
imgsel_style (const std::string &img_base, bool has_bg, int normal_rgb, int selected_rgb, int heading_rgb, double normal_alpha, double selected_alpha, double heading_alpha) | |
virtual | ~imgsel_style () |
virtual SDL_Rect | item_size (const std::string &item) const |
virtual void | draw_row_bg (menu &menu_ref, const size_t row_index, const SDL_Rect &rect, ROW_TYPE type) |
virtual void | draw_row (menu &menu_ref, const size_t row_index, const SDL_Rect &rect, ROW_TYPE type) |
virtual void | init () |
bool | load_images () |
Protected Attributes | |
const std::string | img_base_ |
std::map< std::string, surface > | img_map_ |
Private Member Functions | |
bool | load_image (const std::string &img_sub) |
Private Attributes | |
bool | has_background_ |
bool | initialized_ |
bool | load_failed_ |
int | normal_rgb2_ |
int | selected_rgb2_ |
int | heading_rgb2_ |
double | normal_alpha2_ |
double | selected_alpha2_ |
double | heading_alpha2_ |
bg_cache | bg_cache_ |
Classes | |
struct | bg_cache |
Definition at line 71 of file menu.hpp.
gui::menu::imgsel_style::imgsel_style | ( | const std::string & | img_base, | |
bool | has_bg, | |||
int | normal_rgb, | |||
int | selected_rgb, | |||
int | heading_rgb, | |||
double | normal_alpha, | |||
double | selected_alpha, | |||
double | heading_alpha | |||
) |
Definition at line 62 of file menu_style.cpp.
gui::menu::imgsel_style::~imgsel_style | ( | ) | [virtual] |
Definition at line 69 of file menu_style.cpp.
SDL_Rect gui::menu::imgsel_style::item_size | ( | const std::string & | item | ) | const [virtual] |
Reimplemented from gui::menu::style.
Definition at line 246 of file menu_style.cpp.
References gui::menu::style::item_size(), and gui::menu::style::thickness_.
void gui::menu::imgsel_style::draw_row_bg | ( | menu & | menu_ref, | |
const size_t | row_index, | |||
const SDL_Rect & | rect, | |||
ROW_TYPE | type | |||
) | [virtual] |
Reimplemented from gui::menu::style.
Definition at line 155 of file menu_style.cpp.
References bg_cache_, CVideo::blit_surface(), gui::menu::style::draw_row_bg(), has_background_, gui::menu::imgsel_style::bg_cache::height, img_map_, load_failed_, scale_surface(), gui::menu::SELECTED_ROW, gui::menu::imgsel_style::bg_cache::surf, gui::widget::video(), and gui::menu::imgsel_style::bg_cache::width.
void gui::menu::imgsel_style::draw_row | ( | menu & | menu_ref, | |
const size_t | row_index, | |||
const SDL_Rect & | rect, | |||
ROW_TYPE | type | |||
) | [virtual] |
Reimplemented from gui::menu::style.
Definition at line 174 of file menu_style.cpp.
References CVideo::blit_surface(), gui::menu::style::draw_row(), img_map_, load_failed_, gui::menu::SELECTED_ROW, gui::menu::style::thickness_, and gui::widget::video().
virtual void gui::menu::imgsel_style::init | ( | ) | [inline, virtual] |
Reimplemented from gui::menu::style.
Definition at line 83 of file menu.hpp.
References load_images().
bool gui::menu::imgsel_style::load_images | ( | ) |
Definition at line 110 of file menu_style.cpp.
References has_background_, heading_alpha2_, gui::menu::style::heading_alpha_, heading_rgb2_, gui::menu::style::heading_rgb_, img_map_, initialized_, load_failed_, load_image(), minimum(), normal_alpha2_, gui::menu::style::normal_alpha_, normal_rgb2_, gui::menu::style::normal_rgb_, selected_alpha2_, gui::menu::style::selected_alpha_, selected_rgb2_, gui::menu::style::selected_rgb_, and gui::menu::style::thickness_.
Referenced by init().
bool gui::menu::imgsel_style::load_image | ( | const std::string & | img_sub | ) | [private] |
Definition at line 102 of file menu_style.cpp.
References image::get_image(), img_base_, img_map_, surface::null(), and game_config::path.
Referenced by load_images().
const std::string gui::menu::imgsel_style::img_base_ [protected] |
std::map<std::string,surface> gui::menu::imgsel_style::img_map_ [protected] |
Definition at line 88 of file menu.hpp.
Referenced by draw_row(), draw_row_bg(), load_image(), and load_images().
bool gui::menu::imgsel_style::has_background_ [private] |
bool gui::menu::imgsel_style::initialized_ [private] |
bool gui::menu::imgsel_style::load_failed_ [private] |
int gui::menu::imgsel_style::normal_rgb2_ [private] |
int gui::menu::imgsel_style::selected_rgb2_ [private] |
int gui::menu::imgsel_style::heading_rgb2_ [private] |
double gui::menu::imgsel_style::normal_alpha2_ [private] |
double gui::menu::imgsel_style::selected_alpha2_ [private] |
double gui::menu::imgsel_style::heading_alpha2_ [private] |
bg_cache gui::menu::imgsel_style::bg_cache_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |