Atrinik Client  4.0
Macros | Enumerations | Functions | Variables
party.c File Reference
#include <global.h>
#include <toolkit/packet.h>
#include <toolkit/string.h>

Go to the source code of this file.

Macros

#define STAT_BAR_WIDTH   65
 
#define PARTY_STAT_BAR()
 

Enumerations

enum  {
  BUTTON_PARTIES, BUTTON_MEMBERS, BUTTON_FORM, BUTTON_LEAVE,
  BUTTON_PASSWORD, BUTTON_CHAT, BUTTON_CLOSE, BUTTON_HELP,
  BUTTON_NUM
}
 

Functions

static void list_handle_enter (list_struct *list, SDL_Event *event)
 
static void list_row_highlight (list_struct *list, SDL_Rect box)
 
static void list_row_selected (list_struct *list, SDL_Rect box)
 
void socket_command_party (uint8_t *data, size_t len, size_t pos)
 
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_party_init (widgetdata *widget)
 

Variables

static button_struct buttons [BUTTON_NUM]
 
static list_structlist_party = NULL
 
static int8_t list_contents = -1
 

Detailed Description

Implements party type widgets.

Author
Alex Tokar

Definition in file party.c.

Macro Definition Documentation

#define PARTY_STAT_BAR ( )
Value:
snprintf(VS(bars), "[bar=#000000 %d 6][bar=#cb0202 %d 6]" \
"[border=#909090 %d 6][y=6][bar=#000000 %d 6]" \
"[bar=#1818a4 %d 6][y=-1][border=#909090 %d 7]", \
STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (hp / 100.0)), \
(sp / 100.0)), STAT_BAR_WIDTH);
#define STAT_BAR_WIDTH
Definition: party.c:37

Macro to create the stat bar markup.

Definition at line 40 of file party.c.

#define STAT_BAR_WIDTH   65

Width of the hp/sp stat bar.

Definition at line 37 of file party.c.

Function Documentation

static void list_handle_enter ( list_struct list,
SDL_Event *  event 
)
static

Handle enter/double click for the party list.

Parameters
listList.

Definition at line 80 of file party.c.

static void list_row_highlight ( list_struct list,
SDL_Rect  box 
)
static

Highlight a row in the party list.

Parameters
listList.
boxDimensions for the row.

Definition at line 97 of file party.c.

static void list_row_selected ( list_struct list,
SDL_Rect  box 
)
static

Highlight selected row in the party list.

Parameters
listList.
boxDimensions for the row.

Definition at line 109 of file party.c.

void socket_command_party ( uint8_t *  data,
size_t  len,
size_t  pos 
)

Definition at line 115 of file party.c.

static void widget_background ( widgetdata widget,
int  draw 
)
static

Definition at line 290 of file party.c.

static void widget_deinit ( widgetdata widget)
static

Definition at line 405 of file party.c.

static void widget_draw ( widgetdata widget)
static

Definition at line 237 of file party.c.

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

Definition at line 337 of file party.c.

void widget_party_init ( widgetdata widget)

Initialize one party widget.

Definition at line 420 of file party.c.

Variable Documentation

button_struct buttons[BUTTON_NUM]
static

Button buffer.

Definition at line 64 of file party.c.

int8_t list_contents = -1
static

What type of data is currently in the list; -1 means no data, otherwise one of Party socket command types.

Definition at line 73 of file party.c.

list_struct* list_party = NULL
static

The party list.

Definition at line 68 of file party.c.