Atrinik Client  4.0
Enumerations | Functions | Variables
menu_buttons.c File Reference
#include <global.h>

Go to the source code of this file.

Enumerations

enum  {
  BUTTON_SPELLS, BUTTON_SKILLS, BUTTON_PROTECTIONS, BUTTON_PARTY,
  BUTTON_MPLAYER, BUTTON_BUDDY, BUTTON_IGNORE, BUTTON_MINIMAP,
  BUTTON_MAP, BUTTON_QUEST, BUTTON_HELP, BUTTON_SETTINGS,
  NUM_BUTTONS
}
 

Functions

static void widget_draw (widgetdata *widget)
 
static void widget_background (widgetdata *widget, int draw)
 
static int widget_event (widgetdata *widget, SDL_Event *event)
 
static void widget_deinit (widgetdata *widget)
 
void widget_menu_buttons_init (widgetdata *widget)
 

Variables

static button_struct buttons [NUM_BUTTONS]
 
static const char * button_images [NUM_BUTTONS]
 
static const char *const button_tooltips [NUM_BUTTONS]
 
static int button_widgets [NUM_BUTTONS]
 

Detailed Description

Implements menu buttons type widgets.

Author
Alex Tokar

Definition in file menu_buttons.c.

Enumeration Type Documentation

anonymous enum

The different buttons inside the widget.

Enumerator
BUTTON_SPELLS 

Spells.

BUTTON_SKILLS 

Skills.

BUTTON_PROTECTIONS 

Protections.

BUTTON_PARTY 

Party.

BUTTON_MPLAYER 

Music player.

BUTTON_BUDDY 

Buddy list.

BUTTON_IGNORE 

Ignore list.

BUTTON_MINIMAP 

Minimap.

BUTTON_MAP 

Region map.

BUTTON_QUEST 

Quest list.

BUTTON_HELP 

Help.

BUTTON_SETTINGS 

Esc menu.

NUM_BUTTONS 

Total number of the buttons.

Definition at line 37 of file menu_buttons.c.

Function Documentation

static void widget_background ( widgetdata widget,
int  draw 
)
static

Definition at line 137 of file menu_buttons.c.

static void widget_deinit ( widgetdata widget)
static

Definition at line 226 of file menu_buttons.c.

static void widget_draw ( widgetdata widget)
static

Definition at line 81 of file menu_buttons.c.

static int widget_event ( widgetdata widget,
SDL_Event *  event 
)
static

Definition at line 152 of file menu_buttons.c.

void widget_menu_buttons_init ( widgetdata widget)

Initialize one menu buttons widget.

Definition at line 236 of file menu_buttons.c.

Variable Documentation

const char* button_images[NUM_BUTTONS]
static
Initial value:
= {
"magic", "skill", "protections", "party", "music", "buddy", "ignore",
"minimap", "map", "quest", NULL, "cogs"
}

Images to render on top of the buttons, NULL for none.

Definition at line 61 of file menu_buttons.c.

const char* const button_tooltips[NUM_BUTTONS]
static
Initial value:
= {
"Spells", "Skills", "Protections", "Party", "Music player", "Buddy List",
"Ignore List", "Minimap", "Region map", "Quest list", "Help", "Settings"
}

Tooltip texts for the buttons.

Definition at line 68 of file menu_buttons.c.

int button_widgets[NUM_BUTTONS]
static
Initial value:
= {
SPELLS_ID, SKILLS_ID, PROTECTIONS_ID, PARTY_ID, MPLAYER_ID, BUDDY_ID,
BUDDY_ID, MINIMAP_ID, -1, -1, -1, -1
}

Widgets associated with the buttons, -1 for none.

Definition at line 75 of file menu_buttons.c.

button_struct buttons[NUM_BUTTONS]
static

Button buffers.

Definition at line 57 of file menu_buttons.c.