The Battle for Wesnoth  1.19.7+dev
Functions | Variables
gui2::dialogs::tip Namespace Reference

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< tooltiptip
 

Function Documentation

◆ remove()

void gui2::dialogs::tip::remove ( )

◆ show()

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.

Parameters
window_idThe id of the window used to show the tip.
messageThe message to show in the tip.
mouseThe position of the mouse.
source_rectThe 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().

Variable Documentation

◆ tip

std::unique_ptr<tooltip> gui2::dialogs::tip::tip
static