Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-sdl2/helpdlg.c File Reference

Freeciv-3.1

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 widget * | create_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 widget * | create_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_dialog * | help_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 1024 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 592 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 1128 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 1671 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 | ) |

Show tech info

Definition at line 1930 of file helpdlg.c.

Referenced by change_research_callback(), change_research_goal_callback(), change_tech_callback(), popup_help_browser(), show_tech_tree_callback(), and toggle_full_tree_mode_in_help_dlg_callback().

## ◆ popup_unit_info()

void popup_unit_info | ( | Unit_type_id | type_id | ) |

Show unit type info

Definition at line 632 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 1055 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 1409 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 604 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 1036 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 1651 of file helpdlg.c.

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

## Variable Documentation

## ◆ bufsz

const int bufsz = 8192

static

Definition at line 70 of file helpdlg.c.

Referenced by convert_string(), create_tech_info(), fc__attribute(), get_city_dialog_airlift_text(), get_city_dialog_airlift_value(), get_city_dialog_culture_text(), get_city_dialog_illness_text(), get_city_dialog_output_text(), get_city_dialog_pollution_text(), get_units_disband_info(), get_units_upgrade_info(), helptext_advance(), helptext_building(), helptext_extra(), helptext_goods(), helptext_government(), helptext_nation(), helptext_specialist(), helptext_terrain(), helptext_unit(), insert_allows(), insert_allows_single(), is_allowed_city_name(), popup_unit_info(), req_text_insert(), req_text_insert_nl(), tile_get_info_text(), tile_info_pollution(), unit_upgrade_info(), universal_name_translation(), and user_username().

## ◆ 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

Definition at line 52 of file helpdlg.c.

Referenced by create_tech_info(), popdown_help_dialog(), popup_impr_info(), popup_tech_info(), popup_unit_info(), redraw_impr_info_dlg(), redraw_tech_info_dlg(), redraw_tech_tree_dlg(), redraw_unit_info_dlg(), show_tech_tree_callback(), and toggle_full_tree_mode_in_help_dlg_callback().