mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
Re-adds some bits from the old templates that were missed when doing the BaseGame template.
This commit is contained in:
parent
9c7b5eec73
commit
ea595143e8
25 changed files with 3278 additions and 381 deletions
293
Templates/BaseGame/game/data/ui/scripts/guis/FileDialog.gui
Normal file
293
Templates/BaseGame/game/data/ui/scripts/guis/FileDialog.gui
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(PlatformFileDialog) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
text = "";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
canCollapse = "0";
|
||||
closeCommand = "PlatformFileDialog.cancel();";
|
||||
edgeSnap = "1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "135 113";
|
||||
extent = "727 623";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiWindowProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "window";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiControl() {
|
||||
position = "2 16";
|
||||
extent = "717 37";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "tools/gui/images/folderUp";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
groupNum = "0";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "9 9";
|
||||
extent = "20 19";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "PlatformFileDialog.navigateUp();";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "folderUpButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiPopUpMenuCtrl() {
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "36 9";
|
||||
extent = "666 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiPopUpMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "PopupMenu";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOff";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "1";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
docking = "None";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "0";
|
||||
anchorBottom = "1";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "7 64";
|
||||
extent = "712 509";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiDynamicCtrlArrayControl() {
|
||||
colCount = "1";
|
||||
colSize = "64";
|
||||
rowCount = "1";
|
||||
rowSize = "258";
|
||||
rowSpacing = "4";
|
||||
colSpacing = "4";
|
||||
frozen = "0";
|
||||
autoCellSize = "1";
|
||||
fillRowFirst = "0";
|
||||
dynamicSize = "1";
|
||||
padding = "0 0 0 0";
|
||||
position = "1 1";
|
||||
extent = "666 507";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "ToolsGuiTransparentProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "itemArray";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiContainer() {
|
||||
docking = "Bottom";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "0";
|
||||
anchorBottom = "1";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "1";
|
||||
position = "1 583";
|
||||
extent = "725 37";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "File Name";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "10 -1";
|
||||
extent = "51 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "58 5";
|
||||
extent = "561 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "fileNameEdit";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiContainer() {
|
||||
docking = "Right";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "0";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "0";
|
||||
anchorRight = "0";
|
||||
position = "630 0";
|
||||
extent = "95 37";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "6 1";
|
||||
extent = "81 24";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "Button";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(IODropdownDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
new GuiWindowCtrl(IODropdownFrame) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "272 77";
|
||||
extent = "256 117";
|
||||
minExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
text = "";
|
||||
closeCommand="IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);";
|
||||
|
||||
new GuiMLTextCtrl(IODropdownText) {
|
||||
text = "";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "9 26";
|
||||
extent = "237 16";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBorderCtrl() {
|
||||
isContainer = "0";
|
||||
profile = "GuiGroupBorderProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "7 51";
|
||||
extent = "243 28";
|
||||
minExtent = "0 0";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl(IOInputText) {
|
||||
text = "Decal Datablock";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 5";
|
||||
extent = "105 18";
|
||||
minExtent = "8 2";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(IODropdownMenu) {
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiPopUpMenuProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "115 5";
|
||||
extent = "122 18";
|
||||
minExtent = "8 2";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "top";
|
||||
position = "7 85";
|
||||
extent = "156 24";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
accelerator = "return";
|
||||
command = "IOCallback(IODropdownDlg,IODropdownDlg.callback);";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "top";
|
||||
position = "170 85";
|
||||
extent = "80 24";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
accelerator = "escape";
|
||||
command = "IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
192
Templates/BaseGame/game/data/ui/scripts/guis/guiMusicPlayer.gui
Normal file
192
Templates/BaseGame/game/data/ui/scripts/guis/guiMusicPlayer.gui
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(GuiMusicPlayer) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "1";
|
||||
superClass = "GuiMusicPlayerClass";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
EdgeSnap = "1";
|
||||
text = "Torque Music Player";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "29 35";
|
||||
Extent = "518 377";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
closeCommand = "toggleMusicPlayer();";
|
||||
|
||||
new GuiCheckBoxCtrl(GuiMusicPlayerFadeCheckBox) {
|
||||
useInactiveState = "0";
|
||||
text = "Fade";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "457 347";
|
||||
Extent = "53 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(GuiMusicPlayerLoopCheckBox) {
|
||||
useInactiveState = "0";
|
||||
text = "Loop";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "457 330";
|
||||
Extent = "44 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiScrollProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "9 31";
|
||||
Extent = "500 298";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiListBoxCtrl(GuiMusicPlayerMusicList) {
|
||||
AllowMultipleSelections = "1";
|
||||
fitParentWidth = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiListBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "1 1";
|
||||
Extent = "485 2";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
superClass = "GuiMusicPlayerMusicListClass";
|
||||
};
|
||||
};
|
||||
new GuiSliderCtrl(GuiMusicPlayerScrubber) {
|
||||
range = "0 1";
|
||||
ticks = "10";
|
||||
value = "0";
|
||||
snap = "false";
|
||||
isContainer = "0";
|
||||
Profile = "GuiSliderProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "114 343";
|
||||
Extent = "331 23";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "$thisControl.onDragComplete();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "GuiMusicPlayerScrubberClass";
|
||||
className = "GuiMusicPlayerScrubberClass";
|
||||
};
|
||||
new GuiButtonCtrl(GuiMusicPlayerStopButton) {
|
||||
text = "Stop";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "57 338";
|
||||
Extent = "40 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "GuiMusicPlayer.stop();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(GuiMusicPlayerPlayButton) {
|
||||
text = "Play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "13 338";
|
||||
Extent = "40 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "GuiMusicPlayer.play();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -322,340 +322,3 @@
|
|||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
$MetricsParamArray[0] = "fps ";
|
||||
$MetricsParamArray[1] = "shadow ";
|
||||
$MetricsParamArray[2] = "gfx ";
|
||||
$MetricsParamArray[3] = "sfx ";
|
||||
$MetricsParamArray[4] = "terrain ";
|
||||
$MetricsParamArray[5] = "groundcover ";
|
||||
$MetricsParamArray[6] = "forest ";
|
||||
$MetricsParamArray[7] = "net ";
|
||||
$EnableProfiler = false;
|
||||
$string = ""; //string used to collet the parameters for metrics function
|
||||
|
||||
function showMetrics(%var)
|
||||
{
|
||||
$string = "";
|
||||
if(ppShowFps.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[0];
|
||||
}
|
||||
if(ppShowShadow.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[1];
|
||||
}
|
||||
if(ppShowGfx.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[2];
|
||||
}
|
||||
if(ppShowSfx.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[3];
|
||||
}
|
||||
if(ppShowTerrain.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[4];
|
||||
}
|
||||
if(ppShowForest.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[5];
|
||||
}
|
||||
if(ppShowGroundcover.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[6];
|
||||
}
|
||||
if(ppShowNet.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[7];
|
||||
}
|
||||
|
||||
if(%var)
|
||||
{
|
||||
$EnableProfiler = !($EnableProfiler);
|
||||
|
||||
if($EnableProfiler)
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
else if((false == $EnableProfiler))
|
||||
{
|
||||
metrics();
|
||||
}
|
||||
}
|
||||
else if($EnableProfiler) //will enter only when the enable/disable button was pressed
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
}
|
||||
|
||||
function showMetics(%var)
|
||||
{
|
||||
if(%var)
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
else if(true == $EnableProfiler)
|
||||
{
|
||||
$EnableProfiler = false;
|
||||
metrics();
|
||||
}
|
||||
}
|
||||
|
||||
GlobalActionMap.bind(keyboard, "ctrl F2", showMetics);
|
||||
|
||||
%guiContent = new GuiControl(FrameOverlayGui) {
|
||||
profile = "GuiModelessDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "false";
|
||||
helpTag = "0";
|
||||
noCursor = true;
|
||||
new GuiConsoleTextCtrl(TextOverlayControl) {
|
||||
profile = "GuiConsoleTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 5";
|
||||
extent = "130 18";
|
||||
minExtent = "4 4";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
expression = "10";
|
||||
command = "Canvas.popDialog(FrameOverlayGui);";
|
||||
accelerator = "escape";
|
||||
};
|
||||
};
|
||||
|
||||
// Note: To implement your own metrics overlay
|
||||
// just add a function with a name in the form
|
||||
// XXXXMetricsCallback which can be enabled via
|
||||
// metrics( XXXX )
|
||||
|
||||
function fpsMetricsCallback()
|
||||
{
|
||||
return " | FPS |" @
|
||||
" " @ $fps::real @
|
||||
" max: " @ $fps::realMax @
|
||||
" min: " @ $fps::realMin @
|
||||
" mspf: " @ 1000 / $fps::real;
|
||||
}
|
||||
|
||||
function gfxMetricsCallback()
|
||||
{
|
||||
return " | GFX |" @
|
||||
" PolyCount: " @ $GFXDeviceStatistics::polyCount @
|
||||
" DrawCalls: " @ $GFXDeviceStatistics::drawCalls @
|
||||
" RTChanges: " @ $GFXDeviceStatistics::renderTargetChanges;
|
||||
|
||||
}
|
||||
|
||||
function terrainMetricsCallback()
|
||||
{
|
||||
return " | Terrain |" @
|
||||
" Cells: " @ $TerrainBlock::cellsRendered @
|
||||
" Override Cells: " @ $TerrainBlock::overrideCells @
|
||||
" DrawCalls: " @ $TerrainBlock::drawCalls;
|
||||
}
|
||||
|
||||
function netMetricsCallback()
|
||||
{
|
||||
return " | Net |" @
|
||||
" BitsSent: " @ $Stats::netBitsSent @
|
||||
" BitsRcvd: " @ $Stats::netBitsReceived @
|
||||
" GhostUpd: " @ $Stats::netGhostUpdates;
|
||||
}
|
||||
|
||||
function groundCoverMetricsCallback()
|
||||
{
|
||||
return " | GroundCover |" @
|
||||
" Cells: " @ $GroundCover::renderedCells @
|
||||
" Billboards: " @ $GroundCover::renderedBillboards @
|
||||
" Batches: " @ $GroundCover::renderedBatches @
|
||||
" Shapes: " @ $GroundCover::renderedShapes;
|
||||
}
|
||||
|
||||
function forestMetricsCallback()
|
||||
{
|
||||
return " | Forest |" @
|
||||
" Cells: " @ $Forest::totalCells @
|
||||
" Cells Meshed: " @ $Forest::cellsRendered @
|
||||
" Cells Billboarded: " @ $Forest::cellsBatched @
|
||||
" Meshes: " @ $Forest::cellItemsRendered @
|
||||
" Billboards: " @ $Forest::cellItemsBatched;
|
||||
}
|
||||
|
||||
function sfxMetricsCallback()
|
||||
{
|
||||
return " | SFX |" @
|
||||
" Sounds: " @ $SFX::numSounds @
|
||||
" Lists: " @ ( $SFX::numSources - $SFX::numSounds - $SFX::Device::fmodNumEventSource ) @
|
||||
" Events: " @ $SFX::fmodNumEventSources @
|
||||
" Playing: " @ $SFX::numPlaying @
|
||||
" Culled: " @ $SFX::numCulled @
|
||||
" Voices: " @ $SFX::numVoices @
|
||||
" Buffers: " @ $SFX::Device::numBuffers @
|
||||
" Memory: " @ ( $SFX::Device::numBufferBytes / 1024.0 / 1024.0 ) @ " MB" @
|
||||
" Time/S: " @ $SFX::sourceUpdateTime @
|
||||
" Time/P: " @ $SFX::parameterUpdateTime @
|
||||
" Time/A: " @ $SFX::ambientUpdateTime;
|
||||
}
|
||||
|
||||
function sfxSourcesMetricsCallback()
|
||||
{
|
||||
return sfxDumpSourcesToString();
|
||||
}
|
||||
|
||||
function sfxStatesMetricsCallback()
|
||||
{
|
||||
return " | SFXStates |" @ sfxGetActiveStates();
|
||||
}
|
||||
|
||||
function timeMetricsCallback()
|
||||
{
|
||||
return " | Time |" @
|
||||
" Sim Time: " @ getSimTime() @
|
||||
" Mod: " @ getSimTime() % 32;
|
||||
}
|
||||
|
||||
function reflectMetricsCallback()
|
||||
{
|
||||
return " | REFLECT |" @
|
||||
" Objects: " @ $Reflect::numObjects @
|
||||
" Visible: " @ $Reflect::numVisible @
|
||||
" Occluded: " @ $Reflect::numOccluded @
|
||||
" Updated: " @ $Reflect::numUpdated @
|
||||
" Elapsed: " @ $Reflect::elapsed NL
|
||||
|
||||
" Allocated: " @ $Reflect::renderTargetsAllocated @
|
||||
" Pooled: " @ $Reflect::poolSize NL
|
||||
|
||||
" " @ getWord( $Reflect::textureStats, 1 ) TAB
|
||||
" " @ getWord( $Reflect::textureStats, 2 ) @ "MB" TAB
|
||||
" " @ getWord( $Reflect::textureStats, 0 );
|
||||
}
|
||||
|
||||
function decalMetricsCallback()
|
||||
{
|
||||
return " | DECAL |" @
|
||||
" Batches: " @ $Decal::Batches @
|
||||
" Buffers: " @ $Decal::Buffers @
|
||||
" DecalsRendered: " @ $Decal::DecalsRendered;
|
||||
}
|
||||
|
||||
function renderMetricsCallback()
|
||||
{
|
||||
return " | Render |" @
|
||||
" Mesh: " @ $RenderMetrics::RIT_Mesh @
|
||||
" MeshDL: " @ $RenderMetrics::RIT_MeshDynamicLighting @
|
||||
" Shadow: " @ $RenderMetrics::RIT_Shadow @
|
||||
" Sky: " @ $RenderMetrics::RIT_Sky @
|
||||
" Obj: " @ $RenderMetrics::RIT_Object @
|
||||
" ObjT: " @ $RenderMetrics::RIT_ObjectTranslucent @
|
||||
" Decal: " @ $RenderMetrics::RIT_Decal @
|
||||
" Water: " @ $RenderMetrics::RIT_Water @
|
||||
" Foliage: " @ $RenderMetrics::RIT_Foliage @
|
||||
" Trans: " @ $RenderMetris::RIT_Translucent @
|
||||
" Custom: " @ $RenderMetrics::RIT_Custom;
|
||||
}
|
||||
|
||||
function shadowMetricsCallback()
|
||||
{
|
||||
return " | Shadow |" @
|
||||
" Active: " @ $ShadowStats::activeMaps @
|
||||
" Updated: " @ $ShadowStats::updatedMaps @
|
||||
" PolyCount: " @ $ShadowStats::polyCount @
|
||||
" DrawCalls: " @ $ShadowStats::drawCalls @
|
||||
" RTChanges: " @ $ShadowStats::rtChanges @
|
||||
" PoolTexCount: " @ $ShadowStats::poolTexCount @
|
||||
" PoolTexMB: " @ $ShadowStats::poolTexMemory @ "MB";
|
||||
}
|
||||
|
||||
function basicShadowMetricsCallback()
|
||||
{
|
||||
return " | Shadow |" @
|
||||
" Active: " @ $BasicLightManagerStats::activePlugins @
|
||||
" Updated: " @ $BasicLightManagerStats::shadowsUpdated @
|
||||
" Elapsed Ms: " @ $BasicLightManagerStats::elapsedUpdateMs;
|
||||
}
|
||||
|
||||
function lightMetricsCallback()
|
||||
{
|
||||
return " | Deferred Lights |" @
|
||||
" Active: " @ $lightMetrics::activeLights @
|
||||
" Culled: " @ $lightMetrics::culledLights;
|
||||
}
|
||||
|
||||
function particleMetricsCallback()
|
||||
{
|
||||
return " | Particles |" @
|
||||
" # Simulated " @ $particle::numSimulated;
|
||||
}
|
||||
function partMetricsCallback()
|
||||
{
|
||||
return particleMetricsCallback();
|
||||
}
|
||||
|
||||
|
||||
// alias
|
||||
function audioMetricsCallback()
|
||||
{
|
||||
return sfxMetricsCallback();
|
||||
}
|
||||
|
||||
// alias
|
||||
function videoMetricsCallback()
|
||||
{
|
||||
return gfxMetricsCallback();
|
||||
}
|
||||
|
||||
// Add a metrics HUD. %expr can be a vector of names where each element
|
||||
// must have a corresponding '<name>MetricsCallback()' function defined
|
||||
// that will be called on each update of the GUI control. The results
|
||||
// of each function are stringed together.
|
||||
//
|
||||
// Example: metrics( "fps gfx" );
|
||||
|
||||
function metrics( %expr )
|
||||
{
|
||||
%metricsExpr = "";
|
||||
if( %expr !$= "" )
|
||||
{
|
||||
for( %i = 0;; %i ++ )
|
||||
{
|
||||
%name = getWord( %expr, %i );
|
||||
if( %name $= "" )
|
||||
break;
|
||||
else
|
||||
{
|
||||
%cb = %name @ "MetricsCallback";
|
||||
if( !isFunction( %cb ) )
|
||||
error( "metrics - undefined callback: " @ %cb );
|
||||
else
|
||||
{
|
||||
%cb = %cb @ "()";
|
||||
if( %i > 0 )
|
||||
%metricsExpr = %metricsExpr @ " NL ";
|
||||
%metricsExpr = %metricsExpr @ %cb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( %metricsExpr !$= "" )
|
||||
%metricsExpr = %metricsExpr @ " @ \" \"";
|
||||
}
|
||||
|
||||
if( %metricsExpr !$= "" )
|
||||
{
|
||||
$GameCanvas.pushDialog( FrameOverlayGui, 1000 );
|
||||
TextOverlayControl.setValue( %metricsExpr );
|
||||
}
|
||||
else
|
||||
$GameCanvas.popDialog(FrameOverlayGui);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue