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

Go to the source code of this file.

Functions

void notification_destroy (void)
 
static void notification_action_do (void)
 
int notification_keybind_check (const char *cmd)
 
void socket_command_notification (uint8_t *data, size_t len, size_t pos)
 
static void widget_draw (widgetdata *widget)
 
static int widget_event (widgetdata *widget, SDL_Event *event)
 
void widget_notification_init (widgetdata *widget)
 

Variables

static notification_structnotification = NULL
 

Detailed Description

Implements notification type widgets.

Similar to tooltips, but instead triggered by player actions. Such a notification can even define an action to execute when the notification is clicked, or if the notification has a keybinding shortcut assigned to it, when the shortcut key is pressed (thus overriding normal behavior of that particular shortcut).

Author
Alex Tokar

Definition in file notification.c.

Function Documentation

static void notification_action_do ( void  )
static

Process notification's action, if any.

Definition at line 73 of file notification.c.

void notification_destroy ( void  )

Destroy notification data.

Definition at line 51 of file notification.c.

int notification_keybind_check ( const char *  cmd)

Check whether notification should handle keybinding macro.

Parameters
cmdMacro to check.
Returns
1 if the notification handled the keybinding, 0 otherwise.

Definition at line 95 of file notification.c.

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

Definition at line 106 of file notification.c.

static void widget_draw ( widgetdata widget)
static

Definition at line 232 of file notification.c.

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

Definition at line 274 of file notification.c.

void widget_notification_init ( widgetdata widget)

Initialize one notification widget.

Definition at line 287 of file notification.c.

Variable Documentation

notification_struct* notification = NULL
static

The notification data.

Definition at line 46 of file notification.c.