GuiBitmapButtonTextCtrl: Does it work?
by Kevin Rogers · in Torque Game Engine · 11/05/2004 (7:16 pm) · 6 replies
Hey everyone,
I need a bitmap button that can display arbitrary text on it. Thinking that I'd have to roll my own, I jumped into the guiBitmapButtonCtrl code and started poking around. Much to my surprise, I found that there is already a GuiBitmapButtonTextCtrl class defined which seems to have the exact functionality that I need!
The problem I'm having, however, is actually using this control; it doesn't show in the New Control list in the GUI editor and so I'm not sure how or if I can use this control.
So, has anyone successfully used the GuiBitmapButtonTextCtrl in their code? Want to show me how or at least point me in the right direction?
Actually, this brings me to another more general question: How is the New Control list populated? In other words, if I create a new control, how do I access it in the GUI editor for placement?
Thanks in advance!
Kevin
I need a bitmap button that can display arbitrary text on it. Thinking that I'd have to roll my own, I jumped into the guiBitmapButtonCtrl code and started poking around. Much to my surprise, I found that there is already a GuiBitmapButtonTextCtrl class defined which seems to have the exact functionality that I need!
The problem I'm having, however, is actually using this control; it doesn't show in the New Control list in the GUI editor and so I'm not sure how or if I can use this control.
So, has anyone successfully used the GuiBitmapButtonTextCtrl in their code? Want to show me how or at least point me in the right direction?
Actually, this brings me to another more general question: How is the New Control list populated? In other words, if I create a new control, how do I access it in the GUI editor for placement?
Thanks in advance!
Kevin
#2
The specific problem was that there was no IMPLEMENT_CONOBJECT for GuiBitmapButtonTextCtrl. In guiCanvas.cc. I added the following line right after line 55:
One of these days I'll understand all the nuts and bolts that hook things up... =)
Kevin
11/06/2004 (4:55 pm)
Thanks for the info, Ben! You definitely pointed me in the right direction... The specific problem was that there was no IMPLEMENT_CONOBJECT for GuiBitmapButtonTextCtrl. In guiCanvas.cc. I added the following line right after line 55:
IMPLEMENT_CONOBJECT(GuiBitmapButtonTextCtrl);... and voila, the control shows up now! BTW, this is with version 1.3... if this hasn't been fixed in HEAD, this is definitely a candidate.
One of these days I'll understand all the nuts and bolts that hook things up... =)
Kevin
#3
11/07/2004 (10:54 am)
Huh, wild. I'll put that on my todolist.
#4
03/14/2005 (11:40 pm)
Fixed! Thank you!
#6
03/16/2005 (10:35 pm)
Thanks, Ben! =)
Associate Kyle Carter