Game Development Community

Torque.GUI.GUIButton vs. Combat's GUIButtonBase

by Zvi Effron · in Torque X 2D · 03/24/2007 (9:47 pm) · 5 replies

As I've been looking through and pulling from the sample code provided, I noticed that Torque.GUI has a button class, but that TorqueCombat defines its own button class derived from GUIControl instead of GUIButton. I was wondering why this is, and if that is really preferable, what's the purpose of the GUIButton class?

#1
03/24/2007 (11:03 pm)
I believe TorqueCombat was written before GUIButton existed. Also, the TorqueCombat GUIButtonBase provides different functionality from that of stock GUIButton.

Making your own specialized GUI controls is perfectly normal and encouraged. You do have the source after all.
#2
03/26/2007 (8:39 am)
TorqueCombat has some terrific GUI controls *cough* get them into TX damnit *cough* and was written before some of the GUIComponents that exist in TX were. As to which is better for your game, only you can decide.

Depending on where GG goes with TX, I have about a dozen GUI Controls that I'm going to be releasing for free after DBP.

www.linkedin.com/img/webpromo/btn_viewmy_160x25.gif

www.mmogamedev.info/images/imgdc_ad1.gif
#3
03/26/2007 (11:10 am)
Thanks, I think the chronology makes sense. Also, from another conversation I've been having with the devs, GUIButton was also not designed to be inherited from.
#4
03/26/2007 (12:56 pm)
GUIButton from TorqueCombat or from TX?


www.linkedin.com/img/webpromo/btn_viewmy_160x25.gif

www.mmogamedev.info/images/imgdc_ad1.gif
#5
03/26/2007 (1:19 pm)
GUIButton is from TX. TorqueCombat has GUIBaseButton and GUIBitmapButton.