Game Development Community

Bug in guiChunkedBitmapCtrl.cc

by Gonzo T. Clown · in Torque Game Engine · 09/28/2004 (4:32 am) · 3 replies

I was trying to write another GUI tutorial and couldn't get the control to work right, that's when I discovered the bug in the SDK.

At line 78 you'll find....

bool GuiChunkedBitmapCtrl::onWake()
{
   if(!Parent::onWake())
      return false;
   if ( mUseVariable )
      mTexHandle = ChunkedTextureHandle( Con::getVariable( mConsoleVariable ) );
   else
      mTexHandle = ChunkedTextureHandle( mBitmapName );
   return true;
}


If someone tries to use this control like their supposed to it will fail because the mUseVariable option is not being called properly. It needs to be updated using just

getVariable()

So it would look like this....


bool GuiChunkedBitmapCtrl::onWake()
{
   if(!Parent::onWake())
      return false;
   if ( mUseVariable )
      mTexHandle = ChunkedTextureHandle( getVariable() );
   else
      mTexHandle = ChunkedTextureHandle( mBitmapName );
   return true;
}



As soon as I made that change I had no trouble changing the bitmap using the console variable.

#1
10/01/2004 (3:17 am)
Ben, you there buddy? Can I get some CVS love?


This tut is depending on it, lol

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6493
#2
10/01/2004 (12:09 pm)
Howdy,

Been totally consumed by IGC prep. I'll put this on my todo list. As soon as we get the plans for Torque 1.4 stabilized I'll merge the fix in.

Cool to see you're writing tutorials!

Ben
#3
11/19/2004 (1:04 pm)
Fixed!