Atrinik Client 2.5
Functions
toolkit/scroll_buttons.c File Reference
#include <global.h>

Go to the source code of this file.

Functions

static void scroll_buttons_show_one (SDL_Surface *surface, int x, int y, int *pos, int max_pos, int advance, SDL_Rect *box)
void scroll_buttons_show (SDL_Surface *surface, int x, int y, int *pos, int max_pos, int advance, SDL_Rect *box)

Detailed Description

The scroll buttons API.

Scroll buttons are basically simplified scrollbars which are often more user friendly than scrollbars. They allow the user to keep holding them in order to scroll, instead of having to drag a scrollbar, which is often imprecise.

Scroll buttons consist of 4 buttons:

Definition in file scroll_buttons.c.


Function Documentation

void scroll_buttons_show ( SDL_Surface *  surface,
int  x,
int  y,
int *  pos,
int  max_pos,
int  advance,
SDL_Rect *  box 
)

Show scroll buttons.

Parameters:
surfaceSurface to use.
xX position.
yY position.
posPointer to integer storing the current position.
max_posMaximum possible value for 'pos'.
advanceHow many rows to advance when using the custom-scroll buttons.
boxBox containing coordinates, usually same as x/y.

Definition at line 103 of file scroll_buttons.c.

static void scroll_buttons_show_one ( SDL_Surface *  surface,
int  x,
int  y,
int *  pos,
int  max_pos,
int  advance,
SDL_Rect *  box 
) [static]

Show one scroll button.

Parameters:
surfaceSurface to use.
xX position.
yY position.
posPointer to integer storing the current position.
max_posMaximum possible value for 'pos'.
advanceHow many rows to advance when using the custom-scroll buttons.
boxPositions for the box.

Definition at line 56 of file scroll_buttons.c.