Planned - Ingame Scripts & User Interfaces

Planned - Ingame Scripts & User Interfaces

Postby conathan » Mon May 23, 2011 7:11 pm

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
variables:
- 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
conathan
Site Admin
 
Posts: 19
Joined: Sat Apr 16, 2011 10:49 pm
Location: Nanaimo, BC, Canada

Re: Planned - Ingame Scripts & User Interfaces

Postby conathan » Tue Jul 05, 2011 2:36 pm

Completed, Area's and Apps (the interfaces) are now separate.
conathan
Site Admin
 
Posts: 19
Joined: Sat Apr 16, 2011 10:49 pm
Location: Nanaimo, BC, Canada


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron