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':
Like my software? PLEASE DONATE so I can keep working on it.
Download: TSDL (194.7KB | downloads: 393)
Arch users: TSDL is available through AUR
SourceView for TSDL
Source Tree
File Contents
build
Makefile
src
core
fps.c
imgcache.c
screen.c
stack.c
font.c
core.c
Makefile
tools
getlibs.c
inc
fps.h
numbox.h
events.h
core.h
label.h
console.h
text.h
button.h
tsdl.h
stack.h
checkbox.h
imgcache.h
widget.h
widgets
widgets.c
console.c
numbox.c
button.c
text.c
label.c
checkbox.c
Makefile
containers
container.c
Makefile
events
events.c
Makefile
images
tsdl_numbox.png
tsdl_button.png
tsdl_default_background.png
tsdl_checkbox.png
fonts
Century_Schoolbook.ttf
Makefile.inc
libtsdl.so
README
tsdl_test
test.c
LICENSE
Makefile
Dynamix SourceView
Choose a file for viewing from the left

