update setZoneBox interface
This commit is contained in:
@ -187,7 +187,7 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal)
|
||||
if(%client.ndMultiSelect) {
|
||||
if(%obj.getDatablock().isLogicRom) {
|
||||
%box = ndGetBoxFromRom(%obj);
|
||||
} else if (isObject(%obj.physicalZone)) {
|
||||
} else if(%obj.zoneBoxPointL !$= "") {
|
||||
%box = ndGetBoxFromZone(%obj);
|
||||
%client.ndSelectionBox.zoneBrick = %obj;
|
||||
%client.ndSelectionBox.setZoneColors();
|
||||
@ -235,12 +235,12 @@ function ndGetBoxFromRom(%b) {
|
||||
}
|
||||
|
||||
function ndGetBoxFromZone(%b) {
|
||||
%z = %b.physicalZone;
|
||||
%pos = %z.position;
|
||||
%scale = %z.getScale();
|
||||
%bl = vectorAdd(%pos, 0 SPC -%getWord(%scale,1) SPC 0);
|
||||
%bh = vectorAdd(%pos, getWord(%scale,0) SPC 0 SPC getWord(%scale,2));
|
||||
return ndSnapBoxToGrid(%bl SPC %bh);
|
||||
//%z = %b.physicalZone;
|
||||
//%pos = %z.position;
|
||||
//%scale = %z.getScale();
|
||||
//%bl = vectorAdd(%pos, 0 SPC -%getWord(%scale,1) SPC 0);
|
||||
//%bh = vectorAdd(%pos, getWord(%scale,0) SPC 0 SPC getWord(%scale,2));
|
||||
return ndSnapBoxToGrid(%b.zoneBoxPointL SPC %b.zoneBoxPointH);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user