// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // Display a window for directing users to web tutorials global proc webTutorialNotify( string $tutorialUrl, string $notesNode, string $extraInfo ) { int $wid = 420; int $hasUrl = size( $tutorialUrl ) > 0; int $hasNotes = size( $notesNode ) > 0; int $hasExtra = size( $extraInfo ) > 0; if( !$hasNotes && !$hasExtra ){ $wid = 280; } int $textWid = $wid - 20; int $height = 80 + $hasUrl * 50 + $hasNotes * 50 + $hasExtra * 40; string $winTitle = (uiRes("m_webTutorialNotify.kTutorialInfo")); string $win = `window -title $winTitle`; string $webString = (uiRes("m_webTutorialNotify.kWebString")); string $notesString = (uiRes("m_webTutorialNotify.kNotesString")); columnLayout -co "left" 20 -columnWidth 800; if( $hasUrl ){ text -width $textWid -align "left" -l ("\n\n" + $webString); button -width 200 -l (uiRes("m_webTutorialNotify.kWebTutorial")) -c ("showHelp -a \"" + $tutorialUrl + "\""); } if( $hasNotes ){ text -width $textWid -align "left" -l ("\n\n"+ $notesString + " \"" + $notesNode + "\"."); button -width 200 -l (uiRes("m_webTutorialNotify.kAttrEdNotes")) -c ("showEditorExact " + $notesNode); } if( $hasExtra ){ text -width $textWid -align "left" -l ("\n\n"+$extraInfo); } window -e -wh $wid $height $win; showWindow $win; }