Drastically re-did listboxes. Listbox data is now stored as WIDGET_LABEL_CLIPs, a...
commitca74471e3d67c4d476c9ee9eb767bd52e419d717
authordwk <dwk@b022f027-f587-4676-bc72-f0cf7b603704>
Thu, 10 Jan 2008 00:01:52 +0000 (10 00:01 +0000)
committerdwk <dwk@b022f027-f587-4676-bc72-f0cf7b603704>
Thu, 10 Jan 2008 00:01:52 +0000 (10 00:01 +0000)
tree8ecd0f7f772e5fdc7ad7185be2f0da22a411f53b
parentfae19aa2e2e7c06f67f9cdd452e07b7a1a9c24c0
Drastically re-did listboxes. Listbox data is now stored as WIDGET_LABEL_CLIPs, a new widget like WIDGET_LABEL but with scrolling support. Yes, listboxes now scroll properly. There are still some troubles to be had, however, such as the centre bar of scrollbars not working, and having to click over and over again on a scrollbar's up or down button -- the buttons don't "repeat". The code is very specific as well.

Added a new widget type: WIDGET_LABEL_CLIP. It's used for listboxes, although it's likely that the code used for this widget will become common to all widgets, and WIDGET_LABEL_CLIP will become plain old WIDGET_LABEL.

Split up paint_widget() into several functions: paint_button(), paint_box(), etc. (The old paint_box() had to be renamed, of course.) paint_widget() itself uses an array of function pointers to the sub-paint_*() functions to do its work.

Changed the all target of dist/Makefile. It now has no need to execute gzip directly, instead passing 'z' to tar. It prints information about the files added to the archive. It also no longer prints dozens of lines of output.

Re-generated gui/title.png. It's now larger (200 point font). The file is larger, it's true, 165KB instead of under 100KB; but the fonts are over 200 and 400KB, so this is not too significant. Any larger, however, and the title looks strange scaled down. Perhaps there could be a few title.pngs, for different resolutions.

Click detection of all widgets, including listbox scrollbar buttons, is still very inefficient and needs to be changed.
dist/Makefile
gui/title.png
src/graphics.c
src/graphics.h
src/gui.c
src/gui.h
src/options.c
src/resource.c