|
Atrinik Client 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| static void | setting_load_value (setting_struct *setting, const char *str) |
| void | settings_init () |
| void | settings_load () |
| void | settings_save () |
| void | settings_deinit () |
| void * | setting_get (setting_struct *setting) |
| const char * | setting_get_str (int cat, int setting) |
| sint64 | setting_get_int (int cat, int setting) |
| static int | setting_apply_always (int cat, int setting) |
| static void | setting_apply_runtime (int cat, int setting) |
| void | settings_apply () |
| void | settings_apply_change () |
| void | setting_set_int (int cat, int setting, sint64 val) |
| int | setting_is_text (setting_struct *setting) |
| sint64 | category_from_name (const char *name) |
| sint64 | setting_from_name (const char *name) |
Variables | |
| static const char *const | opt_types [OPT_TYPE_NUM] |
| setting_category ** | setting_categories = NULL |
| size_t | setting_categories_num = 0 |
| static uint8 | setting_update_mapsize = 0 |
Handles client settings.
Definition in file settings.c.
| sint64 category_from_name | ( | const char * | name | ) |
Find a category ID by its name.
| name | The name. |
Definition at line 661 of file settings.c.
| static int setting_apply_always | ( | int | cat, |
| int | setting | ||
| ) | [static] |
Apply a setting change, which needs to be handled regardless of whether it's changed at runtime or at startup.
| cat | ID of the category the setting is in. |
| setting | Setting ID inside the category. |
Definition at line 476 of file settings.c.
| static void setting_apply_runtime | ( | int | cat, |
| int | setting | ||
| ) | [static] |
Apply a setting change at run-time.
| cat | ID of the category the setting is in. |
| setting | Setting ID inside the category. |
Definition at line 508 of file settings.c.
| sint64 setting_from_name | ( | const char * | name | ) |
Find a setting ID by its name.
| name | The name. |
Definition at line 682 of file settings.c.
| void* setting_get | ( | setting_struct * | setting | ) |
Get pointer to a setting's value.
| setting | The setting. |
Definition at line 432 of file settings.c.
| sint64 setting_get_int | ( | int | cat, |
| int | setting | ||
| ) |
Get setting's integer value.
| cat | ID of the category the setting is in. |
| setting | Setting ID inside the category. |
Definition at line 465 of file settings.c.
| const char* setting_get_str | ( | int | cat, |
| int | setting | ||
| ) |
Get setting's string value.
| cat | ID of the category the setting is in. |
| setting | Setting ID inside the category. |
Definition at line 455 of file settings.c.
| int setting_is_text | ( | setting_struct * | setting | ) |
Check if the specified setting has a string value.
| setting | The setting. |
Definition at line 646 of file settings.c.
| static void setting_load_value | ( | setting_struct * | setting, |
| const char * | str | ||
| ) | [static] |
Load a setting value from file.
| setting | The setting to load the value into. |
| str | The value to load. |
Definition at line 51 of file settings.c.
| void setting_set_int | ( | int | cat, |
| int | setting, | ||
| sint64 | val | ||
| ) |
Set setting's integer value.
| cat | ID of the category the setting is in. |
| setting | Setting ID inside the category. |
| val | Value to set. |
Definition at line 629 of file settings.c.
| void settings_apply | ( | ) |
Apply all settings that need to be applied at start-time (after everything has been initialized successfully).
Definition at line 595 of file settings.c.
| void settings_apply_change | ( | ) |
Apply a change of settings at run-time (through the settings GUI, for example).
Definition at line 611 of file settings.c.
| void settings_deinit | ( | ) |
Deinitialize the settings.
User's settings are also saved to file using settings_save().
Definition at line 364 of file settings.c.
| void settings_init | ( | ) |
Initialize the setting defaults.
Definition at line 91 of file settings.c.
| void settings_load | ( | ) |
Load user's settings (if any).
Definition at line 255 of file settings.c.
| void settings_save | ( | ) |
Save the user's settings to file.
Definition at line 322 of file settings.c.
const char* const opt_types[OPT_TYPE_NUM] [static] |
{
"bool", "input_num", "input_text", "range", "select", "int"
}
Text representations of the setting types.
Definition at line 33 of file settings.c.
| setting_category** setting_categories = NULL |
List of setting categories.
Definition at line 39 of file settings.c.
| size_t setting_categories_num = 0 |
Number of setting_categories.
Definition at line 41 of file settings.c.
uint8 setting_update_mapsize = 0 [static] |
Whether we need to send a setup command to server to request mapsize change.
Definition at line 45 of file settings.c.
1.7.4