Extending a GUI class in Script
by Chad Kilgore · in Technical Issues · 09/21/2006 (2:23 pm) · 0 replies
What I want to do is encapsulate the following code into an object so that I can keep the various gui objects separate and organized:
//--- OBJECT WRITE BEGIN ---
new GuiMenuBar(guiPolybiusTaskbar) {
canSaveDynamicFields = "0";
Profile = "GuiMenuBarProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "800 32";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
Padding = "0";
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "98 30";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
tooltip = "Click here to begin";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./images/btnStart";
};
};
//--- OBJECT WRITE END ---
Can I encapsulate this code into an object without extending the GuiMenuBar source? If so, how?
Can I add this object to the Canvas? If so, how?
I just want to remake a simple version of Windows XP in Torque Game Builder...this is crazy, right?
//--- OBJECT WRITE BEGIN ---
new GuiMenuBar(guiPolybiusTaskbar) {
canSaveDynamicFields = "0";
Profile = "GuiMenuBarProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "800 32";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
Padding = "0";
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "98 30";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
tooltip = "Click here to begin";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./images/btnStart";
};
};
//--- OBJECT WRITE END ---
Can I encapsulate this code into an object without extending the GuiMenuBar source? If so, how?
Can I add this object to the Canvas? If so, how?
I just want to remake a simple version of Windows XP in Torque Game Builder...this is crazy, right?