Update bump!
I've added a new api, ggui. No documentation in the OP yet, but there are two sample programs with it that demonstrate (almost) all of the features.
current gui elements:
labels - just that. display text.
buttons - like labels, but can be selected and clicked, and generate events when they are.
text fields - basic, single-line text fields.
graphics - "pixel" image elements that import files made in cc paint
general features:
mouse and keyboard-based focus control - tab or arrow to cycle through focus-enabled elements (buttons and text fields currently), click or enter to activate buttons.
dynamic styles - built-in defaults that can be overridden and extended to alter the colors, decoration characters, alignment, and other behaviors of all elements, with the ability to define different styles for color or black-and-white computers for easy compatibility with both
graphic slicing - when creating graphic elements, can optionally specify source x, y, width, and height values, allowing only a portion of the image to be loaded and rendered. Caching of the original source allows multiple graphic elements to efficiently use different parts of a single graphic file, basically allowing a form of spritesheets.
event callback system - write functions to handle different events and then assign them as event handlers. Handlers can specify additional filters beyond just the event type, so all the ugly if-if-elseif-end-elseif-elseif-end nonsense you normaly go through to figure out what event you're dealing with is hidden away in the api, keeping your code cleaner.
The sample programs:
.
login - a sample login screen, that works on color or b/w computers. Demonstrates buttons, labels, text fields, graphics, styles, and event handlers. (note: this is not a secure login program, it is simply a demonstration of the gui system.)
redstone - a program for monitoring and setting redstone state on all sides of a computer. Demonstrates buttons, labels, styles, event handlers, and custom tab ordering.
Downloads
Installer
pastebin get fq8SinNB gguisetup
Installer will download the api, the two sample programs, and the graphics files required by the samples. just download and run "guisetup <dir>" to install to a specified directory.
If you don't care about examples and just wanna poke through the api itself, here ya go...
The api
pastebin get i0EyjZ2W ggui