Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
helpdlg.c File Reference
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "game.h"
#include "government.h"
#include "movement.h"
#include "client_main.h"
#include "helpdata.h"
#include "colors.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "repodlgs.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "helpdlg.h"

Go to the source code of this file.

Data Structures

struct  techs_buttons
 
struct  units_buttons
 

Functions

static int change_tech_callback (struct widget *pwidget)
 
void popup_help_browser (void)
 
void popup_help_dialog_string (const char *item)
 
void popup_help_dialog_typed (const char *item, enum help_page_type eHPT)
 
void popdown_help_dialog (void)
 
static int help_dlg_window_callback (struct widget *pwindow)
 
static int exit_help_dlg_callback (struct widget *pwidget)
 
static int change_gov_callback (struct widget *pwidget)
 
void popup_gov_info (int gov)
 
static int change_impr_callback (struct widget *pwidget)
 
static void redraw_impr_info_dlg (void)
 
void popup_impr_info (Impr_type_id impr)
 
static int change_unit_callback (struct widget *pwidget)
 
static void redraw_unit_info_dlg (void)
 
void popup_unit_info (Unit_type_id type_id)
 
static int show_tech_tree_callback (struct widget *pwidget)
 
static void redraw_tech_info_dlg (void)
 
static struct widgetcreate_tech_info (Tech_type_id tech, int width, struct widget *pwindow, struct techs_buttons *store)
 
static void redraw_tech_tree_dlg (void)
 
static int toggle_full_tree_mode_in_help_dlg_callback (struct widget *pwidget)
 
static struct widgetcreate_tech_tree (Tech_type_id tech, int width, struct widget *pwindow, struct techs_buttons *store)
 
void popup_tech_info (Tech_type_id tech)
 

Variables

static struct advanced_dialoghelp_dlg = NULL
 
enum help_page_type current_help_dlg = HELP_LAST
 
static const int bufsz = 8192
 

Function Documentation

◆ change_gov_callback()

static int change_gov_callback ( struct widget pwidget)
static

User requested new government help

Definition at line 143 of file helpdlg.c.

Referenced by create_tech_info().

◆ change_impr_callback()

static int change_impr_callback ( struct widget pwidget)
static

User requested new improvement help

Definition at line 162 of file helpdlg.c.

Referenced by create_tech_info(), and popup_impr_info().

◆ change_tech_callback()

static int change_tech_callback ( struct widget pwidget)
static

User requested new tech help

Definition at line 1028 of file helpdlg.c.

Referenced by create_tech_info(), create_tech_tree(), popup_impr_info(), popup_tech_info(), and popup_unit_info().

◆ change_unit_callback()

static int change_unit_callback ( struct widget pwidget)
static

User requested new unit help

Definition at line 590 of file helpdlg.c.

Referenced by create_tech_info(), and popup_unit_info().

◆ create_tech_info()

static struct widget * create_tech_info ( Tech_type_id  tech,
int  width,
struct widget pwindow,
struct techs_buttons store 
)
static

Create tech info widgets

Definition at line 1132 of file helpdlg.c.

Referenced by popup_tech_info().

◆ create_tech_tree()

static struct widget * create_tech_tree ( Tech_type_id  tech,
int  width,
struct widget pwindow,
struct techs_buttons store 
)
static

Create tech tree widgets

Definition at line 1674 of file helpdlg.c.

◆ exit_help_dlg_callback()

static int exit_help_dlg_callback ( struct widget pwidget)
static

User requested closing of the help dialog

Definition at line 130 of file helpdlg.c.

Referenced by popup_impr_info(), popup_tech_info(), and popup_unit_info().

◆ help_dlg_window_callback()

static int help_dlg_window_callback ( struct widget pwindow)
static

User interacted with help dialog window

Definition at line 122 of file helpdlg.c.

Referenced by popup_impr_info(), popup_tech_info(), and popup_unit_info().

◆ popdown_help_dialog()

void popdown_help_dialog ( void  )

Close the help dialog.

Definition at line 108 of file helpdlg.c.

◆ popup_gov_info()

void popup_gov_info ( int  gov)

Show government info

Definition at line 155 of file helpdlg.c.

Referenced by change_gov_callback().

◆ popup_help_browser()

void popup_help_browser ( void  )

Open Help Browser without any specific topic in mind

Definition at line 77 of file helpdlg.c.

Referenced by help_browser_callback().

◆ popup_help_dialog_string()

void popup_help_dialog_string ( const char item)

Popup the help dialog to get help on the given string topic. Note that the topic may appear in multiple sections of the help (it may be both an improvement and a unit, for example).

The string will be untranslated.

Definition at line 89 of file helpdlg.c.

◆ popup_help_dialog_typed()

void popup_help_dialog_typed ( const char item,
enum help_page_type  eHPT 
)

Popup the help dialog to display help on the given string topic from the given section.

The string will be translated.

Definition at line 100 of file helpdlg.c.

◆ popup_impr_info()

void popup_impr_info ( Impr_type_id  impr)

Show improvement info

Definition at line 202 of file helpdlg.c.

Referenced by change_impr_callback(), and get_target_help_data().

◆ popup_tech_info()

void popup_tech_info ( Tech_type_id  tech)

◆ popup_unit_info()

void popup_unit_info ( Unit_type_id  type_id)

Show unit type info

Definition at line 630 of file helpdlg.c.

Referenced by change_unit_callback(), get_target_help_data(), and unit_help_callback().

◆ redraw_impr_info_dlg()

static void redraw_impr_info_dlg ( void  )
static

Refresh improvement help dialog

Definition at line 174 of file helpdlg.c.

Referenced by popup_impr_info().

◆ redraw_tech_info_dlg()

static void redraw_tech_info_dlg ( void  )
static

Refresh tech help dialog

Definition at line 1059 of file helpdlg.c.

Referenced by popup_tech_info().

◆ redraw_tech_tree_dlg()

static void redraw_tech_tree_dlg ( void  )
static

Refresh tech tree dialog

Definition at line 1412 of file helpdlg.c.

Referenced by popup_tech_info().

◆ redraw_unit_info_dlg()

static void redraw_unit_info_dlg ( void  )
static

Refresh unit help dialog

Definition at line 602 of file helpdlg.c.

Referenced by popup_unit_info().

◆ show_tech_tree_callback()

static int show_tech_tree_callback ( struct widget pwidget)
static

User requested new tech tree

Definition at line 1040 of file helpdlg.c.

Referenced by create_tech_info(), and create_tech_tree().

◆ toggle_full_tree_mode_in_help_dlg_callback()

static int toggle_full_tree_mode_in_help_dlg_callback ( struct widget pwidget)
static

User requested toggling between full tech tree and single tech

Definition at line 1654 of file helpdlg.c.

Referenced by popup_impr_info(), popup_tech_info(), and popup_unit_info().

Variable Documentation

◆ bufsz

const int bufsz = 8192
static

◆ current_help_dlg

enum help_page_type current_help_dlg = HELP_LAST

Definition at line 68 of file helpdlg.c.

Referenced by popdown_help_dialog(), popup_impr_info(), popup_tech_info(), and popup_unit_info().

◆ help_dlg

struct advanced_dialog* help_dlg = NULL
static