#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 std::size_t row_index, const SDL_Rect &rect, ROW_TYPE type) |
virtual void | draw_row (menu &menu_ref, const std::size_t row_index, const SDL_Rect &rect, ROW_TYPE type) |
virtual void | init () |
bool | load_images () |
void | unload_images () |
![]() | |
style () | |
virtual | ~style () |
void | scale_images (int max_width, int max_height) |
void | adjust_image_bounds (int &w, int &h) const |
std::size_t | get_font_size () const |
std::size_t | get_cell_padding () const |
std::size_t | get_thickness () const |
Protected Attributes | |
const std::string | img_base_ |
std::map< std::string, texture > | img_map_ |
![]() | |
std::size_t | font_size_ |
std::size_t | cell_padding_ |
std::size_t | thickness_ |
int | normal_rgb_ |
int | selected_rgb_ |
int | heading_rgb_ |
double | normal_alpha_ |
double | selected_alpha_ |
double | heading_alpha_ |
int | max_img_w_ |
int | max_img_h_ |
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_ |
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 46 of file menu_style.cpp.
|
virtual |
Definition at line 53 of file menu_style.cpp.
|
virtual |
Reimplemented from gui::menu::style.
Definition at line 151 of file menu_style.cpp.
References draw::blit(), gui::menu::style::draw_row(), texture::h(), img_map_, load_failed_, draw::reduce_clip(), gui::menu::SELECTED_ROW, gui::menu::style::thickness_, and texture::w().
|
virtual |
Reimplemented from gui::menu::style.
Definition at line 141 of file menu_style.cpp.
References draw::blit(), gui::menu::style::draw_row_bg(), has_background_, img_map_, load_failed_, and gui::menu::SELECTED_ROW.
|
inlinevirtual |
Reimplemented from gui::menu::style.
|
virtual |
Reimplemented from gui::menu::style.
Definition at line 240 of file menu_style.cpp.
References gui::menu::style::item_size(), and gui::menu::style::thickness_.
|
private |
Definition at line 82 of file menu_style.cpp.
References image::get_texture(), img_base_, img_map_, and game_config::path.
Referenced by load_images().
bool gui::menu::imgsel_style::load_images | ( | ) |
Definition at line 90 of file menu_style.cpp.
References h, has_background_, heading_alpha2_, gui::menu::style::heading_alpha_, heading_rgb2_, gui::menu::style::heading_rgb_, img_map_, initialized_, load_failed_, load_image(), 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_, gui::menu::style::thickness_, and w.
void gui::menu::imgsel_style::unload_images | ( | ) |
|
private |
Definition at line 86 of file menu.hpp.
Referenced by draw_row_bg(), and load_images().
|
private |
Definition at line 90 of file menu.hpp.
Referenced by load_images().
|
private |
Definition at line 89 of file menu.hpp.
Referenced by load_images().
|
protected |
Definition at line 81 of file menu.hpp.
Referenced by load_image().
|
protected |
Definition at line 82 of file menu.hpp.
Referenced by draw_row(), draw_row_bg(), load_image(), load_images(), and unload_images().
|
private |
Definition at line 87 of file menu.hpp.
Referenced by load_images().
|
private |
Definition at line 88 of file menu.hpp.
Referenced by draw_row(), draw_row_bg(), and load_images().
|
private |
Definition at line 90 of file menu.hpp.
Referenced by load_images().
|
private |
Definition at line 89 of file menu.hpp.
Referenced by load_images().
|
private |
Definition at line 90 of file menu.hpp.
Referenced by load_images().
|
private |
Definition at line 89 of file menu.hpp.
Referenced by load_images().