Add editor drag handle to extend tunnel support decoration

install-platforms
Sven Eberhardt 2017-05-10 18:42:11 -04:00
parent 041e562542
commit 9abf0d156e
1 changed files with 16 additions and 0 deletions

View File

@ -37,6 +37,22 @@ public func SaveScenarioObject(props)
return true;
}
private func GetExtensionPoint() { return [0, -10 - extension*60/100]; }
private func SetExtensionPoint(pt) { Extend((-10 - pt[1]) * 100/60); }
public func Definition(def)
{
// Drag handle for extension
if (!def.EditorProps) def.EditorProps = {};
def.EditorProps.extension_point = {
Type="point",
Relative=true,
HorizontalFix=true,
AsyncGet="GetExtensionPoint",
Set="SetExtensionPoint",
Color=0xffff00 };
}
/*-- Properties --*/
local Name = "$Name$";