Game Development Community

GUI control won't show up :(

by FruitBatInShades · in Torque Game Engine · 02/04/2005 (4:49 am) · 13 replies

I tried to add this radar gui to the engine. After a bit of difficulty (which Man_of_ice helped me with) I got it to compile fine, no errors.
The problem I have is that the new control does not show up in the gui editor as a control (in the dropdown). Has anyone got any ideas why or have used this control and have the definitions in a gui file so I can copy and paste them to at least see if the control is working?

Thanks

#1
02/04/2005 (6:32 am)
Give it a name.
#2
02/04/2005 (6:36 am)
Thanks for that concise, illustrative and utterly useless explanation Gonzo! :oP
#3
02/04/2005 (7:26 am)
Not a problem. I see now what you meant. A gui will not show up in the list without a name, but you were looking in the control list(which you said but I didn't catch at first). I'm not 100% positive, but it would appear that the problem is that the control is private. In the .h file you'll see at the very top...

private:
typedef GuiBitmapCtrl Parent;


try moving the typedef up above the "private:" declaration and see if that opens it up to you. That's the best I have to offer at the moment.
#4
02/04/2005 (1:03 pm)
Thanks gonzo i'll give it a try when i get back home :)
#5
02/04/2005 (1:58 pm)
IIRC, we ran into an issue regarding how new contols are parsed into the list as the source is compiled--it had to do with where in the makefile you added the new code. Again, IIRC, you want to put any new huds in the makefile at the end of the GUI section--however, if that doesn't work, put them at the front (sorry, I'm really fuzzy as to how we solved the issue).
#6
02/08/2005 (3:51 am)
@Stephen: I'm using VC7 so the make files are automatic.

This is driving me mad! The control compiles fine, its in the project files in the same place as all other gui controls but does not appear in the gui editor drop down.
Does anyone know how to get torque to dump its known gui classes to the console? That would be somewhere to start.
#7
02/08/2005 (4:15 am)
ARGGGHHHHHHHHHHHHHHHHHHHH



It helps if you compile the right DAMN PROJECT. arrrgggghhhhhhhh
#8
02/08/2005 (4:23 am)
Lol fruit bat im not saying a word to that one :P
#9
02/08/2005 (6:08 am)
Type in

tree();


In the window that pops up find the GUI object group and export it or any part of it. You can also look at the values of anything in the tree. In the meantime, if you haven't already, you can just enter this datablock into your playGui and see if it's working...(you can also see it's profile in the tree "GuiRadarProfile")


new GuiRadarCtrl() {
      profile = "GuiDefaultProfile";
      horizSizing = "left";
      vertSizing = "top";
      position = "640 430";
      extent = "130 127";
      minExtent = "8 2";
      visible = "1";
      helpTag = "0";
      bitmap = "UPDATE/YOUR/ART/PathTo/radar_base.png";
      wrap = "0";
   };
#10
02/08/2005 (11:45 pm)
FBiS


Did you ever get this working?
#11
02/09/2005 (2:12 am)
@Gonzo:

Yes thanks gonzo :) Read 4 posts up ^ Someone else did the same I noticed yesterday on another thread!
#12
02/09/2005 (4:48 am)
DOH!!!! I'm glad I asked first because if you hadn't I was going to ask you "Are you sure it's added to your project?"

lol
#13
02/09/2005 (5:04 am)
Windows dev background you see. If there a library file you make changes to that and recompile the project. It was only when browsing through the object tree I realised they were the same. Explains quite a few other probs I've been having too. I hate it when the problem is me being stupid :)