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

Go to the source code of this file.

Enumerations

enum  {
  BUTTON_SPELLS, BUTTON_SKILLS, BUTTON_PARTY, BUTTON_MPLAYER,
  BUTTON_MAP, BUTTON_QUEST, BUTTON_HELP, BUTTON_SETTINGS,
  NUM_BUTTONS
}

Functions

void widget_menubuttons (widgetdata *widget)
void widget_menubuttons_event (widgetdata *widget, SDL_Event *event)

Variables

static button_struct buttons [NUM_BUTTONS]
static int button_images [NUM_BUTTONS]
static const char *const button_tooltips [NUM_BUTTONS]
static uint8 did_init = 0

Detailed Description

Implements menu buttons code.

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_PARTY 

Party.

BUTTON_MPLAYER 

Music player.

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 33 of file menu_buttons.c.


Function Documentation

void widget_menubuttons ( widgetdata widget)

Show menu buttons widget.

Parameters:
widgetThe widget.

Definition at line 74 of file menu_buttons.c.

void widget_menubuttons_event ( widgetdata widget,
SDL_Event *  event 
)

Handle mouse events over the menu buttons widget.

Basically calls the right functions depending on which button was clicked.

Parameters:
widgetThe widget object.
eventThe event to handle.

Definition at line 155 of file menu_buttons.c.


Variable Documentation

int button_images[NUM_BUTTONS] [static]
Initial value:
{
    BITMAP_ICON_MAGIC, BITMAP_ICON_SKILL, BITMAP_ICON_PARTY, BITMAP_ICON_MUSIC, BITMAP_ICON_MAP, BITMAP_ICON_QUEST, -1, BITMAP_ICON_COGS
}

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

Definition at line 59 of file menu_buttons.c.

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

Tooltip texts for the buttons.

Definition at line 64 of file menu_buttons.c.

button_struct buttons[NUM_BUTTONS] [static]

Button buffers.

Definition at line 57 of file menu_buttons.c.

uint8 did_init = 0 [static]

Whether the buttons have been initialized.

Definition at line 69 of file menu_buttons.c.