Atrinik Client  4.0
Data Structures | Macros | Typedefs | Functions
game_news.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <toolkit/curl.h>
#include <curl/curl.h>

Go to the source code of this file.

Data Structures

struct  game_news
 

Macros

#define NEWS_MAX_WIDTH   455
 
#define NEWS_MAX_HEIGHT   250
 
#define NEWS_FONT   FONT_SANS12
 

Typedefs

typedef struct game_news game_news_t
 

Functions

static int popup_draw (popup_struct *popup)
 
static int popup_event (popup_struct *popup, SDL_Event *event)
 
static int popup_destroy_callback (popup_struct *popup)
 
void game_news_open (const char *title)
 

Detailed Description

Implements the game news popup.

Author
Alex Tokar

Definition in file game_news.c.

Macro Definition Documentation

#define NEWS_FONT   FONT_SANS12

Font of the text.

Definition at line 48 of file game_news.c.

#define NEWS_MAX_HEIGHT   250

Maximum height of the text.

Definition at line 44 of file game_news.c.

#define NEWS_MAX_WIDTH   455

Maximum width of the text.

Definition at line 40 of file game_news.c.

Typedef Documentation

typedef struct game_news game_news_t

Structure that holds the game news popup data.

Function Documentation

void game_news_open ( const char *  title)

Open the game news popup.

Parameters
titleTitle of the news entry that we want to read.

Definition at line 231 of file game_news.c.

static int popup_destroy_callback ( popup_struct popup)
static

Function used right before the visible popup is destroyed using popup_destroy_visible().

Parameters
popupThe popup.
Returns
1 to proceed with the destruction of the popup, 0 otherwise.

Definition at line 211 of file game_news.c.

static int popup_draw ( popup_struct popup)
static

Function used for drawing on the popup's surface.

Parameters
popupThe popup.
Returns
0 to destroy the popup, 1 otherwise.

Definition at line 92 of file game_news.c.

static int popup_event ( popup_struct popup,
SDL_Event *  event 
)
static

Function used for handling mouse/key events when popup is visible.

Parameters
eventSDL event.
Return values
-1Did not handle the event.
0Did not handle the event, but allow other keyboard events.
1Handled the event.

Definition at line 159 of file game_news.c.