Game Development Community

GuiBitmapCtrl setBitmap Issues

by Ian Omroth Hardingham · in Torque Game Engine · 08/04/2009 (3:23 am) · 1 replies

I'm having issues with adding a GBitmap to a canvas. I've created a simple example (below) to demonstrate my problem - when using a path, setBitmap works with no problems but when I try to use the GFXTexHandle, it shows the outline of the boundary box but nothing else.

GBitmap * gbitmap = new GBitmap(100, 100);
gbitmap->fill(ColorI::BLUE);
GFXTexHandle * gth = new GFXTexHandle(gbitmap, &GFXDefaultGUIProfile, false, "someText");

GuiBitmapCtrl * gbc = new GuiBitmapCtrl();
gbc->registerObject();

// This doesn't work
gbc->setBitmap(*gth);
// This works fine	
//gbc->setBitmap("face.png");

gCanvas->getContentControl()->addObject(gbc);

#1
09/10/2009 (12:55 pm)
Anyone? This seems like such a simple problem that either I'm doing something stupid or it's a bug.