Functions | |
void | show (const std::string &window_id, const t_string &message, const point &mouse, const SDL_Rect &source_rect) |
Shows a tip. More... | |
void | remove () |
Removes a tip. More... | |
Variables | |
static std::unique_ptr< tooltip > | tip |
void gui2::dialogs::tip::remove | ( | ) |
Removes a tip.
It is safe to call this function when no tip is shown.
Definition at line 94 of file tooltip.cpp.
References tip.
Referenced by unit::apply_builtin_effect(), filesystem::delete_directory(), filesystem::delete_file(), utils::erase(), expand_partialresolution(), find_ref(), wesnothd::make_delete_diff(), gui2::window::show(), gui2::styled_widget::signal_handler_notify_remove_tooltip(), game_events::WML_HANDLER_FUNCTION(), tmp_file::~tmp_file(), and gui2::window::~window().
void gui2::dialogs::tip::show | ( | const std::string & | window_id, |
const t_string & | message, | ||
const point & | mouse, | ||
const SDL_Rect & | source_rect | ||
) |
Shows a tip.
The tip is a tooltip or a helptip. One type of tip is shown at the same time, opening a second tip closes the first.
window_id | The id of the window used to show the tip. |
message | The message to show in the tip. |
mouse | The position of the mouse. |
source_rect | The thing being hovered over to show the tip. |
Definition at line 64 of file tooltip.cpp.
References ERR_CFG, tip, and tooltip.
Referenced by actions::place_recruit(), unit_creator::post_create(), actions::recall_unit(), actions::recruit_unit(), gui2::policy::minimum_selection::one_item::set_item_shown(), gui2::policy::minimum_selection::no_item::set_item_shown(), gui2::generator< minimum_selection, maximum_selection, my_placement, select_action >::set_item_shown(), prefs::set_lobby_joins(), gui2::window::signal_handler_message_show_helptip(), gui2::window::signal_handler_message_show_tooltip(), and SYNCED_COMMAND_HANDLER_FUNCTION().
|
static |
Definition at line 62 of file tooltip.cpp.
Referenced by tooltips::add_tooltip(), tooltips::click(), tooltips::manager::expose(), gui2::dialogs::title_screen::init_callbacks(), gui2::tip_of_the_day::load(), tooltips::process(), remove(), tooltips::select_active(), show(), gui2::tip_of_the_day::shuffle(), gui2::styled_widget::signal_handler_show_tooltip(), and tooltips::update_tooltip().