Atrinik Client 1.0
Defines | Enumerations | Functions | Variables
gui/settings.c File Reference
#include <include.h>

Go to the source code of this file.

Defines

#define LEN_NAME   111
#define LEN_VALUE   100
#define MAX_LEN   40

Enumerations

enum  { SEL_BUTTON, SEL_CHECKBOX, SEL_RANGE, SEL_TEXT }
enum  {
  BUTTON_SETTINGS, BUTTON_KEY_SETTINGS, BUTTON_LOGOUT, BUTTON_BACK,
  BUTTON_NUM
}

Functions

static char * get_value (void *value, int type)
void optwin_draw_options (int x, int y)
void show_optwin ()
static void settings_popup_draw_func (popup_struct *popup)
static void settings_button_handle (size_t button)
static int settings_popup_event_func (popup_struct *popup, SDL_Event *event)
void settings_open ()

Variables

struct _dialog_list_set option_list_set
const char * opt_tab []
_option opt []
static const char *const button_names [BUTTON_NUM]
static size_t button_selected

Detailed Description

Definition in file settings.c.


Enumeration Type Documentation

anonymous enum

Selection types

Definition at line 49 of file settings.c.

anonymous enum

The different buttons of the settings popup.

Definition at line 443 of file settings.c.


Function Documentation

static char* get_value ( void *  value,
int  type 
) [static]

Parse a given value to a string.

Parameters:
valueValue to parse.
typeType of the value.
Returns:
Static character array representing the given value.

Definition at line 144 of file settings.c.

void optwin_draw_options ( int  x,
int  y 
)

Draw all options for the actual options group.

Parameters:
xX position.
yY position.

Definition at line 171 of file settings.c.

static void settings_button_handle ( size_t  button) [static]

Handle pressing a button in the settings popup.

Parameters:
buttonThe button ID.

Definition at line 521 of file settings.c.

void settings_open ( )

Open the settings popup.

Definition at line 601 of file settings.c.

static void settings_popup_draw_func ( popup_struct popup) [static]

Draw the settings popup.

Parameters:
popupThe popup.

Definition at line 465 of file settings.c.

static int settings_popup_event_func ( popup_struct popup,
SDL_Event *  event 
) [static]

Handle events for the settings popup.

Definition at line 543 of file settings.c.

void show_optwin ( )

Show the options window.

Definition at line 407 of file settings.c.


Variable Documentation

const char* const button_names[BUTTON_NUM] [static]
Initial value:
{
    "Client Settings", "Key settings", "Logout", "Back to play"
}

Names of the buttons.

Definition at line 454 of file settings.c.

size_t button_selected [static]

Currently selected button.

Definition at line 460 of file settings.c.

The actual options.

Definition at line 58 of file settings.c.

const char* opt_tab[]
Initial value:
{
    "General",
    "Client",
    "Map",
    "Sound",
    "Fullscreen flags",
    "Windowed flags",
    "Debug",
    NULL
}

Option tabs.

Definition at line 36 of file settings.c.

Option list set

Definition at line 33 of file settings.c.