add new zone box visuals,
This commit is contained in:
@ -55,11 +55,27 @@ function ND_SelectionBox::onRemove(%this)
|
||||
%this.border_y[%i].delete();
|
||||
%this.border_z[%i].delete();
|
||||
}
|
||||
|
||||
ndShapelineConnectBoxes_delete(%this);
|
||||
}
|
||||
|
||||
//Set normal color values and borders
|
||||
function ND_SelectionBox::setNormalMode(%this)
|
||||
{
|
||||
function ND_SelectionBox::setZoneColors(%this) {
|
||||
%this.innerColor = "0 0 0 0.60";
|
||||
%this.outerColor = "0 0 0 0.35";
|
||||
|
||||
%this.borderColor = "1 0.7 0.5 0.99";
|
||||
%this.borderColorSelected = "0.7 0 1 0.99";
|
||||
|
||||
%this.cornerColor1 = "0.8 0.74 0.5 0.99";
|
||||
%this.cornerColor2 = "1 0.94 0.5 0.99";
|
||||
|
||||
%this.cornerColorSelected1 = "0.7 0.2 1 0.99";
|
||||
%this.cornerColorSelected2 = "0.7 0.1 1 0.99";
|
||||
|
||||
%this.applyColors();
|
||||
}
|
||||
|
||||
function ND_SelectionBox::setNormalColors(%this) {
|
||||
%this.innerColor = "0 0 0 0.60";
|
||||
%this.outerColor = "0 0 0 0.35";
|
||||
|
||||
@ -71,7 +87,13 @@ function ND_SelectionBox::setNormalMode(%this)
|
||||
|
||||
%this.cornerColorSelected1 = "0 0.2 1 0.99";
|
||||
%this.cornerColorSelected2 = "0 0.1 0.9 0.99";
|
||||
|
||||
%this.applyColors();
|
||||
}
|
||||
|
||||
//Set normal color values and borders
|
||||
function ND_SelectionBox::setNormalMode(%this)
|
||||
{
|
||||
%this.isNormalMode = true;
|
||||
|
||||
//Unhide the corners and inner/outer box (hidden in disabled mode)
|
||||
@ -83,7 +105,7 @@ function ND_SelectionBox::setNormalMode(%this)
|
||||
%this.outerBox.unHideNode("ALL");
|
||||
|
||||
//Apply changes
|
||||
%this.applyColors();
|
||||
%this.setNormalColors();
|
||||
%this.setSize(%this.point1, %this.point2);
|
||||
%this.shapeName.setShapeName(%this.boxName);
|
||||
}
|
||||
@ -307,6 +329,16 @@ function ND_SelectionBox::setSize(%this, %point1, %point2)
|
||||
%this.border_z[%i].setScale(%width SPC %width SPC %len_z + %width * 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw lines from zone brick to zone if present
|
||||
if(isObject(%this.zoneBrick)) {
|
||||
ndShapelineConnectBoxes_create(%this, "1 0.7 0.5 0.3");
|
||||
ndShapelineConnectBoxes_move(%this,
|
||||
%this.zoneBrick.getWorldBox(),
|
||||
%this.point1 SPC %this.point2);
|
||||
} else {
|
||||
ndShapelineConnectBoxes_delete(%this);
|
||||
}
|
||||
}
|
||||
|
||||
//Resize the selection box and align it to a player
|
||||
|
Reference in New Issue
Block a user