#include <menulist.h>
Inheritance diagram for MenuChoice:
Public Member Functions | |
MenuChoice (Shape_frame *on, Shape_frame *off, int xpos, int ypos, Font *fnt) | |
virtual | ~MenuChoice () |
void | add_choice (const char *s) |
int | get_choice () |
void | set_choice (int c) |
virtual void | paint (Game_window *gwin) |
virtual bool | handle_event (SDL_Event &event) |
Private Attributes | |
std::vector< std::string > * | choices |
int | choice |
Font * | font |
int | max_choice_width |
Definition at line 62 of file menulist.h.
MenuChoice::MenuChoice | ( | Shape_frame * | on, | |
Shape_frame * | off, | |||
int | xpos, | |||
int | ypos, | |||
Font * | fnt | |||
) |
Definition at line 69 of file menulist.cc.
References choice, choices, font, MenuObject::frame_off, MenuObject::frame_on, Shape_frame::get_height(), Shape_frame::get_width(), max_choice_width, MenuObject::selected, MenuObject::x, MenuObject::x1, MenuObject::x2, MenuObject::y, MenuObject::y1, and MenuObject::y2.
Here is the call graph for this function:
virtual MenuChoice::~MenuChoice | ( | ) | [inline, virtual] |
void MenuChoice::add_choice | ( | const char * | s | ) |
Definition at line 87 of file menulist.cc.
References choices, font, Font::get_text_width(), len, max_choice_width, MenuObject::x, and MenuObject::x2.
Referenced by ExultMenu::setup().
Here is the call graph for this function:
int MenuChoice::get_choice | ( | ) | [inline] |
void MenuChoice::set_choice | ( | int | c | ) | [inline] |
void MenuChoice::paint | ( | Game_window * | gwin | ) | [virtual] |
Implements MenuObject.
Definition at line 95 of file menulist.cc.
References choice, MenuObject::dirty, Font::draw_text(), Image_window8::fill8(), font, MenuObject::frame_off, MenuObject::frame_on, Image_window8::get_ib8(), Shape_manager::get_instance(), Font::get_text_height(), Shape_frame::get_width(), Game_window::get_win(), gwin, max_choice_width, Shape_manager::paint_shape(), MenuObject::selected, Image_window::show(), MenuObject::x, MenuObject::x1, MenuObject::x2, MenuObject::y, MenuObject::y1, and MenuObject::y2.
Here is the call graph for this function:
bool MenuChoice::handle_event | ( | SDL_Event & | event | ) | [virtual] |
Implements MenuObject.
Definition at line 117 of file menulist.cc.
References choice, choices, and MenuObject::dirty.
std::vector<std::string>* MenuChoice::choices [private] |
Definition at line 64 of file menulist.h.
Referenced by add_choice(), handle_event(), MenuChoice(), and ~MenuChoice().
int MenuChoice::choice [private] |
Definition at line 65 of file menulist.h.
Referenced by get_choice(), handle_event(), MenuChoice(), paint(), and set_choice().
Font* MenuChoice::font [private] |
int MenuChoice::max_choice_width [private] |