TSDL
A small widget and events library for SDL
TSDL was written for my turn-based strategy game 'Turious', but is a stand alone library. It provides a number of useful widgets, and event handling functions.
WIDGETS: container - provides a containing element for other widgets label - simple "draw text" label button - button is the base widget with click,mouseup,mousedown,mouseover, mouseout,mousemove events text - extension of the button widget, allows for text entry numbox - extension of the text widget to allow numeric entry only, with increment/decrement buttons on the side, and mouse scrollwheel increment/decrement checkbox - extension of the button widget, click toggles an int value 0/1 and updates the background to show checked/unchecked state console - provides a simple method of outputting messages to the user, automatically scrolls to maintain a maximum number of lines
All of the widgets can be given individual background images, custom text, etc, containers and widgets can be shown and hidden individually, and will stay in their shown/unshown state across SDL_Flip calls.
The widgets in use on 'Turious':
Download: TSDL rc2 (194.7KB | downloads: 73)
SourceView for TSDL
Source Tree
File Contents
images
tsdl_checkbox.png
tsdl_button.png
tsdl_numbox.png
tsdl_default_background.png
build
Makefile
fonts
Century_Schoolbook.ttf
src
tools
getlibs.c
inc
events.h
text.h
button.h
stack.h
numbox.h
checkbox.h
label.h
widget.h
imgcache.h
fps.h
tsdl.h
console.h
core.h
containers
container.c
Makefile
widgets
numbox.c
checkbox.c
widgets.c
label.c
button.c
console.c
Makefile
text.c
core
screen.c
core.c
stack.c
fps.c
imgcache.c
Makefile
font.c
events
events.c
Makefile
libtsdl.so
README
test.c
tsdl_test
LICENSE
Makefile
Makefile.inc
Dynamix SourceView
Choose a file for viewing from the left