Game Development Community

DragDropGui for TSE

by Kyle Cook · in Torque Game Engine Advanced · 07/26/2006 (8:58 am) · 4 replies

Original Code

I have began an attempt to convert this over to TSE, my progress can be found here.
There are still 37 errors in the code, if anyone can see some real fast that would help a lot =-)

#1
08/01/2006 (5:37 am)
One of the first things I see is that you are missing all of the support you need to add to guiControl.h and .cc.
Without that code you will be getting a lot of "not a member of", because dragdrop inherits a lot from guiControl (as all GUI controls do)

So go take a look at guiControl and begin to add the things to your version of guiControl that are missing. Use winmerge to help! That will at least get you down to the tse specific changes for rendering.

Good luck!
#2
08/01/2006 (8:50 am)
Change all the texture->bitmapWidth (or bitmapHeight) statements to texture->getBitmapWidth() (or getBitmapHeight()).

Also with usage of texture handles: the way I usually use bitmaps is as follows:

1. GFXTexHandle mTextureHandle = GFXTexHandle("file name.png", &GFXDefaultGUIProfile);
2. GFXTextureObject* texture = (GFXTextureObject*) mTextureHandle;
3. GFX->drawBitmapStretchSR(texture,dstRegion, srcRegion, GFXBitmapFlip_None);

There may be a simpler way, but based on code that I've converted from TGE->TSE, it's worked for me.

You may need to include these two:

#include "gfx/gfxTextureHandle.h"
#include "materials/materialList.h"
#3
08/01/2006 (10:12 am)
Thanks for the help, I have now gotten it down to 18 errors!
#4
10/18/2006 (1:43 pm)
I ported DragDrop code from TGE to TSE !

Download from here :

http://xoomer.alice.it/afraboni/teamitalia/DragDrop.rar

Bye

^_^