GUI Player Select Screen
by Ryan Behnke · in Torque 3D Beginner · 04/11/2010 (4:32 pm) · 0 replies
Im creating a Player select screen that when you mouse over a player head shot that the full image of the player shows up. Any Direction would be helpful.
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(PlayerSelect) {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiChunkedBitmapCtrl(BackGround) {
bitmap = "../../Pictures/VR/grey_background.gif";
useVariable = "0";
tile = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
position = "-4 -15";
Extent = "1051 793";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
new GuiBitmapCtrl() {
bitmap = "../../Pictures/VR/no-preview";
wrap = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
position = "102 108";
Extent = "187 377";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Player1Preview";
canSaveDynamicFields = "1";
enabled = "1";
TypeBool locked = "0";
};
new GuiBitmapCtrl() {
bitmap = "../../Pictures/VR/question-mark1a-225x300.jpg";
wrap = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "relative";
position = "704 91";
Extent = "194 382";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Player2Preview";
canSaveDynamicFields = "1";
};
new GuiDynamicCtrlArrayControl() {
colCount = "2";
colSize = "140";
rowCount = "1";
RowSize = "76";
rowSpacing = "0";
colSpacing = "3";
frozen = "0";
autoCellSize = "1";
fillRowFirst = "1";
DynamicSize = "0";
Padding = "0 0 0 0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "296 314";
Extent = "403 71";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Row1previews";
canSaveDynamicFields = "1";
firstVisible = "0";
lastVisible = "1";
TypeBool locked = "defaultValue";
new GuiBitmapButtonTextCtrl() {
bitmap = "../../Pictures/VR/HumanHead.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "140 76";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "BackGround.previewSelected(BackGround->Row1previews->HumanHead);";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "HumanHead";
canSaveDynamicFields = "1";
TypeBool locked = "false";
};
new GuiBitmapButtonCtrl() {
bitmap = "../../Pictures/VR/mystery_profile.jpg";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "143 0";
Extent = "140 76";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "BackGround.previewSelected(BackGround->Row1previews->Row1preview2);";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Row1preview1";
canSaveDynamicFields = "1";
};
};
new GuiClockHud() {
showFill = "1";
showFrame = "1";
fillColor = "0.0156863 0.0156863 0.0156863 0.5";
frameColor = "0.909804 0.968628 0.909804 1";
textColor = "0.94902 0.980392 0.94902 1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "top";
position = "480 8";
Extent = "64 64";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
new GuiBitmapButtonTextCtrl(AndroidHeadUWF) {
bitmap = "../../Pictures/VR/AndriodHeadUWF.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "371 410";
Extent = "118 73";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonTextCtrl(UndeadHead) {
bitmap = "../../Pictures/VR/UndeadHead.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "449 508";
Extent = "122 72";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonTextCtrl(AndroidHeadOWF) {
bitmap = "../../Pictures/VR/AndriodHeadOWF.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "521 409";
Extent = "120 74";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
//--- OBJECT WRITE END ---
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(PlayerSelect) {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiChunkedBitmapCtrl(BackGround) {
bitmap = "../../Pictures/VR/grey_background.gif";
useVariable = "0";
tile = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
position = "-4 -15";
Extent = "1051 793";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
new GuiBitmapCtrl() {
bitmap = "../../Pictures/VR/no-preview";
wrap = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
position = "102 108";
Extent = "187 377";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Player1Preview";
canSaveDynamicFields = "1";
enabled = "1";
TypeBool locked = "0";
};
new GuiBitmapCtrl() {
bitmap = "../../Pictures/VR/question-mark1a-225x300.jpg";
wrap = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "relative";
position = "704 91";
Extent = "194 382";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Player2Preview";
canSaveDynamicFields = "1";
};
new GuiDynamicCtrlArrayControl() {
colCount = "2";
colSize = "140";
rowCount = "1";
RowSize = "76";
rowSpacing = "0";
colSpacing = "3";
frozen = "0";
autoCellSize = "1";
fillRowFirst = "1";
DynamicSize = "0";
Padding = "0 0 0 0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "296 314";
Extent = "403 71";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Row1previews";
canSaveDynamicFields = "1";
firstVisible = "0";
lastVisible = "1";
TypeBool locked = "defaultValue";
new GuiBitmapButtonTextCtrl() {
bitmap = "../../Pictures/VR/HumanHead.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "140 76";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "BackGround.previewSelected(BackGround->Row1previews->HumanHead);";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "HumanHead";
canSaveDynamicFields = "1";
TypeBool locked = "false";
};
new GuiBitmapButtonCtrl() {
bitmap = "../../Pictures/VR/mystery_profile.jpg";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "143 0";
Extent = "140 76";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "BackGround.previewSelected(BackGround->Row1previews->Row1preview2);";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "Row1preview1";
canSaveDynamicFields = "1";
};
};
new GuiClockHud() {
showFill = "1";
showFrame = "1";
fillColor = "0.0156863 0.0156863 0.0156863 0.5";
frameColor = "0.909804 0.968628 0.909804 1";
textColor = "0.94902 0.980392 0.94902 1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "top";
position = "480 8";
Extent = "64 64";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
new GuiBitmapButtonTextCtrl(AndroidHeadUWF) {
bitmap = "../../Pictures/VR/AndriodHeadUWF.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "371 410";
Extent = "118 73";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonTextCtrl(UndeadHead) {
bitmap = "../../Pictures/VR/UndeadHead.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "449 508";
Extent = "122 72";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonTextCtrl(AndroidHeadOWF) {
bitmap = "../../Pictures/VR/AndriodHeadOWF.png";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "521 409";
Extent = "120 74";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
//--- OBJECT WRITE END ---
About the author
I am currently a student at MATC for Computer Simulation and Gaming. I am also working with ForeverInteractive developing games.