From 994772be8d57e53df80e6515be72f0d0e113d106 Mon Sep 17 00:00:00 2001 From: yorch Date: Wed, 18 Mar 2015 17:48:04 -0700 Subject: [PATCH] Re-enabled the createUI function for tools to be able to create their own independent windows --- yScripts/y_setStructure.jsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/yScripts/y_setStructure.jsx b/yScripts/y_setStructure.jsx index 36dd66a..839ef7d 100755 --- a/yScripts/y_setStructure.jsx +++ b/yScripts/y_setStructure.jsx @@ -14,6 +14,10 @@ function YSetProjectTool() buttonHeight : 30, buttonWidth : 126 }; + this.resources = + { + icon : new File('yNet.png'), + }; this.init = function init() { //alert("my name is:" + this.info.name); @@ -35,6 +39,7 @@ function YSetProjectTool() alignment:['center','bottom'],\ icon: Image \ {\ + icon:'" + this.resources.icon.path + '/' + this.resources.icon.name + "',\ preferredSize: [15, 18]\ },\ website: StaticText\ @@ -45,6 +50,11 @@ function YSetProjectTool() }\ }"; } + this.createUI = function createUI() + { + this.window = new Window ( this.res ); + this.window.show() ; + } this.ySetProject = function ySetProject() { //alert("is this working"); @@ -99,17 +109,11 @@ function YSetProjectTool() return this; } -function build_ySetProject_data_UI() -{ - ySetProject_data.window = new Window ( ySetProject_data.res ); - ySetProject_data.window.show(); -} - //CHECKS that the toolbox exists, and if it doesn´t it runs the script on its own. if (typeof(YTB)=='undefined') { - ySetProject_data = new YSetProjectTool(); - ySetProject_data.activate(); + ySetProjectTool = new YSetProjectTool(); + ySetProjectTool.activate(); } else {