Revert changes to uses of setExtent.

This reverts part of commit 9907c4592e.
This commit is contained in:
Daniel Buckmaster 2014-12-23 20:59:08 +11:00
parent 3ab048c5b0
commit 57cbc4d375
14 changed files with 42 additions and 53 deletions

View file

@ -112,7 +112,7 @@ function FormControlClass::onWake( %this )
%parentId = %this.getParent(); %parentId = %this.getParent();
%extent = %parentID.getExtent(); %extent = %parentID.getExtent();
%this.setExtent( GetWord(%extent, 0) @ " " @ GetWord(%extent, 1) ); %this.setExtent( GetWord(%extent, 0), GetWord(%extent, 1) );
GuiFormClass::BuildFormMenu( %this ); GuiFormClass::BuildFormMenu( %this );

View file

@ -284,7 +284,7 @@ function GuiFormManager::ActivateLayout( %library, %layoutName, %parent )
// Size to fit parent container. // Size to fit parent container.
%extent = %parent.getExtent(); %extent = %parent.getExtent();
%layoutObj.setExtent( GetWord(%extent, 0) @ " " @ GetWord(%extent, 1) ); %layoutObj.setExtent( GetWord(%extent, 0), GetWord(%extent, 1) );
// Add to parent. // Add to parent.
%parent.add( %layoutObj ); %parent.add( %layoutObj );

View file

@ -154,15 +154,15 @@ function GuiEditCanvas::onCreateMenu(%this)
barTitle = "Move"; barTitle = "Move";
internalName = "MoveMenu"; internalName = "MoveMenu";
item[0] = "Nudge Left" TAB "Left" TAB "GuiEditor.tmoveSelection( -1, 0);"; item[0] = "Nudge Left" TAB "Left" TAB "GuiEditor.moveSelection( -1, 0);";
item[1] = "Nudge Right" TAB "Right" TAB "GuiEditor.tmoveSelection( 1, 0);"; item[1] = "Nudge Right" TAB "Right" TAB "GuiEditor.moveSelection( 1, 0);";
item[2] = "Nudge Up" TAB "Up" TAB "GuiEditor.tmoveSelection( 0, -1);"; item[2] = "Nudge Up" TAB "Up" TAB "GuiEditor.moveSelection( 0, -1);";
item[3] = "Nudge Down" TAB "Down" TAB "GuiEditor.tmoveSelection( 0, 1 );"; item[3] = "Nudge Down" TAB "Down" TAB "GuiEditor.moveSelection( 0, 1 );";
item[4] = "-"; item[4] = "-";
item[5] = "Big Nudge Left" TAB "Shift Left" TAB "GuiEditor.tmoveSelection( - GuiEditor.snap2gridsize, 0 );"; item[5] = "Big Nudge Left" TAB "Shift Left" TAB "GuiEditor.moveSelection( - GuiEditor.snap2gridsize, 0 );";
item[6] = "Big Nudge Right" TAB "Shift Right" TAB "GuiEditor.tmoveSelection( GuiEditor.snap2gridsize, 0 );"; item[6] = "Big Nudge Right" TAB "Shift Right" TAB "GuiEditor.moveSelection( GuiEditor.snap2gridsize, 0 );";
item[7] = "Big Nudge Up" TAB "Shift Up" TAB "GuiEditor.tmoveSelection( 0, - GuiEditor.snap2gridsize );"; item[7] = "Big Nudge Up" TAB "Shift Up" TAB "GuiEditor.moveSelection( 0, - GuiEditor.snap2gridsize );";
item[8] = "Big Nudge Down" TAB "Shift Down" TAB "GuiEditor.tmoveSelection( 0, GuiEditor.snap2gridsize );"; item[8] = "Big Nudge Down" TAB "Shift Down" TAB "GuiEditor.moveSelection( 0, GuiEditor.snap2gridsize );";
}; };
new PopupMenu() new PopupMenu()
@ -201,11 +201,6 @@ function GuiEditCanvas::onCreateMenu(%this)
%this.menuBar.attachToCanvas( Canvas, 0 ); %this.menuBar.attachToCanvas( Canvas, 0 );
} }
function GuiEditor::tMoveSelection (%x, %y)
{
GuiEditor.moveSelection(%x @ " " @ %y);
}
$GUI_EDITOR_MENU_EDGESNAP_INDEX = 0; $GUI_EDITOR_MENU_EDGESNAP_INDEX = 0;
$GUI_EDITOR_MENU_CENTERSNAP_INDEX = 1; $GUI_EDITOR_MENU_CENTERSNAP_INDEX = 1;
$GUI_EDITOR_MENU_GUIDESNAP_INDEX = 3; $GUI_EDITOR_MENU_GUIDESNAP_INDEX = 3;

View file

@ -92,7 +92,7 @@ function GuiEditorGroup::group( %this )
%y = getWord( %bounds, 1 ) - getWord( %parentGlobalPos, 1 ); %y = getWord( %bounds, 1 ) - getWord( %parentGlobalPos, 1 );
%group.setPosition( %x, %y ); %group.setPosition( %x, %y );
%group.setExtent( getWord( %bounds, 2 ) @ " " @ getWord( %bounds, 3 ) ); %group.setExtent( getWord( %bounds, 2 ), getWord( %bounds, 3 ) );
// Reparent all objects to group. // Reparent all objects to group.

View file

@ -402,4 +402,3 @@ function generateProceduralTerrainMask()
Canvas.popDialog(ProceduralTerrainPainterGui); Canvas.popDialog(ProceduralTerrainPainterGui);
ETerrainEditor.autoMaterialLayer($TPPHeightMin, $TPPHeightMax, $TPPSlopeMin, $TPPSlopeMax, $TPPCoverage); ETerrainEditor.autoMaterialLayer($TPPHeightMin, $TPPHeightMax, $TPPSlopeMin, $TPPSlopeMax, $TPPCoverage);
} }

View file

@ -2350,12 +2350,12 @@ function EWToolsToolbar::reset( %this )
for( %i = 0 ; %i < %count; %i++ ) for( %i = 0 ; %i < %count; %i++ )
ToolsToolbarArray.getObject(%i).setVisible(true); ToolsToolbarArray.getObject(%i).setVisible(true);
%this.setExtent(((29 + 4) * %count + 12) @ " 33"); %this.setExtent((29 + 4) * %count + 12, 33);
%this.isClosed = 0; %this.isClosed = 0;
EWToolsToolbar.isDynamic = 0; EWToolsToolbar.isDynamic = 0;
EWToolsToolbarDecoy.setVisible(false); EWToolsToolbarDecoy.setVisible(false);
EWToolsToolbarDecoy.setExtent(((29 + 4) * %count + 4) @ " 31"); EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 31);
%this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" ); %this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" );
} }
@ -2376,7 +2376,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
ToolsToolbarArray.getObject(%i).setVisible(false); ToolsToolbarArray.getObject(%i).setVisible(false);
} }
%this.setExtent("43 33"); %this.setExtent(43, 33);
%this.isClosed = 1; %this.isClosed = 1;
if(!%useDynamics) if(!%useDynamics)
@ -2385,7 +2385,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
EWToolsToolbar.isDynamic = 1; EWToolsToolbar.isDynamic = 1;
} }
EWToolsToolbarDecoy.setExtent("35 31"); EWToolsToolbarDecoy.setExtent(35, 31);
} }
else else
{ {
@ -2395,7 +2395,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
for( %i = 0 ; %i < %count; %i++ ) for( %i = 0 ; %i < %count; %i++ )
ToolsToolbarArray.getObject(%i).setVisible(true); ToolsToolbarArray.getObject(%i).setVisible(true);
%this.setExtent(((29 + 4) * %count + 12) @ " 33"); %this.setExtent((29 + 4) * %count + 12, 33);
%this.isClosed = 0; %this.isClosed = 0;
if(!%useDynamics) if(!%useDynamics)
@ -2404,7 +2404,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
EWToolsToolbar.isDynamic = 0; EWToolsToolbar.isDynamic = 0;
} }
EWToolsToolbarDecoy.setExtent(((29 + 4) * %count + 4) @ " 32"); EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 32);
} }
%this-->resizeArrow.setBitmap( %image ); %this-->resizeArrow.setBitmap( %image );

View file

@ -180,9 +180,9 @@ function MessageBoxOKCancelDetails(%title, %message, %details, %callback, %cance
%extentY = %textPosY + %textExtentY + 65; %extentY = %textPosY + %textExtentY + 65;
MBOKCancelDetailsInfoText.setExtent("285 128"); MBOKCancelDetailsInfoText.setExtent(285, 128);
MBOKCancelDetailsFrame.setExtent("300 " @ %extentY); MBOKCancelDetailsFrame.setExtent(300, %extentY);
MessageBoxOKCancelDetailsDlg.callback = %callback; MessageBoxOKCancelDetailsDlg.callback = %callback;
MessageBoxOKCancelDetailsDlg.cancelCallback = %cancelCallback; MessageBoxOKCancelDetailsDlg.cancelCallback = %cancelCallback;
@ -212,14 +212,14 @@ function MBOKCancelDetailsToggleInfoFrame()
%posY = %textPosY + %textExtentY + 10; %posY = %textPosY + %textExtentY + 10;
%posX = getWord(MBOKCancelDetailsScroll.getPosition(), 0); %posX = getWord(MBOKCancelDetailsScroll.getPosition(), 0);
MBOKCancelDetailsScroll.setPosition(%posX, %posY); MBOKCancelDetailsScroll.setPosition(%posX, %posY);
MBOKCancelDetailsScroll.setExtent(getWord(MBOKCancelDetailsScroll.getExtent(), 0) @ " " @ %verticalStretch); MBOKCancelDetailsScroll.setExtent(getWord(MBOKCancelDetailsScroll.getExtent(), 0), %verticalStretch);
MBOKCancelDetailsFrame.setExtent("300 " @ %height + %verticalStretch + 10); MBOKCancelDetailsFrame.setExtent(300, %height + %verticalStretch + 10);
} else } else
{ {
%extent = MBOKCancelDetailsFrame.defaultExtent; %extent = MBOKCancelDetailsFrame.defaultExtent;
%width = getWord(%extent, 0); %width = getWord(%extent, 0);
%height = getWord(%extent, 1); %height = getWord(%extent, 1);
MBOKCancelDetailsFrame.setExtent(%width @ " " @ %height); MBOKCancelDetailsFrame.setExtent(%width, %height);
MBOKCancelDetailsScroll.setVisible(false); MBOKCancelDetailsScroll.setVisible(false);
} }
} }

View file

@ -159,7 +159,7 @@ function MainChatHud::setChatHudLength( %this, %length )
%lengthInPixels = $outerChatLenY[%length] * %textHeight; %lengthInPixels = $outerChatLenY[%length] * %textHeight;
%chatMargin = getWord(OuterChatHud.extent, 1) - getWord(ChatScrollHud.Extent, 1) %chatMargin = getWord(OuterChatHud.extent, 1) - getWord(ChatScrollHud.Extent, 1)
+ 2 * ChatScrollHud.profile.borderThickness; + 2 * ChatScrollHud.profile.borderThickness;
OuterChatHud.setExtent(firstWord(OuterChatHud.extent) @ " " @ ( %lengthInPixels + %chatMargin)); OuterChatHud.setExtent(firstWord(OuterChatHud.extent), %lengthInPixels + %chatMargin);
ChatScrollHud.scrollToBottom(); ChatScrollHud.scrollToBottom();
ChatPageDown.setVisible(false); ChatPageDown.setVisible(false);
} }

View file

@ -181,7 +181,7 @@ function ChooseLevelDlg::onWake( %this )
%extentX = getWord(ChooseLevelWindow.getExtent(), 0); %extentX = getWord(ChooseLevelWindow.getExtent(), 0);
%extentY = getWord(ChooseLevelWindow->SmallPreviews.getPosition(), 1); %extentY = getWord(ChooseLevelWindow->SmallPreviews.getPosition(), 1);
ChooseLevelWIndow.setExtent(%extentX @ " " @ %extentY); ChooseLevelWIndow.setExtent(%extentX, %extentY);
} }
else else
{ {
@ -194,7 +194,7 @@ function ChooseLevelDlg::onWake( %this )
%extentY = %extentY + getWord(ChooseLevelWindow->SmallPreviews.getExtent(), 1); %extentY = %extentY + getWord(ChooseLevelWindow->SmallPreviews.getExtent(), 1);
%extentY = %extentY + 9; %extentY = %extentY + 9;
ChooseLevelWIndow.setExtent(%extentX @ " " @ %extentY); ChooseLevelWIndow.setExtent(%extentX, %extentY);
} }
} }

View file

@ -112,7 +112,7 @@ function FormControlClass::onWake( %this )
%parentId = %this.getParent(); %parentId = %this.getParent();
%extent = %parentID.getExtent(); %extent = %parentID.getExtent();
%this.setExtent( GetWord(%extent, 0) @ " " @ GetWord(%extent, 1) ); %this.setExtent( GetWord(%extent, 0), GetWord(%extent, 1) );
GuiFormClass::BuildFormMenu( %this ); GuiFormClass::BuildFormMenu( %this );

View file

@ -284,7 +284,7 @@ function GuiFormManager::ActivateLayout( %library, %layoutName, %parent )
// Size to fit parent container. // Size to fit parent container.
%extent = %parent.getExtent(); %extent = %parent.getExtent();
%layoutObj.setExtent( GetWord(%extent, 0) @ " " @ GetWord(%extent, 1) ); %layoutObj.setExtent( GetWord(%extent, 0), GetWord(%extent, 1) );
// Add to parent. // Add to parent.
%parent.add( %layoutObj ); %parent.add( %layoutObj );

View file

@ -154,15 +154,15 @@ function GuiEditCanvas::onCreateMenu(%this)
barTitle = "Move"; barTitle = "Move";
internalName = "MoveMenu"; internalName = "MoveMenu";
item[0] = "Nudge Left" TAB "Left" TAB "GuiEditor.tmoveSelection( -1, 0);"; item[0] = "Nudge Left" TAB "Left" TAB "GuiEditor.moveSelection( -1, 0);";
item[1] = "Nudge Right" TAB "Right" TAB "GuiEditor.tmoveSelection( 1, 0);"; item[1] = "Nudge Right" TAB "Right" TAB "GuiEditor.moveSelection( 1, 0);";
item[2] = "Nudge Up" TAB "Up" TAB "GuiEditor.tmoveSelection( 0, -1);"; item[2] = "Nudge Up" TAB "Up" TAB "GuiEditor.moveSelection( 0, -1);";
item[3] = "Nudge Down" TAB "Down" TAB "GuiEditor.tmoveSelection( 0, 1 );"; item[3] = "Nudge Down" TAB "Down" TAB "GuiEditor.moveSelection( 0, 1 );";
item[4] = "-"; item[4] = "-";
item[5] = "Big Nudge Left" TAB "Shift Left" TAB "GuiEditor.tmoveSelection( - GuiEditor.snap2gridsize, 0 );"; item[5] = "Big Nudge Left" TAB "Shift Left" TAB "GuiEditor.moveSelection( - GuiEditor.snap2gridsize, 0 );";
item[6] = "Big Nudge Right" TAB "Shift Right" TAB "GuiEditor.tmoveSelection( GuiEditor.snap2gridsize, 0 );"; item[6] = "Big Nudge Right" TAB "Shift Right" TAB "GuiEditor.moveSelection( GuiEditor.snap2gridsize, 0 );";
item[7] = "Big Nudge Up" TAB "Shift Up" TAB "GuiEditor.tmoveSelection( 0, - GuiEditor.snap2gridsize );"; item[7] = "Big Nudge Up" TAB "Shift Up" TAB "GuiEditor.moveSelection( 0, - GuiEditor.snap2gridsize );";
item[8] = "Big Nudge Down" TAB "Shift Down" TAB "GuiEditor.tmoveSelection( 0, GuiEditor.snap2gridsize );"; item[8] = "Big Nudge Down" TAB "Shift Down" TAB "GuiEditor.moveSelection( 0, GuiEditor.snap2gridsize );";
}; };
new PopupMenu() new PopupMenu()
@ -201,11 +201,6 @@ function GuiEditCanvas::onCreateMenu(%this)
%this.menuBar.attachToCanvas( Canvas, 0 ); %this.menuBar.attachToCanvas( Canvas, 0 );
} }
function GuiEditor::tMoveSelection (%x, %y)
{
GuiEditor.moveSelection(%x @ " " @ %y);
}
$GUI_EDITOR_MENU_EDGESNAP_INDEX = 0; $GUI_EDITOR_MENU_EDGESNAP_INDEX = 0;
$GUI_EDITOR_MENU_CENTERSNAP_INDEX = 1; $GUI_EDITOR_MENU_CENTERSNAP_INDEX = 1;
$GUI_EDITOR_MENU_GUIDESNAP_INDEX = 3; $GUI_EDITOR_MENU_GUIDESNAP_INDEX = 3;

View file

@ -92,7 +92,7 @@ function GuiEditorGroup::group( %this )
%y = getWord( %bounds, 1 ) - getWord( %parentGlobalPos, 1 ); %y = getWord( %bounds, 1 ) - getWord( %parentGlobalPos, 1 );
%group.setPosition( %x, %y ); %group.setPosition( %x, %y );
%group.setExtent( getWord( %bounds, 2 ) @ " " @ getWord( %bounds, 3 ) ); %group.setExtent( getWord( %bounds, 2 ), getWord( %bounds, 3 ) );
// Reparent all objects to group. // Reparent all objects to group.

View file

@ -2350,12 +2350,12 @@ function EWToolsToolbar::reset( %this )
for( %i = 0 ; %i < %count; %i++ ) for( %i = 0 ; %i < %count; %i++ )
ToolsToolbarArray.getObject(%i).setVisible(true); ToolsToolbarArray.getObject(%i).setVisible(true);
%this.setExtent(((29 + 4) * %count + 12) @ " 33"); %this.setExtent((29 + 4) * %count + 12, 33);
%this.isClosed = 0; %this.isClosed = 0;
EWToolsToolbar.isDynamic = 0; EWToolsToolbar.isDynamic = 0;
EWToolsToolbarDecoy.setVisible(false); EWToolsToolbarDecoy.setVisible(false);
EWToolsToolbarDecoy.setExtent(((29 + 4) * %count + 4) @ " 31"); EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 31);
%this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" ); %this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" );
} }
@ -2376,7 +2376,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
ToolsToolbarArray.getObject(%i).setVisible(false); ToolsToolbarArray.getObject(%i).setVisible(false);
} }
%this.setExtent("43 33"); %this.setExtent(43, 33);
%this.isClosed = 1; %this.isClosed = 1;
if(!%useDynamics) if(!%useDynamics)
@ -2385,7 +2385,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
EWToolsToolbar.isDynamic = 1; EWToolsToolbar.isDynamic = 1;
} }
EWToolsToolbarDecoy.setExtent("35 31"); EWToolsToolbarDecoy.setExtent(35, 31);
} }
else else
{ {
@ -2395,7 +2395,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
for( %i = 0 ; %i < %count; %i++ ) for( %i = 0 ; %i < %count; %i++ )
ToolsToolbarArray.getObject(%i).setVisible(true); ToolsToolbarArray.getObject(%i).setVisible(true);
%this.setExtent(((29 + 4) * %count + 12) @ " 33"); %this.setExtent((29 + 4) * %count + 12, 33);
%this.isClosed = 0; %this.isClosed = 0;
if(!%useDynamics) if(!%useDynamics)
@ -2404,7 +2404,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
EWToolsToolbar.isDynamic = 0; EWToolsToolbar.isDynamic = 0;
} }
EWToolsToolbarDecoy.setExtent(((29 + 4) * %count + 4) @ " 32"); EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 32);
} }
%this-->resizeArrow.setBitmap( %image ); %this-->resizeArrow.setBitmap( %image );