15 #define GETTEXT_DOMAIN "wesnoth-lib"
47 #define ERR_CF LOG_STREAM(err, log_config)
48 #define WRN_CF LOG_STREAM(warn, log_config)
51 #define ERR_GEN LOG_STREAM(err, log_general)
129 window.set_retval(static_cast<twindow::tretval>(result));
181 std::function<void()> next_tip_wrapper = std::bind(
190 std::function<void()> previous_tip_wrapper = std::bind(
197 previous_tip_wrapper));
235 debug_tooltip(
twindow& window,
bool& handled,
const tpoint& coordinate)
250 for(
int i = 0;
i < 0; ++
i) {
251 message +=
" More greetings.";
268 std::bind(debug_tooltip,
std::ref(window), _3, _5),
274 = find_widget<tcontrol>(&window,
"revision_number",
false,
false)) {
278 window.
canvas()[0].set_variable(
283 tmulti_page& tip_pages = find_widget<tmulti_page>(&window,
"tips",
false);
287 WRN_CF <<
"There are not tips of day available." << std::endl;
290 for(
const auto &
tip : tips)
294 std::map<std::string, string_map> page;
297 widget[
"use_markup"] =
"true";
298 page[
"tip"] = widget;
301 widget[
"use_markup"] =
"true";
302 page[
"source"] = widget;
310 find_widget<tbutton>(&window,
"next_tip",
false),
317 find_widget<tbutton>(&window,
"previous_tip",
false),
324 ERR_CF <<
"No title image defined" << std::endl;
326 window.canvas()[0].set_variable(
331 ERR_CF <<
"No title background image defined" << std::endl;
333 window.canvas()[0].set_variable(
339 find_widget<timage>(&window,
"logo",
false).set_image(
"misc/logo.png");
342 tbutton&
about = find_widget<tbutton>(&window,
"about",
false);
348 tbutton& clock = find_widget<tbutton>(&window,
"clock",
false);
387 window.set_is_dirty(
true);
Used to reload all game data.
static void display(CVideo &video, lua_kernel_base *lk)
Display a new console, using given video and lua kernel.
Play single scenario against humans or AI.
void update_tip(twindow &window, const bool previous)
Updates the tip of day widget.
R function_wrapper(const R result, const F &function)
Helper for function wrappers.
const t_string & source() const
REGISTER_DIALOG(label_settings)
void set_escape_disabled(const bool escape_disabled)
Disable the escape key.
void connect_signal_mouse_left_click(tdispatcher &dispatcher, const tsignal_function &signal)
Connects a signal handler for a left mouse button click.
void register_hotkey(const hotkey::HOTKEY_COMMAND id, const thotkey_function &function)
Registers a hotkey.
Clock to test the draw events.
boost::enable_if< boost::mpl::has_key< tset_event, boost::mpl::int_< E > > >::type connect_signal(const tsignal_function &signal, const tposition position=back_child)
Connect a signal for callback in tset_event.
void pre_show(twindow &window)
Inherited from tdialog.
Start special campaign 'tutorial'.
Display credits about all contributors.
Keyboard shortcuts for game actions.
base class of top level items, the only item which needs to store the final canvases to draw on ...
A SDL mouse motion event.
A class inherited from ttext_box that displays its input as stars.
void set_enter_disabled(const bool enter_disabled)
Disable the enter key.
static UNUSEDNOWARN std::string _(const char *str)
static void display(CVideo &video)
The display function.
void remove()
Removes a tip.
void set_restore(const bool restore)
std::string game_title_background
const t_string & text() const
int get_selected_page() const
Returns the selected page.
void add_page(const string_map &item)
Adds single page to the grid.
static lg::log_domain log_config("config")
This class implements the title screen.
std::map< std::string, t_string > string_map
unsigned get_page_count() const
Returns the number of pages.
void show(CVideo &video, const std::string &window_id, const t_string &message, const tpoint &mouse)
Shows a tip.
static bool fullscreen(CVideo &video)
const std::string revision
Contains the gui2 timer routines.
void set_fullscreen(bool ison)
virtual void post_build(twindow &window)
Inherited from tdialog.
std::vector< tcanvas > & canvas()
void set_click_dismiss(const bool click_dismiss)
Base class for all visible items.
static lg::log_domain log_general("general")
void select_page(const unsigned page, const bool select=true)
Selectes a page.
Let user select a campaign to play.
tpopup * debug_clock_
Holds the debug clock dialog.
bool show_debug_clock_button
Do we wish to show the button for the debug clock.
Standard logging facilities (interface).
GLsizei GLenum GLuint GLuint GLsizei char * message
void show_debug_clock_window(CVideo &video)
Shows the debug clock.
static bool launch_lua_console(twindow &window)
std::vector< ttip > get_tips()
GLsizei const GLcharARB ** string
static std::vector< ttip > tips