Go to the source code of this file.
Functions |
| void | draw_frame (SDL_Surface *surface, int x, int y, int w, int h) |
| void | border_create (SDL_Surface *surface, int x, int y, int w, int h, int color, int size) |
| void | add_close_button (int x, int y, int menu) |
| int | add_button (int x, int y, int id, int gfxNr, char *text, char *text_h) |
| int | add_gr_button (int x, int y, int id, int gfxNr, const char *text, const char *text_h) |
| void | add_value (void *value, int type, int offset, int min, int max) |
| void | draw_tabs (const char *tabs[], int *act_tab, const char *head_text, int x, int y) |
Variables |
|
int | active_button = -1 |
Detailed Description
Implements most client dialogs (GUIs).
Definition in file dialog.c.
Function Documentation
| int add_button |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
id, |
|
|
int |
gfxNr, |
|
|
char * |
text, |
|
|
char * |
text_h |
|
) |
| |
Add a button and handle mouse events over it.
- Parameters:
-
| x | X position. |
| y | Y position. |
| id | Button ID. |
| gfxNr | ID of the button bitmap to draw. |
| text | Text to draw. |
| text_h | Text for keyboard user. |
- Returns:
- 1 if the button was pressed, 0 otherwise.
Definition at line 135 of file dialog.c.
| void add_close_button |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
menu |
|
) |
| |
Add a close button and handle mouse events over it.
- Parameters:
-
| x | X position. |
| y | Y position. |
| menu | Menu the button is on. |
Definition at line 104 of file dialog.c.
| int add_gr_button |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
id, |
|
|
int |
gfxNr, |
|
|
const char * |
text, |
|
|
const char * |
text_h |
|
) |
| |
Add a group button and handle mouse events over it.
- Parameters:
-
| x | X position. |
| y | Y position. |
| id | Button ID. |
| gfxNr | ID of the button bitmap to draw. |
| text | Text to draw. |
| text_h | Text for keyboard user. |
- Returns:
- 1 if the button was pressed, 0 otherwise.
Definition at line 191 of file dialog.c.
| void add_value |
( |
void * |
value, |
|
|
int |
type, |
|
|
int |
offset, |
|
|
int |
min, |
|
|
int |
max |
|
) |
| |
Add offset to an integer value.
- Parameters:
-
| value | Value to add to. |
| type | Type of the value. |
| offset | What to add to value. |
| min | Minimum value. |
| max | Maximum value. |
Definition at line 231 of file dialog.c.
| void border_create |
( |
SDL_Surface * |
surface, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
color, |
|
|
int |
size |
|
) |
| |
Create a border around the specified coordinates.
- Parameters:
-
| surface | Surface to use. |
| x | X start of the border. |
| y | Y start of the border. |
| w | Maximum border width. |
| h | Maximum border height. |
| color | Color to use for the border. |
| size | Border's size. |
Definition at line 72 of file dialog.c.
| void draw_frame |
( |
SDL_Surface * |
surface, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
Draw a single frame.
- Parameters:
-
| surface | Surface to draw on. |
| x | X position. |
| y | Y position. |
| w | Width of the frame. |
| h | Height of the frame. |
Definition at line 41 of file dialog.c.
| void draw_tabs |
( |
const char * |
tabs[], |
|
|
int * |
act_tab, |
|
|
const char * |
head_text, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Draw tabs on the left side of a window.
- Parameters:
-
| tabs | The tabs to draw. |
| [out] | act_tab | Currently active tab. |
| head_text | Header text, above the tabs. |
| x | X position. |
| y | Y position. |
Definition at line 291 of file dialog.c.