The tips of day structure. More...
#include <tips.hpp>
Public Member Functions | |
const t_string & | text () const |
const t_string & | source () const |
ttip () | |
void | set_window_id (const std::string &window_id) |
void | set_message (const t_string &message) |
void | set_mouse (const tpoint &mouse) |
Public Member Functions inherited from gui2::tpopup | |
tpopup () | |
virtual | ~tpopup () |
void | show (CVideo &video, const bool allow_interaction=false, const unsigned auto_close_time=0) |
Shows the window. More... | |
void | hide () |
Hides the window. More... | |
Private Member Functions | |
ttip (const t_string &text, const t_string &source, const std::string &unit_filter) | |
virtual const std::string & | window_id () const |
Inherited from tpopup. More... | |
void | pre_show (twindow &window) |
Inherited from tpopup. More... | |
Private Attributes | |
t_string | text_ |
The text of the tip. More... | |
t_string | source_ |
The source of the tip. More... | |
std::vector< std::string > | unit_filter_ |
List of units to filter the tip upon. More... | |
std::string | window_id_ |
The id of the window to use to show the tip. More... | |
t_string | message_ |
The message to show. More... | |
tpoint | mouse_ |
The position of the mouse. More... | |
Friends | |
std::vector< ttip > | tips::load (const config &) |
std::vector< ttip > | tips::shuffle (const std::vector< ttip > &tips) |
The tips of day structure.
Class to show the tips.
At the moment two kinds of tips are known:
|
private |
Inherited from tpopup.
Reimplemented from gui2::tpopup.
Definition at line 107 of file tip.cpp.
References message_, mouse_, gui2::set_label(), gui2::tpoint::x, and gui2::tpoint::y.
|
inline |
Definition at line 75 of file tip.cpp.
References window_id(), and window_id_.
|
inline |
Definition at line 62 of file tips.hpp.
References source_.
Referenced by gui2::ttitle_screen::pre_show().
|
inline |
Definition at line 58 of file tips.hpp.
References text_.
Referenced by gui2::ttitle_screen::pre_show().
|
privatevirtual |
Inherited from tpopup.
Implements gui2::tpopup.
Definition at line 115 of file tip.cpp.
References window_id_.
Referenced by set_window_id().
|
friend |
|
friend |
|
private |
The message to show.
Definition at line 95 of file tip.cpp.
Referenced by pre_show(), and set_message().
|
private |
The position of the mouse.
Definition at line 98 of file tip.cpp.
Referenced by pre_show(), and set_mouse().
|
private |
|
private |
|
private |
List of units to filter the tip upon.
If the list is empty the tip is shown. Else the unit must have encountered at least one of the units in the list.
Definition at line 87 of file tips.hpp.
Referenced by gui2::tips::shuffle().
|
private |
The id of the window to use to show the tip.
Definition at line 92 of file tip.cpp.
Referenced by set_window_id(), and window_id().