Can GUI objects be inherited?
by CdnGater · in Torque Game Engine · 04/01/2005 (3:53 pm) · 2 replies
I am trying to create a template of a control via script, but I am not having much success.
OK, thats a sample template, dunno if it right
now what I want to do is create new control based on that.
I have tried the following, and does not work
Can this even be done? If so, how, because I am at a loss.
Thanks
new GuiControl(TestTemplate) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
new GuiButtonCtrl(TestTemplateBtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "23 17";
extent = "140 30";
minExtent = "8 2";
visible = "1";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
};
};OK, thats a sample template, dunno if it right
now what I want to do is create new control based on that.
I have tried the following, and does not work
new TestTemplate( test1 )
{
// Gives me an error about not being a CON Object
};
new GuiControl( test2 : TestTemplate )
{
// Does absolutly nothing
};
new GuiControl( test3 )
{
class = "TestTemplate";
// just laughs at me as class and superClass are only part of scriptObject
};Can this even be done? If so, how, because I am at a loss.
Thanks
Associate Kyle Carter