Tuxánci 2
Successor to Tuxánci
 
Loading...
Searching...
No Matches
list.h File Reference

List system. More...

#include "raylib.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  List
 

Macros

#define LIST_MAX_ITEMS   64
 Maximum number of items in a List.
 
#define LIST_ITEM_HEIGHT   30
 Height of each item row in pixels.
 

Typedefs

typedef struct List List
 

Functions

List listCreate (int x, int y, int w, int h)
 Creates a new List.
 
void listDraw (List *l)
 Draws a List.
 
bool listCheck (List *l)
 Checks if an item in the List was clicked.
 
bool listAdd (List *l, const char *name)
 Adds an item to a List.
 
bool listRemove (List *l, const char *name)
 Removes an item from a List.
 

Detailed Description

List system.

Function Documentation

◆ listAdd()

bool listAdd ( List * l,
const char * name )

Adds an item to a List.

Parameters
lThe List to add to
nameThe name of the item to add
Returns
true if the item was added, false if the List is full

◆ listCheck()

bool listCheck ( List * l)

Checks if an item in the List was clicked.

Parameters
lThe List you want to check
Returns
true if a new item was selected, false otherwise

◆ listCreate()

List listCreate ( int x,
int y,
int w,
int h )

Creates a new List.

Parameters
xHorizontal screen position of the List
yVertical screen position of the List
wWidth of the List
hHeight of the List
Returns
A List struct

◆ listDraw()

void listDraw ( List * l)

Draws a List.

Parameters
lThe List you want to draw

◆ listRemove()

bool listRemove ( List * l,
const char * name )

Removes an item from a List.

Parameters
lThe List to remove from
nameThe name of the item to remove
Returns
true if the item was found and removed, false if it was not found