Tuesday, November 9, 2010

3-D Dialog Boxes

Here is another partially implemented feature in the engine. It involves writing text to a fully rotatable, scalable canvas. An example:


And here is the class signature as it stands today in the engine:

jUI (j3Dvector nstartloc, float nwidth, float nheight, j3Drotation nrotation, jcolor ncolor)

...where nstartloc is the starting location (in 3-D coordinates), nwidth is the width of the canvas, nheight is the height, rotation is the 3-D rotation of the canvas, and jcolor represents the background color. Fonts can then be added in sets with the following signature:

int jUI::AddUISet (char * nfilename, float nsetheight, float nsetwidth, float ncharheight, float ncharwidth, unsigned char nalpha)

...where a unique integer is returned for each font set added. This integer is later referred to during WriteLine operations:

void jUI::WriteLine (char * nstring, int nUIset, float nxloc, float nyloc)

Eventually, it is my hope and plan to develop a more polished look to the canvas itself (i.e. rounded corners, better fonts, etc.) as well as adding options for embedding images. I also want to eventually add the ability to scroll text and offer some basic button functionality. This would help immensely with the creation of HUD displays and dialog boxes.

Theoretically, if I really wanted to go in a different direction with this, I suppose at some point I could open the canvas up so that it would be able to render web pages.

Next time: the contour mapping tool.

No comments:

Post a Comment