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

Go to the source code of this file.

Defines

#define STAT_BAR_WIDTH   60
#define PARTY_STAT_BAR()   snprintf(bars, sizeof(bars), "<x=5><bar=#000000 %d 4><bar=#cb0202 %d 4><y=4><bar=#000000 %d 4><bar=#1818a4 %d 4><y=4><bar=#000000 %d 4><bar=#15bc15 %d 4>", STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (hp / 100.0)), STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (sp / 100.0)), STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (grace / 100.0)));

Functions

static void list_handle_enter (list_struct *list)
static void list_row_highlight (list_struct *list, SDL_Rect box)
static void list_row_selected (list_struct *list, SDL_Rect box)
void widget_party_background (widgetdata *widget)
void widget_party_render (widgetdata *widget)
void widget_party_mevent (widgetdata *widget, SDL_Event *event)
void PartyCmd (unsigned char *data, int len)

Variables

static button_struct button_close
static button_struct button_help
static button_struct button_parties
static button_struct button_members
static button_struct button_form
static button_struct button_leave
static button_struct button_password
static button_struct button_chat
static sint8 list_contents = -1

Detailed Description

Handles the party widget.

Definition in file party.c.


Define Documentation

#define PARTY_STAT_BAR ( )    snprintf(bars, sizeof(bars), "<x=5><bar=#000000 %d 4><bar=#cb0202 %d 4><y=4><bar=#000000 %d 4><bar=#1818a4 %d 4><y=4><bar=#000000 %d 4><bar=#15bc15 %d 4>", STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (hp / 100.0)), STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (sp / 100.0)), STAT_BAR_WIDTH, (int) (STAT_BAR_WIDTH * (grace / 100.0)));

Macro to create the stat bar markup.

Definition at line 36 of file party.c.

#define STAT_BAR_WIDTH   60

Width of the hp/sp/grace stat bar.

Definition at line 33 of file party.c.


Function Documentation

static void list_handle_enter ( list_struct list) [static]

Handle enter/double click for the party list.

Parameters:
listList.

Definition at line 50 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 65 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 79 of file party.c.

void PartyCmd ( unsigned char *  data,
int  len 
)

Party command.

Parameters:
dataData.
lenLength of the data.

Definition at line 273 of file party.c.

void widget_party_background ( widgetdata widget)

Process the party widget in the background (even if it's hidden).

This is mostly so the surface and the list are always created, in the case that the widget is hidden, but player uses "/party list" or similar.

Parameters:
widgetThe widget.

Definition at line 96 of file party.c.

void widget_party_mevent ( widgetdata widget,
SDL_Event *  event 
)

Handle mouse events inside the party widget.

Parameters:
widgetThe widget.
eventEvent to handle.

Definition at line 214 of file party.c.

void widget_party_render ( widgetdata widget)

Render the party widget.

Parameters:
widgetThe widget.

Definition at line 143 of file party.c.


Variable Documentation

Button buffer.

Definition at line 40 of file party.c.

sint8 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 45 of file party.c.