-
ScriptUI : How can I include “About UI” Pop-up into available Script UI Panel?
Hi, I’m new to AE scripting and Javascript.
I’ve created a script for after effects by learning specific things on internet. I’m about to release my script. But I just want to add an About button to my script. I mean when I click About button it should open the About UI. I’ve achieved it in noob way. It doesn’t works as other scripts and as per my expectation. The about windows opens multiple times as I click the about button multi times…
But I want it like other script alike. When about Panel opens the main UI shouldn’t be accessible.
I used Panel Method to create the Script.I don’t want to change the method to another style of UI designing. So please let me know how to insert about popup in this method. (Sorry if the term Panel Method is wrong. I’m in an understanding that UI models methods are Panel and Palette Mothod Correct me if I’m wrong..)
Okay back into my question. Here’s the short version of my UI alone :
////I have my entire script UI designed like below..../// I want to insert the newPanel() UI when I press About button on first UI.
(function (thisObj) {
scriptBuildUI (thisObj);
function scriptBuildUI (thisObj) {
var win = thisObj instanceof Panel
? thisObj
: new Window ('palette', 'Keyframe Font Dropdown V1.0', undefined);
win.spacing = 5;var panelOne = win.add ('group', undefined, 'panelOne');
var aboutButton = panelOne.add ('button', undefined, 'About');
aboutButton.size = [200, 50];
aboutButton.onClick = function () {
newPanel ();
};win instanceof Window
? (win.center (), win.show ())
: (win.layout.layout (true), win.layout.resize ());
}
}) (this);///Here's the New about UI
function newPanel () {
var aboutWindow = new Window ('palette', 'ABOUT PANEL', undefined);
var group = aboutWindow.add ('group', undefined, 'group');
var close = group.add ('button', undefined, 'CLOSE');close.onClick = function () {
aboutWindow.close();};
aboutWindow.show ();
}==================================================================================================
Thanks in Advance…– Adirai Maji