Freeciv-3.1
|
#include <stdarg.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "string_vector.h"
#include "fc_types.h"
#include "game.h"
#include "client_main.h"
#include "climisc.h"
#include "clinet.h"
#include "connectdlg_common.h"
#include "global_worklist.h"
#include "colors.h"
#include "connectdlg.h"
#include "dialogs.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "helpdlg.h"
#include "mapctrl.h"
#include "mapview.h"
#include "menu.h"
#include "messagewin.h"
#include "pages.h"
#include "themespec.h"
#include "widget.h"
#include "wldlg.h"
#include "optiondlg.h"
Go to the source code of this file.
Data Structures | |
struct | option_dialog_optset |
struct | option_dialog_worklist |
struct | option_dialog |
Enumerations | |
enum | option_dialog_mode { ODM_MAIN , ODM_OPTSET , ODM_WORKLIST } |
Functions | |
static struct widget * | option_widget_new (struct option *poption, struct widget *window, bool hide) |
static void | option_widget_update (struct option *poption) |
static void | option_widget_apply (struct option *poption) |
static struct option_dialog * | option_dialog_new (void) |
static void | option_dialog_destroy (struct option_dialog *pdialog) |
static void | option_dialog_optset (struct option_dialog *pdialog, const struct option_set *poptset) |
static void | option_dialog_optset_category (struct option_dialog *pdialog, int category) |
static void | option_dialog_worklist (struct option_dialog *pdialog) |
static void | arrange_widgets (struct widget *window, int widgets_per_row, int rows_shown, struct widget *begin, struct widget *end,...) |
static int | main_optiondlg_callback (struct widget *pwindow) |
static int | back_callback (struct widget *pwidget) |
static int | client_options_callback (struct widget *pwidget) |
static int | server_options_callback (struct widget *pwidget) |
static int | work_lists_callback (struct widget *widget) |
static int | save_client_options_callback (struct widget *pwidget) |
static int | save_game_callback (struct widget *pwidget) |
static int | help_browser_callback (struct widget *pwidget) |
static int | disconnect_callback (struct widget *pwidget) |
static int | exit_callback (struct widget *pwidget) |
static int | option_category_callback (struct widget *widget) |
static int | apply_callback (struct widget *widget) |
static int | none_callback (struct widget *widget) |
static struct strvec * | video_mode_list (void) |
static void | enum_widget_destroy (struct widget *widget) |
static void | video_mode_widget_destroy (struct widget *widget) |
static int | optset_category_option_count (const struct option_set *poptset, int category) |
static int | edit_worklist_callback (struct widget *widget) |
static int | add_new_worklist_callback (struct widget *widget) |
int | optiondlg_callback (struct widget *pbutton) |
void | enable_options_button (void) |
void | disable_options_button (void) |
void | init_options_button (void) |
void | update_worklist_report_dialog (void) |
void | popup_optiondlg (void) |
void | popdown_optiondlg (bool leave_game) |
void | option_dialog_popup (const char *name, const struct option_set *poptset) |
void | option_dialog_popdown (const struct option_set *poptset) |
void | option_gui_update (struct option *poption) |
void | option_gui_add (struct option *poption) |
void | option_gui_remove (struct option *poption) |
Variables | |
static struct option_dialog * | option_dialog = NULL |
struct widget * | options_button = NULL |
static bool | restore_meswin_dialog = FALSE |
enum option_dialog_mode |
Enumerator | |
---|---|
ODM_MAIN | |
ODM_OPTSET | |
ODM_WORKLIST |
Definition at line 72 of file optiondlg.c.
|
static |
Callback to append a global worklist.
Definition at line 1150 of file optiondlg.c.
Referenced by option_dialog_worklist().
|
static |
Apply the changes for the option category.
Definition at line 428 of file optiondlg.c.
Referenced by option_dialog_optset_category().
|
static |
Arrange the widgets. NB: end argument is excluded. End the argument list with the icons on the top, terminated by NULL.
Definition at line 127 of file optiondlg.c.
Referenced by back_callback(), option_dialog_new(), option_dialog_optset(), and option_dialog_optset_category().
|
static |
Back requested.
Definition at line 239 of file optiondlg.c.
Referenced by apply_callback(), option_dialog_new(), option_dialog_popdown(), option_dialog_popup(), option_gui_add(), option_gui_remove(), and save_game_callback().
|
static |
Create the client options dialog.
Definition at line 315 of file optiondlg.c.
Referenced by option_dialog_new().
void disable_options_button | ( | void | ) |
Disable button to open option dialog.
Definition at line 1374 of file optiondlg.c.
Referenced by disable_main_widgets().
|
static |
Client disconnect from server callback.
Definition at line 388 of file optiondlg.c.
Referenced by option_dialog_new().
|
static |
Clicked on a global worklist name.
Definition at line 1092 of file optiondlg.c.
Referenced by add_new_worklist_callback(), and option_dialog_worklist().
void enable_options_button | ( | void | ) |
Enable button to open option dialog.
Definition at line 1366 of file optiondlg.c.
Referenced by back_callback(), disconnect_callback(), enable_main_widgets(), init_options_button(), and show_game_page().
|
static |
Free correctly the memory assigned to the enum_widget.
Definition at line 482 of file optiondlg.c.
Referenced by option_widget_new().
|
static |
|
static |
Open Help Browser callback
Definition at line 376 of file optiondlg.c.
Referenced by option_dialog_new().
void init_options_button | ( | void | ) |
Create button to open option dialog.
Definition at line 1382 of file optiondlg.c.
Referenced by show_game_page().
|
static |
User interacted with the option dialog window.
Definition at line 226 of file optiondlg.c.
Referenced by option_dialog_new().
|
static |
Dummy callback. Disable exit().
Definition at line 447 of file optiondlg.c.
Referenced by option_widget_new().
|
static |
Option set category selected.
Definition at line 416 of file optiondlg.c.
Referenced by option_dialog_optset().
|
static |
Destroys an option dialog.
Definition at line 917 of file optiondlg.c.
|
static |
Return a new option dialog.
Definition at line 788 of file optiondlg.c.
Referenced by option_dialog_popup(), and popup_optiondlg().
|
static |
Initialize an option set page.
Definition at line 960 of file optiondlg.c.
|
static |
Initialize an option set category page.
Definition at line 1011 of file optiondlg.c.
Referenced by option_category_callback(), option_gui_add(), and option_gui_remove().
void option_dialog_popdown | ( | const struct option_set * | poptset | ) |
Popdown the option dialog for the option set.
Definition at line 1492 of file optiondlg.c.
void option_dialog_popup | ( | const char * | name, |
const struct option_set * | poptset | ||
) |
Popup the option dialog for the option set.
Definition at line 1472 of file optiondlg.c.
|
static |
The Worklist Report part of Options dialog shows all the global worklists that the player has defined.
Definition at line 1223 of file optiondlg.c.
void option_gui_add | ( | struct option * | poption | ) |
Add the GUI for the option.
Definition at line 1521 of file optiondlg.c.
void option_gui_remove | ( | struct option * | poption | ) |
Remove the GUI for the option.
Definition at line 1535 of file optiondlg.c.
void option_gui_update | ( | struct option * | poption | ) |
Update the GUI for the option.
Definition at line 1504 of file optiondlg.c.
|
static |
Apply the changes for the option.
Definition at line 717 of file optiondlg.c.
Referenced by apply_callback().
|
static |
Create a widget for the option.
Definition at line 499 of file optiondlg.c.
Referenced by option_dialog_optset_category().
|
static |
Update the widget of the option.
Definition at line 646 of file optiondlg.c.
Referenced by option_gui_update().
int optiondlg_callback | ( | struct widget * | pbutton | ) |
User interacted with the option dialog button.
Definition at line 1345 of file optiondlg.c.
Referenced by init_options_button(), and popup_minimap_window().
|
static |
Return the number of options of the category.
Definition at line 943 of file optiondlg.c.
Referenced by option_dialog_optset(), and option_dialog_optset_category().
void popdown_optiondlg | ( | bool | leave_game | ) |
Close option dialog.
Definition at line 1451 of file optiondlg.c.
Referenced by back_callback(), disconnect_callback(), exit_callback(), and popdown_all_game_dialogs().
void popup_optiondlg | ( | void | ) |
Popup the main option menu dialog.
Definition at line 1432 of file optiondlg.c.
Referenced by option_dialog_popup(), optiondlg_callback(), and options_callback().
|
static |
Option set category selected.
Definition at line 351 of file optiondlg.c.
Referenced by option_dialog_new().
|
static |
|
static |
Create the server options dialog.
Definition at line 327 of file optiondlg.c.
Referenced by option_dialog_new().
void update_worklist_report_dialog | ( | void | ) |
If the Options Dlg is open, force Worklist List contents to be updated. This function is call by exiting worklist editor to update changed worklist name in global worklist report ( Options Dlg )
Definition at line 1409 of file optiondlg.c.
|
static |
Return a string vector containing all video modes.
Definition at line 455 of file optiondlg.c.
Referenced by option_widget_new().
|
static |
Free correctly the memory assigned to the video_mode_widget.
Definition at line 490 of file optiondlg.c.
Referenced by option_widget_new().
|
static |
Create the worklist editor.
Definition at line 339 of file optiondlg.c.
Referenced by option_dialog_new().
|
static |
Definition at line 102 of file optiondlg.c.
struct widget* options_button = NULL |
Definition at line 103 of file optiondlg.c.
Referenced by back_callback(), close_game_page(), disable_options_button(), enable_options_button(), init_options_button(), popup_minimap_window(), and real_menus_update().
Definition at line 104 of file optiondlg.c.
Referenced by popdown_optiondlg(), and popup_optiondlg().