Page 1 of 1

Planned - Ingame Scripts & User Interfaces

PostPosted: Mon May 23, 2011 7:11 pm
by conathan
Currently, I render the view of the area activated w/ setPaint. This works well, but does limit things slightly.

I am going to draw nothing by default, and create the following command:

degfx.drawArea("name", x, y, width, height)

which will render the area within

Also, I am going to allow a script to draw & respond to the monitor & input. The benefit, will be more precise user interfaces, (instead of creating a new area, for a seperate user interface). It will also allow me to design ingame terminals, that can run the same scripts. (A computer monitor, showing the area around the starbase for example).

The script is going to run in lua. You can create additional gfx scripts (for use as buttons, scrollbars, textfields) *
init() - called when script is first created
start() - called when the script is loaded
stop() - called when the script is unloaded
poll() - run every frame the program is loaded
paint() -
*placeholder* keyboard inpute
*placeholder* mouse input
*placeholder* mouse movement input
- font - last set font.
- color - last set color.

gfx commands:
- drawRect
- drawImage
- drawArea
- drawString
- setFont
- setColor

There will be one main script, (with additional scripts added if wanted)
There will also be scripts that can respond to keys,
- F1 - help
- ESC - Main Menu
It will disable input for the main script when triggered, but still draw the main screen

Re: Planned - Ingame Scripts & User Interfaces

PostPosted: Tue Jul 05, 2011 2:36 pm
by conathan
Completed, Area's and Apps (the interfaces) are now separate.