// =========================================================================== // 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. // =========================================================================== global proc updateHighlightNewFeaturesDialog( int $state ) { if (`window -exists NewFeatureHighlightWnd`) { optionVar -intValue displayNewFeatureHighlights $state; if ($state) { WhatsNewHighlightingOn; image -e -image (languageResourcePath("highlightExampleOn.png")) highlightExampleImage; } else { WhatsNewHighlightingOff; image -e -image (languageResourcePath("highlightExampleOff.png")) highlightExampleImage; } } } global proc closeHighlightNewFeaturesDialog() { evalDeferred ("if (`window -exists NewFeatureHighlightWnd`) deleteUI -window NewFeatureHighlightWnd;"); } global proc highlightNewFeaturesDialog() { if (`window -exists NewFeatureHighlightWnd`) { deleteUI -window NewFeatureHighlightWnd; } if (`windowPref -exists NewFeatureHighlightWnd`) { windowPref -remove NewFeatureHighlightWnd; } if (!`optionVar -exists displayNewFeatureHighlights`) { optionVar -intValue displayNewFeatureHighlights 1; } int $highlightWndWidth = 450; int $highlightWndHeight = 320; window -title (uiRes("m_highlightNewFeaturesDialog.kHighlightDialog")) -width $highlightWndWidth -height $highlightWndHeight -resizeToFitChildren true -minimizeButton false -maximizeButton false -sizeable false NewFeatureHighlightWnd; formLayout fullForm; int $cb1On = `optionVar -q displayNewFeatureHighlights`; int $cb2On = `optionVar -q showHighlightNewFeaturesWindowOnStartup`; string $cb1 = `checkBox -label (uiRes("m_highlightNewFeaturesDialog.kHighlightDialogCb1")) -value $cb1On -changeCommand ("updateHighlightNewFeaturesDialog(#1)")`; string $cb2 = `checkBox -label (uiRes("m_highlightNewFeaturesDialog.kHighlightDialogCb2")) -value $cb2On -changeCommand ("optionVar -intValue showHighlightNewFeaturesWindowOnStartup #1; if(#1) { WhatsNewStartupDialogOn; } else { WhatsNewStartupDialogOff; }")`; string $image = `image highlightExampleImage`; if (`optionVar -q displayNewFeatureHighlights`) { image -e -image (languageResourcePath("highlightExampleOn.png")) $image; } else { image -e -image (languageResourcePath("highlightExampleOff.png")) $image; } string $bForm = `formLayout`; string $button = `button -height 22 -width 50 -command "closeHighlightNewFeaturesDialog" -label (uiRes("m_highlightNewFeaturesDialog.kHighlightDialogOKButton"))`; formLayout -e -attachNone $cb2 top -attachForm $cb2 left 10 -attachForm $cb2 bottom 15 -attachNone $cb2 right -attachNone $cb1 top -attachForm $cb1 left 10 -attachControl $cb1 bottom 4 $cb2 -attachNone $cb1 right -attachForm $image top 20 -attachForm $image left 15 -attachNone $image bottom -attachNone $image right -attachNone $bForm top -attachForm $bForm left 200 -attachForm $bForm bottom 0 -attachForm $bForm right 0 fullForm; formLayout -e -attachNone $button top -attachNone $button left -attachForm $button bottom 15 -attachForm $button right 10 $bForm; showWindow NewFeatureHighlightWnd; };