mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 22:05:40 +00:00
Implementation of guiRenderTargetVizCtrl
This commit is contained in:
parent
76c5e30869
commit
dca2dc0074
8 changed files with 339 additions and 3 deletions
|
|
@ -0,0 +1,33 @@
|
|||
function ToggleRenderTargetVisualizer()
|
||||
{
|
||||
if(RenderTargetVisualizer.isAwake())
|
||||
{
|
||||
Canvas.popDialog(RenderTargetVisualizer);
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.pushDialog(RenderTargetVisualizer);
|
||||
}
|
||||
}
|
||||
|
||||
function RenderTargetVisualizer::onWake(%this)
|
||||
{
|
||||
%targetsList = getNamedTargetList();
|
||||
|
||||
%targetsCount = getWordCount(%targetsList);
|
||||
for(%i=0; %i < %targetsCount; %i++)
|
||||
{
|
||||
%targetName = getWord(%targetsList, %i);
|
||||
RenderTargetsList.add(%targetName, %i);
|
||||
}
|
||||
|
||||
RenderTargetsList.setSelected( 0, false );
|
||||
RenderTargetVizCtrl.RenderTargetName = RenderTargetsList.getValue();
|
||||
}
|
||||
|
||||
function RenderTargetsList::updateTarget(%this)
|
||||
{
|
||||
%target = RenderTargetsList.getValue();
|
||||
|
||||
RenderTargetVizCtrl.RenderTargetName = %target;
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(RenderTargetVisualizer) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiModelessDialogProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiWindowCtrl(RenderTargetVizWindow) {
|
||||
text = "Render Target Visualizer";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
canCollapse = "0";
|
||||
closeCommand = "Canvas.popDialog(RenderTargetVisualizer);";
|
||||
edgeSnap = "1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "189 96";
|
||||
extent = "637 535";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiWindowProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiRenderTargetVizCtrl(RenderTargetVizCtrl) {
|
||||
position = "0 38";
|
||||
extent = "636 496";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
RenderTargetName = "AL_FormatToken";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(RenderTargetsList) {
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
text = "AL_FormatToken";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 20";
|
||||
extent = "636 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiPopUpMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "RenderTargetsList.updateTarget();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
Loading…
Add table
Add a link
Reference in a new issue