Game Development Community

dev|Pro Game Development Curriculum

Bitmap Windows for TGEA 1.8.2

by Richard Preziosi · 10/21/2010 (1:40 am) · 0 comments

I wasn't happy with the normal window controls inside the gui editor, and making arrays is very limiting and often very annoying. Since I wasn't into trial and error, nor did i want to limit myself, I did some searching and found a resource for moveable bitmap controls by James Laker. This resource takes that idea and adds more functionality. This is for TGEA 1.8.2, but possibly easily ported to T3D.

This control currently supports:
1. Moveable bitmap control
2. Setting of active window
3. Window title (see note below)
4. Drag window off screen

You can grab the files here. I put mine in gui/containers, but feel free to move to wherever suits you best. I should note that anywhere on the bitmap can be clicked to move the window, so if you do not desire this, you will need to layer another bitmap over the part that you do not want this feature.

Note about the window title, this feature does work, but only sort of. The first problem is that my sloppy coding seems to have broken the offset part of it. I'll keep trying to fix it, but not making any promises. My personal fix for it is to just type a bunch of spaces before the "text" to position it where I want it.

The second problem is kind of a biggy, as soon as you add a new gui element to the window, the title does not render unless the new item is placed where the title would go. This second problem I will definitely be looking into, as it is kind of important.

An easy fix to the title problems are to just add a guiNoMouseCtrl and place a guiTextCtrl into that gui element, it's hackish, but is a decent temporary fix.

Other than that, hopefully this is useful to someone, enjoy.