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

Go to the source code of this file.

Macros

#define LOGIN_TEXT_INPUT_MAX   ((button_tab_login.pressed_forced ? LOGIN_TEXT_INPUT_PASSWORD : LOGIN_TEXT_INPUT_PASSWORD2) + 1)
 

Enumerations

enum  { LOGIN_TEXT_INPUT_NAME, LOGIN_TEXT_INPUT_PASSWORD, LOGIN_TEXT_INPUT_PASSWORD2, LOGIN_TEXT_INPUT_NUM }
 

Functions

static int text_input_character_check (text_input_struct *text_input, char c)
 
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 login_start (void)
 

Variables

static progress_dots progress
 
static button_struct button_tab_login
 
static button_struct button_tab_register
 
static button_struct button_done
 
static text_input_struct text_inputs [LOGIN_TEXT_INPUT_NUM]
 
static size_t text_input_current
 

Detailed Description

Implements the login popup.

Author
Alex Tokar

Definition in file login.c.

Function Documentation

void login_start ( void  )

Start the login procedure.

Definition at line 281 of file login.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 261 of file login.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 76 of file login.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 158 of file login.c.

static int text_input_character_check ( text_input_struct text_input,
char  c 
)
static

Definition at line 64 of file login.c.

Variable Documentation

button_struct button_tab_login
static

Button buffer.

Definition at line 53 of file login.c.

progress_dots progress
static

Progress dots buffer.

Definition at line 49 of file login.c.

size_t text_input_current
static

Currently selected text input.

Definition at line 61 of file login.c.

text_input_struct text_inputs[LOGIN_TEXT_INPUT_NUM]
static

Text input buffers.

Definition at line 57 of file login.c.