/* Copyright (c) Microsoft Corporation. Licensed under the MIT License. */ /*****************************************************************************\ * * easels.cht * * All easels that appear in the studio * * Author: Sean Selitrennikoff * * Status: REVIEWED * \*****************************************************************************/ // // // Spletters easel // // // // Spletter easels very own glass // GOBCHUNK("Spletter Easel pane of glass", kidSpltGlass, kgokkRectHit) DEFAULT_POSITION(0, 0, 100) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, CHID(kstDefault, kchidClick), cidNil, cnoNil) ENDCHUNK REP_FILL( CHID(kstDefault, krepDefault ), "Max", 0,0, kdxpBackground, kdypBackground, Transparent, Palette( 73 )) PATTERN_50 ENDCHUNK CREATE_SCRIPT("Costume changer") CreateChildThis(kidSpltBackground, kidSpltBackground); ENDCHUNK CHILD_SCRIPT("Glass clicked", CHID(kstDefault, kchidClick)) PlaySoundGob(kidBackground, kctgWave, kwavSplot, 0, 0x10000, 1, 0, 1); ENDCHUNK // // Background // GOBCHUNK("Spletters easel background", kidSpltBackground, kgokkRectHit) DEFAULT_POSITION( kxpSpltBackground, kypSpltBackground, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e1par.bmp", kxpregSpltBackground, kypregSpltBackground ) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Spletters easel created") CreateChildThis(kidSpltPreviewFrame, kidSpltPreviewFrame); CreateChildThis(kidSpltTransmogrify, kidSpltTransmogrify); CreateChildThis(kidSpltTextures, kidSpltTextures); CreateChildThis(kidSpltFont, kidSpltFont); CreateChildThis(kidSpltShape, kidSpltShape); CreateChildThis(kidSpltRotate, kidSpltRotate); CreateChildThis(kidSpltCancel, kidSpltCancel); CreateChildThis(kidSpltOk, kidSpltOk); CreateChildThis(kidSpltEditBox, kidSpltEditBox); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp33); End; ENDCHUNK // // Preview area -- parent area for creating a brender world for viewing // the spletter. // OBJECT("Spletter easel preview Frame", kidSpltPreviewFrame, 100, kcrsArrow) REP_RECT(CHID(kstDefault, krepDefault), "Visible", kxpSpltPreviewFrameLeft, kypSpltPreviewFrameTop, kxpSpltPreviewFrameRight, kypSpltPreviewFrameBottom) // // Parent rectangle for the edit box. // OBJECT("Spletter easel edit box", kidSpltEditBox, 100, kcrsArrow) REP_RECT(CHID(kstDefault, krepDefault), "Visible", kxpSpltEditBoxLeft, kypSpltEditBoxTop, kxpSpltEditBoxRight, kypSpltEditBoxBottom) // // Transmogrify button // GOBCHUNK("Spletters easel Transmogrify", kidSpltTransmogrify, kgokkRectHit) DEFAULT_POSITION(kxpSpltTransmogrify, kypSpltTransmogrify, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSpltTransmogrify) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1tran.bmp", kxpregSpltTransmogrify, kypregSpltTransmogrify) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1trans.bmp", kxpregSpltTransmogrify, kypregSpltTransmogrify) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoRandomWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Transmogrify clicked") EnqueueCid(cidEaselTransmogrify, kidSpltGlass, 0, 0, 0, 0); ENDCHUNK // // Texture popdown. Starts the popdown. // GOBCHUNK("Spletters easel Textures", kidSpltTextures, kgokkRectHit) DEFAULT_POSITION( kxpSpltTextures, kypSpltTextures, 10) ACTION(fcustNil, fcustNil, fgrfstDefault, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSpltTextures) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1text.bmp", kxpregSpltTextures, kypregSpltTextures) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1texts.bmp", kxpregSpltTextures, kypregSpltTextures) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Texture clicked") EnqueueCid(cidEaselTexture, kidSpltGlass, kidSpltGlass, kidSpltsColorFrame, kidSpltsColorPageDown, (kdxpSpltsColorFrameBorder << 16) | kdypSpltsColorFrameBorder); ENDCHUNK // // Font popdown. Starts the popdown. // GOBCHUNK("Spletters easel Font", kidSpltFont, kgokkRectHit) DEFAULT_POSITION(kxpSpltFont, kypSpltFont, 10) ACTION(fcustNil, fcustNil, fgrfstDefault, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSpltFont) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1font.bmp", kxpregSpltFont, kypregSpltFont) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1fonts.bmp", kxpregSpltFont, kypregSpltFont) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Font clicked") EnqueueCid(cidEaselFont, kidSpltGlass, kidSpltGlass, kidSpltsFontFrame, kidSpltsFontPageDown, (kdxpSpltsFontFrameBorder << 16) | kdypSpltsFontFrameBorder); ENDCHUNK // // Shape popdown. Starts the popdown. // GOBCHUNK("Spletters easel Shape", kidSpltShape, kgokkRectHit) DEFAULT_POSITION(kxpSpltShape, kypSpltShape, 10) ACTION(fcustNil, fcustNil, fgrfstDefault, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSpltShape) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1shap.bmp", kxpregSpltShape, kypregSpltShape) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1shaps.bmp", kxpregSpltShape, kypregSpltShape) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Shape clicked") EnqueueCid(cidEaselShape, kidSpltGlass, kidSpltsShape, kidSpltsShapeFrame, kidSpltsShapePageDown, (kdxpSpltsShapeFrameBorder << 16) | kdypSpltsShapeFrameBorder); ENDCHUNK // // Rotate button. // GOBCHUNK("Spletters easel Rotate", kidSpltRotate, kgokkRectHit) DEFAULT_POSITION(kxpSpltRotate, kypSpltRotate, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSpltRotate) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1rot.bmp", kxpregSpltRotate, kypregSpltRotate) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1rots.bmp", kxpregSpltRotate, kypregSpltRotate) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoSpinWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Rotate clicked") EnqueueCid(cidEaselRotate, kidSpltGlass, 0, 0, 0, 0); ENDCHUNK // // Cancel button // GOBCHUNK("Spletters easel cancel", kidSpltCancel, kgokkRectHit) DEFAULT_POSITION(kxpSpltCancel, kypSpltCancel, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselCancel) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1can.bmp", kxpregSpltCancel, kypregSpltCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1canc.bmp", kxpregSpltCancel, kypregSpltCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoCancelWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Cancel clicked") EnqueueCid(cidEaselCancel, kidSpltGlass, 0, 0, 0, 0); ENDCHUNK // // OK button // GOBCHUNK("Spletters easel ok", kidSpltOk, kgokkRectHit) DEFAULT_POSITION(kxpSpltOk, kypSpltOk, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselOk) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e1okay.bmp", kxpregSpltOk, kypregSpltOk) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e1okayc.bmp", kxpregSpltOk, kypregSpltOk) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoOkWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Ok clicked") EnqueueCid(cidEaselOk, kidSpltGlass, 0, 0, 0, 0); ENDCHUNK // // Costumes easels very own glass // GOBCHUNK("Costume changer easel pane of glass", kidCostGlass, kgokkRectHit) DEFAULT_POSITION(0, 0, 100) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, CHID(kstDefault, kchidClick), cidNil, cnoNil) ENDCHUNK REP_FILL(CHID(kstDefault, krepDefault ), "Max", 0, 0, kdxpBackground, kdypBackground, Transparent, Palette( 73 )) PATTERN_50 ENDCHUNK CREATE_SCRIPT("Costume changer") CreateChildThis(kidCostBackground, kidCostBackground); ENDCHUNK CHILD_SCRIPT("Glass clicked", CHID(kstDefault, kchidClick)) PlaySoundGob(kidBackground, kctgWave, kwavSplot, 0, 0x10000, 1, 0, 1); ENDCHUNK // // Background // GOBCHUNK("Costume changer easel background", kidCostBackground, kgokkRectHit) DEFAULT_POSITION( kxpCostBackground, kypCostBackground, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e2par.bmp", kxpregCostBackground, kypregCostBackground ) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Costume changer easel created") CreateChildThis(kidCostPreviewFrame, kidCostPreviewFrame); CreateChildThis(kidCostCostumes, kidCostCostumes); CreateChildThis(kidCostRotate, kidCostRotate); CreateChildThis(kidCostAccessories, kidCostAccessories); CreateChildThis(kidCostCancel, kidCostCancel); CreateChildThis(kidCostOk, kidCostOk); CreateChildThis(kidCostEditBox, kidCostEditBox); ChangeStateGob(kidCostCostumes, kstSelected); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp35); End; ENDCHUNK // // Preview area -- parent area for creating a brender world for viewing // the actor. // OBJECT("Costume changer easel preview Frame", kidCostPreviewFrame, 100, kcrsHand) REP_RECT(CHID(kstDefault, krepDefault), "Visible", kxpCostPreviewFrameLeft, kypCostPreviewFrameTop, kxpCostPreviewFrameRight, kypCostPreviewFrameBottom) // // Parent rectangle for the edit box. // OBJECT("Costume changer edit box", kidCostEditBox, 100, kcrsArrow) REP_RECT(CHID(kstDefault, krepDefault), "Visible", kxpCostEditBoxLeft, kypCostEditBoxTop, kxpCostEditBoxRight, kypCostEditBoxBottom) // // Costumes. // GOBCHUNK("Costume changer easel ", kidCostCostumes, kgokkRectHit) DEFAULT_POSITION(kxpCostCostumes, kypCostCostumes, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttCostCostumes) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e2cost.bmp", kxpregCostCostumes, kypregCostCostumes) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e2costs.bmp", kxpregCostCostumes, kypregCostCostumes) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoCostumeWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Costumes clicked") EnqueueCid(cidEaselCostumes, kidCostGlass, 0, 0, 0, 0); ChangeStateThis(kstSelected); ChangeStateGob(kidCostAccessories, kstDefault); ENDCHUNK // // Rotate button. // GOBCHUNK("Costume changer easel Rotate", kidCostRotate, kgokkRectHit) DEFAULT_POSITION(kxpCostRotate, kypCostRotate, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttCostRotate) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e2rot.bmp", kxpregCostRotate, kypregCostRotate) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e2rots.bmp", kxpregCostRotate, kypregCostRotate) ADOPT_WAVE(kcnoSpinWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Rotate clicked") EnqueueCid(cidEaselRotate, kidCostGlass, 0, 0, 0, 0); ENDCHUNK // // Accessories button // GOBCHUNK("Costume changer easel accessories", kidCostAccessories, kgokkRectHit) DEFAULT_POSITION(kxpCostAccessories, kypCostAccessories, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttCostAccessories) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e2acc.bmp", kxpregCostAccessories, kypregCostAccessories) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e2accs.bmp", kxpregCostAccessories, kypregCostAccessories) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoAcesoryWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Accessories clicked") EnqueueCid(cidEaselAccessories, kidCostGlass, 0, 0, 0, 0); ChangeStateThis(kstSelected); ChangeStateGob(kidCostCostumes, kstDefault); ENDCHUNK // // Cancel button. // GOBCHUNK("Costume changer easel cancel", kidCostCancel, kgokkRectHit) DEFAULT_POSITION(kxpCostCancel, kypCostCancel, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselCancel) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e2can.bmp", kxpregCostCancel, kypregCostCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e2canc.bmp", kxpregCostCancel, kypregCostCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoCancelWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Cancel clicked") EnqueueCid(cidEaselCancel, kidCostGlass, 0, 0, 0, 0); ENDCHUNK // // Ok button. // GOBCHUNK("Costume changer easel ok", kidCostOk, kgokkRectHit) DEFAULT_POSITION(kxpCostOk, kypCostOk, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselOk) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e2okay.bmp", kxpregCostOk, kypregCostOk) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e2okayc.bmp", kxpregCostOk, kypregCostOk) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoOkWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Ok clicked") EnqueueCid(cidEaselOk, kidCostGlass, 0, 0, 0, 0); ENDCHUNK // // // Scene sorter easel // // #ifdef DEBUG #define klwSSorterDelayMax 90 #define klwSSorterDelayMin 60 #define kdlwSSorterDelay 6 #else /* DEBUG */ #define klwSSorterDelayMax 30 #define klwSSorterDelayMin 5 #define kdlwSSorterDelay 5 #endif /* !DEBUG */ #define kcgokFrame 7 #define kdtimDragScroll 60 #define kdtimDrag 10 /****************************************************************************** Scene Sorter This outlines the cids available to script from code. It's basically a cut-and-paste from the comments in the code. Last update was 5/11/95. cidSceneSortInit: Initializes the Scene Sorter with the information about the easel in kidspace. rglw[0] -- kid of the first thumbnail frame GOK rglw[1] -- kid of the first scrollbar GOK button (scroll up) rglw[2] -- number of GOKs in a single frame cidSceneSortSelect: Selects the scene corresponding to the given thumbnail frame. rglw[0] -- the kid of the thumbnail frame cidSceneSortInsert: Inserts the currently selected scene before the scene that corresponds to the given thumbnail frame. If the given thumbnail frame is larger than the last visible thumbnail frame, the scene is inserted after the last scene visible on the easel. rglw[0] -- the kid of the frame to insert the scene before cidSceneSortScroll: Scrolls the thumbnails by the given number of frames. The sign of the number of frames indicates whether to scroll forward (positive) or backward (negative). Sets the selected frame to kstBrowserSelected if we're not drag & drop, or to kstBrowserScrollingSel if we are. rglw[0] -- the number of frames to scroll rglw[1] -- non-zero if we're scrolling during drag & drop cidSceneSortNuke: Deletes the currently selected scene from the movie. Makes the following scene the currently selected scene, unless there is no such scene, in which case the scene immediately before the deleted scene is the new currently selected scene. cidSceneSortOk: cidSceneSortCancel: Alerts the Scene Sorter that the easel is about to go away. If the easel was not cancelled, the changes made in the easel are applied to the movie. cidSceneSortPortfolio: Brings up the portfolio so that the user can append movies from file. cidSceneSortTransition: Sets the transition for the scene corresponding to the given frame. rglw[0] -- GOK id of the frame rglw[1] -- which transition to use ************************************************************ PETED ***********/ // // Scene sorter easel. This is a hybrid easel, so it uses a few // browser-like conventions. // // Create self + NxM frames + controls, all are invisable // Enqueues: cidSSortersBrowserReady when ready to go. // GOBCHUNK("Scene sorter background", kidSSorterBackground, kgokkRectHit) DEFAULT_POSITION( kxpSSorterBackground, kypSSorterBackground, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstBrowserEnabled, krepDefault ), "studio\bmp\e3par.bmp", kxpregSSorterBackground, kypregSSorterBackground ) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Scene Sorter created") CreateChildGob(kidBackground, kidGenericDisableGlass, kidGenericDisableGlass ); CreateChildThis(kidSSorterScrollUp, kidSSorterScrollUp); CreateChildThis(kidSSorterScrollDn, kidSSorterScrollDn); CreateChildThis(kidSSorterOpen, kidSSorterOpen); CreateChildThis(kidSSorterNuke, kidSSorterNuke); CreateChildThis(kidSSorterHand, kidSSorterHand); CreateChildThis(kidSSorterOk, kidSSorterOk); CreateChildThis(kidSSorterCancel, kidSSorterCancel); CreateChildThis(kidSSorterBar, kidSSorterBar); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp32); End; .idSelected = kidStudio; yp = kdypSSorterTop; .nFrame = 0; .dxpFrame = kdxpSSorterSpacing + kdxpSSorterFrame; .dypFrame = kdypSSorterSpacing + kdypSSorterFrame; .dxpSSorter = kdxpSSorter - kdxpSSorterRight + kdxpSSorterSpacing - kdxpSSorterLeft; .dypSSorter = kdypSSorter - kdypSSorterBottom - kdypSSorterTop; .nxFrame = .dxpSSorter / .dxpFrame; While(yp <= (kdypSSorter - kdypSSorterFrame - kdypSSorterBottom)); xp = kdxpSSorterLeft; While(xp <= (kdxpSSorter - kdxpSSorterRight - kdxpSSorterFrame)); // // create and position frames // CreateChildThis(kidSSorterFrame + (.nFrame * kcgokFrame), kidSSorterFrame); MoveAbsGob(kidSSorterFrame + (.nFrame * kcgokFrame), xp, yp); .nFrame++; xp += kdxpSSorterSpacing + kdxpSSorterFrame; End; yp += kdypSSorterSpacing + kdypSSorterFrame; End; /* .nxFrame == number of frames in a full row */ // create frame used during drag & drop .idSelFrame = kidSSorterFrame + (.nFrame * kcgokFrame); CreateChildThis(.idSelFrame, kidSSorterFrame); ChangeStateGob(.idSelFrame, kstBrowserDisabled); // don't bother moving it or showing it, since that will only happen // when the user actually wants to drag a frame EnqueueCid(cidSceneSortInit, kidSSorterBackground, kidSSorterFrame, kidSSorterScrollUp, kcgokFrame, 0); ChangeModifierState(fcustHand, 0); ChangeStateGob(kidSSorterHand, kstSelected); ChangeStateThis(kstBrowserEnabled); ENDCHUNK /* Handles the mouse tracking */ REP_ANIM(CHID(kstBrowserDragging, kchidUpOff), "Scene sorter, d&d mouse tracking") idSelFrame = .idSelFrame; If(GetModifierState() & fcustHand); // During dragging, allow the user to drag to right edge of scene sorter.. xpFrameMax = .dxpSSorter - .dxpFrame + kdxpSSorterRight; ypFrameMax = .dypSSorter - .dypFrame; dxpFrames = kdxpSSorterSpacing + kdxpSSorterFrame; dypFrames = kdypSSorterSpacing + kdypSSorterFrame; dtimCur = 0; PlaySoundThis(kctgWave, kcnoGrabSnWav, 0, 0x10000, 1, 0, 1); While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, kdtimDrag); dtimCur += kdtimDrag; xpMouse = XMouseThis(); ypMouse = YMouseThis(); xpNew = xpMouse - .dxpTrack; ypNew = ypMouse - .dypTrack; If(xpNew < 0); xpNew = 0; Elif(xpNew > xpFrameMax); xpNew = xpFrameMax; End; If(ypNew < 0); ypNew = 0; Elif(ypNew > ypFrameMax); ypNew = ypFrameMax; End; If(dtimCur >= kdtimDragScroll); dtimCur = 0; If(ypMouse < 0); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, -1 * .nxFrame, 1, 0, 0); Elif(ypMouse > .dypSSorter); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, .nxFrame, 1, 0, 0); End; End; MoveAbsGob(idSelFrame, xpNew, ypNew); If(xpNew < kdxpSSorterLeft); xpBar = kdxpSSorterSpacing / 2; Else; xpBar = (kdxpSSorterSpacing / 2) + (dxpFrames * (1 + ((xpNew - kdxpSSorterLeft - 1) / dxpFrames))); End; ypBar = (kdypSSorterSpacing / 2) + (dypFrames * ((ypNew + (dypFrames / 2)) / dypFrames)); MoveAbsGob(kidSSorterBar, xpBar, ypBar); // Do not show the indicator bar until we have positioned it in the correct place. If(StateGob(kidSSorterBar) == kstDefault); ChangeStateGob(kidSSorterBar, kstSelected); End; End; ChangeStateGob(kidSSorterBar, kstDefault); PlaySoundThis(kctgWave, kcnoDropSnWav, 0, 0x10000, 1, 0, 1); /* Find the target frame */ xpNew = XGob(idSelFrame); ypNew = YGob(idSelFrame); If(xpNew < kdxpSSorterLeft); xFrame = 0; Else; xFrame = 1 + ((xpNew - kdxpSSorterLeft - 1) / dxpFrames); End; yFrame = (ypNew + (dypFrames / 2)) / dypFrames; gidFrame = yFrame * .nxFrame + xFrame; gidFrame = (gidFrame * kcgokFrame) + kidSSorterFrame; /* Insert the frame */ EnqueueCid(cidSceneSortInsert, kidSSorterBackground, gidFrame, 0, 0, 0); /* Hide the dragging gob */ EnqueueCid(cidSceneSortScroll, kidSSorterBackground, 0, 0, 0, 0); ChangeStateGob(.idSelFrame, kstBrowserDisabled); ChangeStateThis(kstBrowserEnabled); Else; DEBUGCMD( AlertStr("Bogus state for scene sorter");) End; ENDCHUNK // // Scroll up button // GOBCHUNK("Scene sorter - scroll up", kidSSorterScrollUp, kgokkRectHit) DEFAULT_POSITION(kxpSSorterScrollUp, kypSSorterScrollUp, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstBrowserEnabled, krepMouseDnOn), cidNil, kttSSorterScrollUp) ENDCHUNK REP_MBMPREG(CHID(kstBrowserEnabled, krepDefault), "studio\bmp\e3up.bmp", kxpregSSorterScrollUp, kypregSSorterScrollUp) ADOPT_MBMP(LAST_MBMP, CHID(kstBrowserEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstBrowserEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstBrowserEnabled, krepMouseDnOn), "studio\bmp\e3upc.bmp", kxpregSSorterScrollUp, kypregSSorterScrollUp) REP_ANIM(CHID(kstBrowserEnabled, krepMouseDnOn), "Pressed") /* Init */ lwDelay = klwSSorterDelayMax; cgokScroll = GidParThis()->nxFrame * -1; /* Send first scroll command */ PlaySoundThis(kctgWave, kcnoPageUpWav, 0, 0x10000, 1, 0, 1); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, cgokScroll, 0, 0, 0); Cell(CHID(kstBrowserEnabled, krepMouseDnOn), 0, 0, lwDelay); /* Loop until we exit this state */ While(); ASSERT(GetModifierState() & fcustMouse); If(lwDelay > lwSSorterDelayMin); lwDelay -= kdlwSSorterDelay; End; PlaySoundThis(kctgWave, kcnoPageUpWav, 0, 0x10000, 1, 0, 1); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, cgokScroll, 0, 0, 0); Cell(chidNil, 0, 0, lwDelay); End; ENDCHUNK REP_RECT(CHID(kstBrowserDisabled, krepDefault), "hidden", 0, 0, 0, 0) // // Scroll down button // GOBCHUNK("Scene sorter - scroll down", kidSSorterScrollDn, kgokkRectHit) DEFAULT_POSITION(kxpSSorterScrollDn, kypSSorterScrollDn, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstBrowserEnabled, krepMouseDnOn), cidNil, kttSSorterScrollDn) ENDCHUNK REP_MBMPREG(CHID(kstBrowserEnabled, krepDefault), "studio\bmp\e3down.bmp", kxpregSSorterScrollDn, kypregSSorterScrollDn) ADOPT_MBMP(LAST_MBMP, CHID(kstBrowserEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstBrowserEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstBrowserEnabled, krepMouseDnOn), "studio\bmp\e3downc.bmp", kxpregSSorterScrollDn, kypregSSorterScrollDn) REP_ANIM(CHID(kstBrowserEnabled, krepMouseDnOn), "Pressed") /* Init */ lwDelay = klwSSorterDelayMax; cgokScroll = GidParThis()->nxFrame; /* Send first scroll command */ PlaySoundThis(kctgWave, kcnoPageDnWav, 0, 0x10000, 1, 0, 1); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, cgokScroll, 0, 0, 0); Cell(CHID(kstBrowserEnabled, krepMouseDnOn), 0, 0, lwDelay); /* Loop until we exit this state */ While(); ASSERT(GetModifierState() & fcustMouse); If(lwDelay > lwSSorterDelayMin); lwDelay -= kdlwSSorterDelay; End; PlaySoundThis(kctgWave, kcnoPageDnWav, 0, 0x10000, 1, 0, 1); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, cgokScroll, 0, 0, 0); Cell(chidNil, 0, 0, lwDelay); End; ENDCHUNK REP_RECT(CHID(kstBrowserDisabled, krepDefault), "hidden", 0, 0, 0, 0) // // Bar indicating where scene will be dropped. // GOBCHUNK("Scene sorter - Bar", kidSSorterBar, kgokkRectHit) DEFAULT_POSITION( 0, 0, 10 ) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, chidNil, cidNil, cnoNil ) ENDCHUNK REP_RECT(CHID(kstDefault, krepDefault ), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSelected, krepDefault ), "studio\bmp\ssbar.bmp", 0, 0) // // Open file button. Starts the dialog. // GOBCHUNK("Scene sorter - Open", kidSSorterOpen, kgokkRectHit) DEFAULT_POSITION( kxpSSorterOpen, kypSSorterOpen, 10 ) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSSorterOpen ) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e3port.bmp", kxpregSSorterOpen, kypregSSorterOpen) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3portc.bmp", kxpregSSorterOpen, kypregSSorterOpen) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Scene sorter, portfolio clicked") EnqueueCid(cidSceneSortPortfolio, kidSSorterBackground, 0, 0, 0, 0); ENDCHUNK // // Ok button. // GOBCHUNK("Scene sorter - Ok", kidSSorterOk, kgokkRectHit) DEFAULT_POSITION(kxpSSorterOk, kypSSorterOk, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidSceneSortOk, kttEaselOk) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3okay.bmp", kxpregSSorterOk, kypregSSorterOk) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3okayc.bmp", kxpregSSorterOk, kypregSSorterOk) ADOPT_WAVE(kcnoOkWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Scene sorter, ok, clicked") EnqueueCid(cidSceneSortOk, kidSSorterBackground, 0, 0, 0, 0); OldState = GetModifierState(); OldState &= (fcustHand | fcustNuke); ChangeModifierState(0, OldState); ENDCHUNK // // Cancel button. // GOBCHUNK("Scene sorter - Cancel", kidSSorterCancel, kgokkRectHit) DEFAULT_POSITION(kxpSSorterCancel, kypSSorterCancel, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidSceneSortCancel, kttEaselCancel) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3can.bmp", kxpregSSorterCancel, kypregSSorterCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3canc.bmp", kxpregSSorterCancel, kypregSSorterCancel) ADOPT_WAVE(kcnoCancelWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Scene sorter, cancel, clicked") EnqueueCid(cidSceneSortCancel, kidSSorterBackground, 0, 0, 0, 0); OldState = GetModifierState(); OldState &= (fcustHand | fcustNuke); ChangeModifierState(0, OldState); ENDCHUNK // // Nuke scene button. // GOBCHUNK("Scene sorter - Nuke", kidSSorterNuke, kgokkRectHit) DEFAULT_POSITION(kxpSSorterNuke, kypSSorterNuke, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSSorterNuke) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e3rmsn.bmp", kxpregSSorterNuke, kypregSSorterNuke) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3rmsnc.bmp", kxpregSSorterNuke, kypregSSorterNuke) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Scene sorter, Nuke, clicked") OldState = GetModifierState(); OldState &= fcustHand; // // Use the modifier state to tell if the Hand was selected. // If so, deselect it. // If(OldState & fcustHand); ChangeStateGob(kidSSorterHand, kstDefault); End; ChangeModifierState(fcustNuke, OldState); ChangeStateThis(kstSelected); ENDCHUNK // // Hand button. // GOBCHUNK("Scene sorter - Nuke", kidSSorterHand, kgokkRectHit) DEFAULT_POSITION(kxpSSorterHand, kypSSorterHand, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttSSorterHand) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e3hand.bmp", kxpregSSorterHand, kypregSSorterHand) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3handc.bmp", kxpregSSorterHand, kypregSSorterHand) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CLICK_SCRIPT("Scene sorter, Nuke, clicked") OldState = GetModifierState(); OldState &= fcustNuke; // // Use the modifier state to tell if the Nuke was selected. // If so, deselect it. // If(OldState & fcustNuke); ChangeStateGob(kidSSorterNuke, kstDefault); End; ChangeModifierState(fcustHand, OldState); ChangeStateThis(kstSelected); ENDCHUNK // // Frame object for the scene sorter. // GOBCHUNK("Scene sorter - Frame", kidSSorterFrame, kgokkRectHit) DEFAULT_POSITION(kxpSSorterFrame, kypSSorterFrame, 10) ACTION(fcustHand, fcustHand, fgrfstAll, kcrsHand, chidNil, cidNil, kttSSorterFrame) ACTION(fcustNuke, fcustNuke, fgrfstAll, kcrsNuke, chidNil, cidNil, kttSSorterFrame) ENDCHUNK /* Define the default representations */ REP_RECT(CHID(kstBrowserInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstBrowserEnabled, krepDefault), "studio\bmp\e3frm.bmp", kxpregSSorterFrameBorder, kypregSSorterFrameBorder) REP_MBMPREG(CHID(kstBrowserSelected, krepDefault), "studio\bmp\e3frms.bmp", kxpregSSorterFrameBorder, kypregSSorterFrameBorder) REP_MBMPREG(CHID(kstBrowserDragging, krepDefault), "studio\bmp\e3frms.bmp", kxpregSSorterFrameBorder, kypregSSorterFrameBorder) REP_RECT(CHID(kstBrowserDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstBrowserScrollingSel, krepDefault), "hidden", 0, 0, 0, 0) CREATE_SCRIPT("Scene Sorter frame created") CreateChildThis(GidThis() + 1, kidTransition1); CreateChildThis(GidThis() + 2, kidTransition2); CreateChildThis(GidThis() + 3, kidTransition3); CreateChildThis(GidThis() + 4, kidTransition4); CreateChildThis(GidThis() + 5, kidSSorterThumbFrame); ChangeStateThis(kstBrowserDisabled); ENDCHUNK /* Handles mouse down in a frame */ REP_ANIM(CHID(kstBrowserEnabled, krepMouseDn), "Scene sorter, frame, mouse down hand") If(StateGob(GidParThis()->idSelFrame) == kstBrowserDisabled); EnqueueCid(cidSceneSortSelect, kidSSorterBackground, GidThis(), 0, 0, 0); End; ENDCHUNK REP_ANIM(CHID(kstBrowserSelected, krepMouseDn), "Scene sorter, frame, start track") If(GetModifierState() & fcustHand); idSelFrame = GidParThis()->idSelFrame; If(StateGob(idSelFrame) == kstBrowserDisabled); EnqueueCid(cidSceneSortScroll, kidSSorterBackground, 0, 1, 0, 0); End; End; ENDCHUNK REP_ANIM(CHID(kstBrowserScrollingSel, kchidDownOn), "Scene sorter, frame, start track") gidParent = GidParThis(); idSelFrame = gidParent->idSelFrame; If(StateGob(idSelFrame) == kstBrowserDisabled); xpThis = XThis(); ypThis = YThis(); If(StateGob(idSelFrame) != kstBrowserDragging); MoveAbsGob(idSelFrame, xpThis, ypThis); ChangeStateGob(idSelFrame, kstBrowserDragging); End; gidParent->dxpTrack = XMouseGob(gidParent) - xpThis; gidParent->dypTrack = YMouseGob(gidParent) - ypThis; ChangeStateGob(gidParent, kstBrowserDragging); End; ENDCHUNK /* Handles mouse up after tracking, "no insert" or "nuke" */ REP_ANIM(CHID(kstBrowserSelected, kchidDownUpOn), "Scene sorter, frame, mouse up on") If(GetModifierState() & fcustNuke); PlaySoundGob(kidSSorterBackground, kctgWave, kcnoNukeSnWav, 0, 0x10000, 1, 0, 1); EnqueueCid(cidSceneSortNuke, kidSSorterBackground, 0, 0, 0, 0); End; ENDCHUNK // // Scene thumbnail frame // GOBCHUNK("Scene sorter - thumbnail frame", kidSSorterThumbFrame, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_RECT( CHID(kstDefault, krepDefault), "scene holder", kxpSSorterThumbLeft, kypSSorterThumbTop, kxpSSorterThumbRight, kypSSorterThumbBottom ) // // Transition 1 // GOBCHUNK("Scene sorter - Transition button", kidTransition1, kgokkRectHit) DEFAULT_POSITION(kxpTransition1, kypTransition1, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttTransition1) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3trn1.bmp", kxpregTransition1, kypregTransition1) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3trn1s.bmp", kxpregTransition1, kypregTransition1) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Transition 1", CHID(kstDefault, kchidClick)) EnqueueCid(cidSceneSortTransition, kidSSorterBackground, GidParThis(), 1, 0, 0); ENDCHUNK // // Transition 2 // GOBCHUNK("Scene sorter - Transition button", kidTransition2, kgokkRectHit) DEFAULT_POSITION(kxpTransition2, kypTransition2, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttTransition2) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3trn2.bmp", kxpregTransition2, kypregTransition2) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3trn2s.bmp", kxpregTransition2, kypregTransition2) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Transition 2", CHID(kstDefault, kchidClick)) EnqueueCid(cidSceneSortTransition, kidSSorterBackground, GidParThis(), 2, 0, 0); ENDCHUNK // // Transition 3 // GOBCHUNK("Scene sorter - Transition button", kidTransition3, kgokkRectHit) DEFAULT_POSITION(kxpTransition3, kypTransition3, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttTransition3) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3trn3.bmp", kxpregTransition3, kypregTransition3) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3trn3s.bmp", kxpregTransition3, kypregTransition3) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Transition 3", CHID(kstDefault, kchidClick)) EnqueueCid(cidSceneSortTransition, kidSSorterBackground, GidParThis(), 3, 0, 0); ENDCHUNK // // Transition 4 // GOBCHUNK("Scene sorter - Transition button", kidTransition4, kgokkRectHit) DEFAULT_POSITION(kxpTransition4, kypTransition4, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttTransition4) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e3trn4.bmp", kxpregTransition4, kypregTransition4) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e3trn4s.bmp", kxpregTransition4, kypregTransition4) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Transition 4", CHID(kstDefault, kchidClick)) EnqueueCid(cidSceneSortTransition, kidSSorterBackground, GidParThis(), 4, 0, 0); ENDCHUNK // // // Sound Listener easel // // // Listener easel for actor's very own glass // GOBCHUNK("Listen easel for actors pane of glass", kidListenGlassActor, kgokkRectHit) DEFAULT_POSITION(0, 0, 100) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, CHID(kstDefault, kchidClick), cidNil, cnoNil) ENDCHUNK REP_FILL( CHID(kstDefault, krepDefault ), "Max", 0,0, kdxpBackground, kdypBackground, Transparent, Palette( 73 )) PATTERN_50 ENDCHUNK CREATE_SCRIPT("Listener easel for actor - create") CreateChildThis(kidListenBackgroundActor, kidListenBackgroundActor); ENDCHUNK CHILD_SCRIPT("Glass clicked", CHID(kstDefault, kchidClick)) PlaySoundGob(kidBackground, kctgWave, kwavSplot, 0, 0x10000, 1, 0, 1); ENDCHUNK // // Listener easel for background's very own glass // GOBCHUNK("Listen easel for background pane of glass", kidListenGlassBkgd, kgokkRectHit) DEFAULT_POSITION(0, 0, 100) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, CHID(kstDefault, kchidClick), cidNil, cnoNil) ENDCHUNK REP_FILL( CHID(kstDefault, krepDefault ), "Max", 0,0, kdxpBackground, kdypBackground, Transparent, Palette( 73 )) PATTERN_50 ENDCHUNK CREATE_SCRIPT("Listener easel for background - create") CreateChildThis(kidListenBackgroundBkgd, kidListenBackgroundBkgd); ENDCHUNK CHILD_SCRIPT("Glass clicked", CHID(kstDefault, kchidClick)) PlaySoundGob(kidBackground, kctgWave, kwavSplot, 0, 0x10000, 1, 0, 1); ENDCHUNK // // Listener easel for actor Background // GOBCHUNK("Listener easel for actor background", kidListenBackgroundActor, kgokkRectHit) DEFAULT_POSITION( kxpListenBackgroundActor, kypListenBackgroundActor, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e4parmm.bmp", kxpregListenBackgroundActor, kypregListenBackgroundActor ) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Listener easel for actor background created") // Create the volume sliders. CreateChildThis(kidListenVolSpeech, kidListenVolSpeech); CreateChildThis(kidListenVolFX, kidListenVolFX); CreateChildThis(kidListenVolSpeechMM, kidListenVolSpeechMM); CreateChildThis(kidListenVolFXMM, kidListenVolFXMM); // Create the four nuke btns. CreateChildThis(kidListenNukeSpeech, kidListenNukeSpeech); MoveAbsGob(kidListenNukeSpeech, kxpActorListenNukeSpeech, kypActorListenNukeSpeech); CreateChildThis(kidListenNukeFX, kidListenNukeFX); MoveAbsGob(kidListenNukeFX, kxpActorListenNukeFX, kypActorListenNukeFX); CreateChildThis(kidListenNukeSpeechMM, kidListenNukeSpeechMM); MoveAbsGob(kidListenNukeSpeechMM, kxpActorListenNukeSpeechMM, kypActorListenNukeSpeechMM); CreateChildThis(kidListenNukeFXMM, kidListenNukeFXMM); MoveAbsGob(kidListenNukeFXMM, kxpActorListenNukeFXMM, kypActorListenNukeFXMM); // Create the sound name controls that exist beneath the volume sliders. CreateChildThis(kidListenEditBoxSpeech, kidListenEditBoxSpeech); MoveAbsGob(kidListenEditBoxSpeech, kxpListenActorEditBoxSpeech, kypListenActorEditBoxSpeech ); CreateChildThis(kidListenEditBoxFX, kidListenEditBoxFX); MoveAbsGob(kidListenEditBoxFX, kxpListenActorEditBoxFX, kypListenActorEditBoxFX ); CreateChildThis(kidListenEditBoxSpeechMM, kidListenEditBoxSpeechMM); MoveAbsGob(kidListenEditBoxSpeechMM, kxpListenActorEditBoxSpeechMM, kypListenActorEditBoxSpeechMM ); CreateChildThis(kidListenEditBoxFXMM, kidListenEditBoxFXMM); MoveAbsGob(kidListenEditBoxFXMM, kxpListenActorEditBoxFXMM, kypListenActorEditBoxFXMM ); // Create the Icons CreateChildThis(kidListenSpeechIcon, kidListenSpeechIcon); MoveAbsGob(kidListenSpeechIcon, kxpActorListenSpeechIcon, kypActorListenSpeechIcon); CreateChildThis(kidListenSpeechMMIcon, kidListenSpeechMMIcon); MoveAbsGob(kidListenSpeechMMIcon, kxpListenSpeechMMIcon, kypListenSpeechMMIcon); CreateChildThis(kidListenFXIcon, kidListenFXIcon); MoveAbsGob(kidListenFXIcon, kxpListenFXIcon, kypListenFXIcon); CreateChildThis(kidListenFXMMIcon, kidListenFXMMIcon); MoveAbsGob(kidListenFXMMIcon, kxpListenFXMMIcon, kypListenFXMMIcon); // reposition OK + CANCEL for the actor listener browser CreateChildThis(kidListenCancel, kidListenCancel); MoveAbsGob(kidListenCancel, kxpListenActorCancel, kypListenActorCancel ); CreateChildThis(kidListenOk, kidListenOk); MoveAbsGob(kidListenOk, kxpListenActorOk, kypListenActorOk ); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp34); End; ENDCHUNK // // Listener easel for bkgd Background // GOBCHUNK("Listener easel for bkgd background", kidListenBackgroundBkgd, kgokkRectHit) DEFAULT_POSITION( kxpListenBackgroundBkgd, kypListenBackgroundBkgd, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e4par.bmp", kxpregListenBackgroundBkgd, kypregListenBackgroundBkgd ) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Listener easel for bkgd background created") // Create the volume sliders. CreateChildThis(kidListenVolSpeech, kidListenVolSpeech); CreateChildThis(kidListenVolFX, kidListenVolFX); CreateChildThis(kidListenVolMidi, kidListenVolMidi); // Create the three nuke btns. CreateChildThis(kidListenNukeSpeech, kidListenNukeSpeech); MoveAbsGob(kidListenNukeSpeech, kxpListenNukeSpeech, kypListenNukeSpeech); CreateChildThis(kidListenNukeFX, kidListenNukeFX); MoveAbsGob(kidListenNukeFX, kxpListenNukeFX, kypListenNukeFX); CreateChildThis(kidListenNukeMidi, kidListenNukeMidi); MoveAbsGob(kidListenNukeMidi, kxpListenNukeMidi, kypListenNukeMidi); // Create the sound name controls that exist beneath the volume sliders. CreateChildThis(kidListenEditBoxSpeech, kidListenEditBoxSpeech); CreateChildThis(kidListenEditBoxFX, kidListenEditBoxFX); CreateChildThis(kidListenEditBoxMidi, kidListenEditBoxMidi); // Create the Icons CreateChildThis(kidListenSpeechIcon, kidListenSpeechIcon); MoveAbsGob(kidListenSpeechIcon, kxpListenSpeechIcon, kypListenSpeechIcon); CreateChildThis(kidListenFXIcon, kidListenFXIcon); MoveAbsGob(kidListenFXIcon, kxpListenFXIcon, kypListenFXIcon); CreateChildThis(kidListenMidiIcon, kidListenMidiIcon); MoveAbsGob(kidListenMidiIcon, kxpListenMidiIcon, kypListenMidiIcon); CreateChildThis(kidListenCancel, kidListenCancel); CreateChildThis(kidListenOk, kidListenOk); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp34); End; ENDCHUNK // // Volume sliders // // For limiting slider thumb to legal range. #define GetYPos(yPos, min, max) yPos = YMouseThis(); \ If(yPos > max); \ yPos = max; \ Elif(yPos < min); \ yPos = min; \ End; GOBCHUNK("Listener easel speech volume slider", kidListenVolSpeech, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, krepMouseDnOn), cidNil, cnoNil) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstSliderEnabled, krepDefault), "Visible", kxpVolSpeechLeft, kypVolSpeechTop, kxpVolSpeechRight, kypVolSpeechBottom) CREATE_SCRIPT("Speech slider - create") ChangeStateThis(kstSliderInvisible); // Watch for the volume setting command sent from code. FilterCmdsThis(cidListenVolSet, cidNil, kchidScript1); ENDCHUNK CHILD_SCRIPT("par / filter cids", kchidScript1) // Convert the volume in the range 0 -> kvlmFull to the display range. // _parm[0] is the gok id // _parm[2] is the required volume setting. kid = _parm[0]; If(kid == kidListenVolSpeech); yMax = kypListenVolSpeechMax; yMin = kypListenVolSpeechMin; yNuke = kypSliderNukeSpeech; kidThumb = kidListenVolSpeechThumb; kidAudition = kidListenEditBoxSpeech; kidNuke = kidListenNukeSpeech; Elif(kid == kidListenVolFX); yMax = kypListenVolFXMax; yMin = kypListenVolFXMin; yNuke = kypSliderNukeFX; kidThumb = kidListenVolFXThumb; kidAudition = kidListenEditBoxFX; kidNuke = kidListenNukeFX; Elif(kid == kidListenVolMidi); yMax = kypListenVolMidiMax; yMin = kypListenVolMidiMin; yNuke = kypSliderNukeMidi; kidThumb = kidListenVolMidiThumb; kidAudition = kidListenEditBoxMidi; kidNuke = kidListenNukeMidi; Elif(kid == kidListenVolSpeechMM); yMax = kypListenVolSpeechMMMax; yMin = kypListenVolSpeechMMMin; yNuke = kypSliderNukeSpeechMM; kidThumb = kidListenVolSpeechMMThumb; kidAudition = kidListenEditBoxSpeechMM; kidNuke = kidListenNukeSpeechMM; Elif(kid == kidListenVolFXMM); yMax = kypListenVolFXMMMax; yMin = kypListenVolFXMMMin; yNuke = kypSliderNukeFXMM; kidThumb = kidListenVolFXMMThumb; kidAudition = kidListenEditBoxFXMM; kidNuke = kidListenNukeFXMM; End; ChangeStateGob(kid, kstSliderEnabled); ChangeStateGob(kidAudition, kstSliderEnabled); ChangeStateGob(kidNuke, kstSliderEnabled); // Only create the thumb gok if it doesn't exist yet. If(!FGobExists(kidThumb)); CreateChildGob(kid, kidThumb, kidThumb); End; FullDisplay = yNuke - yMin; NewDisplay = (_parm[2] * FullDisplay) / kvlmFull; yPos = yNuke - NewDisplay; MoveAbsGob(kidThumb, kxpSliderThumb, yPos); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownOn), "Speech slider - Pressed") While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, 4); GetYPos(yPos, kypListenVolSpeechMin, kypListenVolSpeechMax); MoveAbsGob(kidListenVolSpeechThumb, kxpSliderThumb, yPos); End; ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownUpOn), "Up on") GetYPos(yPos, kypListenVolSpeechMin, kypListenVolSpeechMax); FullDisplay = kypSliderNukeSpeech - kypListenVolSpeechMin + 1; NewDisplay = kypSliderNukeSpeech - yPos + 1; If(NewDisplay < 0); NewVolume = -1; Else; NewVolume = (kvlmFull * NewDisplay) / FullDisplay; End; EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolSpeech, NewVolume, 0, 0); EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeech, 1, 0, 0); ENDCHUNK ADOPT_ANIM(LAST_ANIM, CHID(kstSliderEnabled, kchidDownUpOff)) GOBCHUNK("Listener easel Speech volume slider thumb", kidListenVolSpeechThumb, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4vol1.bmp", kxpregListenerNuke, kypregListenerNuke ) GOBCHUNK("Listener easel FX volume slider", kidListenVolFX, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, krepMouseDnOn), cidNil, cnoNil) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstSliderEnabled, krepDefault), "Visible", kxpVolFXLeft, kypVolFXTop, kxpVolFXRight, kypVolFXBottom) REP_ANIM(CHID(kstSliderEnabled, kchidDownOn), "Down on") While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, 4); GetYPos(yPos, kypListenVolFXMin, kypListenVolFXMax); MoveAbsGob(kidListenVolFXThumb, kxpSliderThumb, yPos); End; ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownUpOn), "Up on") GetYPos(yPos, kypListenVolFXMin, kypListenVolFXMax); FullDisplay = kypSliderNukeFX - kypListenVolSpeechMin + 1; NewDisplay = kypSliderNukeFX - yPos + 1; If(NewDisplay < 0); NewVolume = -1; Else; NewVolume = (kvlmFull * NewDisplay) / FullDisplay; End; EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolFX, NewVolume, 0, 0); EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFX, 1, 0, 0); ENDCHUNK ADOPT_ANIM(LAST_ANIM, CHID(kstSliderEnabled, kchidDownUpOff)) CREATE_SCRIPT("Speech slider - create") ChangeStateThis(kstSliderInvisible); ENDCHUNK GOBCHUNK("Listener easel FX volume slider thumb", kidListenVolFXThumb, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4vol1.bmp", kxpregListenerNuke, kypregListenerNuke ) GOBCHUNK("Listener easel Midi volume slider", kidListenVolMidi, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, krepMouseDnOn), cidNil, cnoNil) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstSliderEnabled, krepDefault), "Visible", kxpVolMidiLeft, kypVolMidiTop, kxpVolMidiRight, kypVolMidiBottom) REP_ANIM(CHID(kstSliderEnabled, kchidDownOn), "Down on") While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, 4); GetYPos(yPos, kypListenVolMidiMin, kypListenVolMidiMax); MoveAbsGob(kidListenVolMidiThumb, kxpSliderThumb, yPos); End; ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownUpOn), "Up on") GetYPos(yPos, kypListenVolMidiMin, kypListenVolMidiMax); FullDisplay = kypSliderNukeMidi - kypListenVolSpeechMin + 1; NewDisplay = kypSliderNukeMidi - yPos + 1; If(NewDisplay < 0); NewVolume = -1; Else; NewVolume = (kvlmFull * NewDisplay) / FullDisplay; End; EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolMidi, NewVolume, 0, 0); EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxMidi, 1, 0, 0); ENDCHUNK ADOPT_ANIM(LAST_ANIM, CHID(kstSliderEnabled, kchidDownUpOff)) CREATE_SCRIPT("Speech slider - create") ChangeStateThis(kstSliderInvisible); ENDCHUNK GOBCHUNK("Listener easel Midi volume slider thumb", kidListenVolMidiThumb, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4vol1.bmp", kxpregListenerNuke, kypregListenerNuke ) GOBCHUNK("Listener easel speech motion matcher volume slider", kidListenVolSpeechMM, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, krepMouseDnOn), cidNil, cnoNil) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstSliderEnabled, krepDefault), "Visible", kxpVolSpeechMMLeft, kypVolSpeechMMTop, kxpVolSpeechMMRight, kypVolSpeechMMBottom) REP_ANIM(CHID(kstSliderEnabled, kchidDownOn), "Down on") While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, 4); GetYPos(yPos, kypListenVolSpeechMMMin, kypListenVolSpeechMMMax); MoveAbsGob(kidListenVolSpeechMMThumb, kxpSliderThumb, yPos); End; ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownUpOn), "Up on") GetYPos(yPos, kypListenVolSpeechMMMin, kypListenVolSpeechMMMax); FullDisplay = kypSliderNukeSpeechMM - kypListenVolSpeechMin + 1; NewDisplay = kypSliderNukeSpeechMM - yPos + 1; If(NewDisplay < 0); NewVolume = -1; Else; NewVolume = (kvlmFull * NewDisplay) / FullDisplay; End; EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolSpeechMM, NewVolume, 0, 0); EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeechMM, 1, 0, 0); ENDCHUNK ADOPT_ANIM(LAST_ANIM, CHID(kstSliderEnabled, kchidDownUpOff)) CREATE_SCRIPT("Speech slider - create") ChangeStateThis(kstSliderInvisible); ENDCHUNK GOBCHUNK("Listener easel SpeechMM volume slider thumb", kidListenVolSpeechMMThumb, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4vol1.bmp", kxpregListenerNuke, kypregListenerNuke ) GOBCHUNK("Listener easel FX motion matcher volume slider", kidListenVolFXMM, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, krepMouseDnOn), cidNil, cnoNil) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_RECT(CHID(kstSliderEnabled, krepDefault), "Visible", kxpVolFXMMLeft, kypVolFXMMTop, kxpVolFXMMRight, kypVolFXMMBottom) REP_ANIM(CHID(kstSliderEnabled, kchidDownOn), "Down on") While(GetModifierState() & fcustMouse); Cell(chidNil, 0, 0, 4); GetYPos(yPos, kypListenVolFXMMMin, kypListenVolFXMMMax); MoveAbsGob(kidListenVolFXMMThumb, kxpSliderThumb, yPos); End; ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, kchidDownUpOn), "Up on") GetYPos(yPos, kypListenVolFXMMMin, kypListenVolFXMMMax); FullDisplay = kypSliderNukeFXMM - kypListenVolSpeechMin + 1; NewDisplay = kypSliderNukeFXMM - yPos + 1; If(NewDisplay < 0); NewVolume = -1; Else; NewVolume = (kvlmFull * NewDisplay) / FullDisplay; End; EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolFXMM, NewVolume, 0, 0); EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFXMM, 1, 0, 0); ENDCHUNK ADOPT_ANIM(LAST_ANIM, CHID(kstSliderEnabled, kchidDownUpOff)) CREATE_SCRIPT("Speech slider - create") ChangeStateThis(kstSliderInvisible); ENDCHUNK GOBCHUNK("Listener easel FXMM volume slider thumb", kidListenVolFXMMThumb, kgokkRectNoHit) DEFAULT_POSITION( 0, 0, 10) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4vol1.bmp", kxpregListenerNuke, kypregListenerNuke ) // // Nuke speech button // GOBCHUNK("Listener easel nuke speech", kidListenNukeSpeech, kgokkRectHit) DEFAULT_POSITION( kxpListenNukeSpeech, kypListenNukeSpeech, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstSliderEnabled, kchidClick), cidNil, kttListenNukeSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4nuke.bmp", kxpregListenNukeSpeech, kypregListenNukeSpeech ) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstSliderEnabled, krepMouseDnOn), "studio\bmp\e4nukec.bmp", kxpregListenNukeSpeech, kypregListenNukeSpeech ) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Listener easel nuke speech - click", CHID(kstSliderEnabled, kchidClick)) MoveAbsGob(kidListenVolSpeechThumb, kxpSliderThumb, kypListenVolSpeechMax); EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolSpeech, -1, 0, 0); ENDCHUNK // // Nuke FX button // GOBCHUNK("Listener easel nuke FX", kidListenNukeFX, kgokkRectHit) DEFAULT_POSITION( kxpListenNukeFX, kypListenNukeFX, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstSliderEnabled, kchidClick), cidNil, kttListenNukeSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4nuke.bmp", kxpregListenNukeFX, kypregListenNukeFX ) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstSliderEnabled, krepMouseDnOn), "studio\bmp\e4nukec.bmp", kxpregListenNukeFX, kypregListenNukeFX ) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Listener easel nuke FX - click", CHID(kstSliderEnabled, kchidClick)) MoveAbsGob(kidListenVolFXThumb, kxpSliderThumb, kypListenVolFXMax); EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolFX, -1, 0, 0); ENDCHUNK // // Nuke Midi button // GOBCHUNK("Listener easel nuke Midi", kidListenNukeMidi, kgokkRectHit) DEFAULT_POSITION( kxpListenNukeMidi, kypListenNukeMidi, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstSliderEnabled, kchidClick), cidNil, kttListenNukeSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4nuke.bmp", kxpregListenNukeMidi, kypregListenNukeMidi ) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstSliderEnabled, krepMouseDnOn), "studio\bmp\e4nukec.bmp", kxpregListenNukeMidi, kypregListenNukeMidi ) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Listener easel nuke Midi - click", CHID(kstSliderEnabled, kchidClick)) MoveAbsGob(kidListenVolMidiThumb, kxpSliderThumb, kypListenVolMidiMax); EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolMidi, -1, 0, 0); ENDCHUNK // // Nuke speech motion matcher button // GOBCHUNK("Listener easel nuke speech motion matcher", kidListenNukeSpeechMM, kgokkRectHit) DEFAULT_POSITION( kxpListenNukeSpeechMM, kypListenNukeSpeechMM, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstSliderEnabled, kchidClick), cidNil, kttListenNukeSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4nuke.bmp", kxpregListenNukeSpeechMM, kypregListenNukeSpeechMM ) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstSliderEnabled, krepMouseDnOn), "studio\bmp\e4nukec.bmp", kxpregListenNukeSpeechMM, kypregListenNukeSpeechMM ) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Listener easel nuke speech motion matcher - click", CHID(kstSliderEnabled, kchidClick)) MoveAbsGob(kidListenVolSpeechMMThumb, kxpSliderThumb, kypListenVolSpeechMMMax); EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolSpeechMM, -1, 0, 0); ENDCHUNK // // Nuke FX motion matcher button // GOBCHUNK("Listener easel nuke FX motion matcher", kidListenNukeFXMM, kgokkRectHit) DEFAULT_POSITION( kxpListenNukeFXMM, kypListenNukeFXMM, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstSliderEnabled, kchidClick), cidNil, kttListenNukeSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4nuke.bmp", kxpregListenNukeFXMM, kypregListenNukeFXMM ) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(CHID(kstSliderEnabled, krepMouseDnOn), "studio\bmp\e4nukec.bmp", kxpregListenNukeFXMM, kypregListenNukeFXMM ) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Listener easel nuke FX motion matcher - click", CHID(kstSliderEnabled, kchidClick)) MoveAbsGob(kidListenVolFXMMThumb, kxpSliderThumb, kypListenVolFXMMMax); EnqueueCid(cidEaselVol, GidParGob(GidParThis()), kidListenVolFXMM, -1, 0, 0); ENDCHUNK // // Audition areas. // GOBCHUNK("Listener easel audition speech", kidListenEditBoxSpeech, gokkNoHitKids) DEFAULT_POSITION(kxpListenEditBoxSpeech, kypListenEditBoxSpeech, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, cidNil, cidNil, kttListenEditBoxSpeech) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4audit.bmp", kxpregListenEditBoxSpeech, kypregListenEditBoxSpeech) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(kcell1, "studio\bmp\e4auditc.bmp", kxpregListenEditBoxSpeech, kypregListenEditBoxSpeech) REP_MBMPREG(kcell2, "studio\bmp\e4audit.bmp", kxpregListenEditBoxSpeech, kypregListenEditBoxSpeech) // Ignore any btn down event in the audition area. REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOn), "Begin Rollover") // User wants an audition of this sound. EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeech, 1, 0, 0); Cell(kcell1, 0, 0, 0); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOff), "End Rollover while btn up") // End the audition of this sound. EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeech, 0, 0, 0); Cell(kcell2, 0, 0, 0); ENDCHUNK GOBCHUNK("Listener easel audition FX", kidListenEditBoxFX, gokkNoHitKids) DEFAULT_POSITION(kxpListenEditBoxFX, kypListenEditBoxFX, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, cidNil, cidNil, kttListenEditBoxFX) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4audit.bmp", kxpregListenEditBoxFX, kypregListenEditBoxFX) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(kcell1, "studio\bmp\e4auditc.bmp", kxpregListenEditBoxFX, kypregListenEditBoxFX ) REP_MBMPREG(kcell2, "studio\bmp\e4audit.bmp", kxpregListenEditBoxFX, kypregListenEditBoxFX ) REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOn), "Begin Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFX, 1, 0, 0); Cell(kcell1, 0, 0, 0); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOff), "End Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFX, 0, 0, 0); Cell(kcell2, 0, 0, 0); ENDCHUNK GOBCHUNK("Listener easel audition Midi", kidListenEditBoxMidi, gokkNoHitKids) DEFAULT_POSITION(kxpListenEditBoxMidi, kypListenEditBoxMidi, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, cidNil, cidNil, kttListenEditBoxMidi) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4audit.bmp", kxpregListenEditBoxMidi, kypregListenEditBoxMidi) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(kcell1, "studio\bmp\e4auditc.bmp", 0, 0) REP_MBMPREG(kcell2, "studio\bmp\e4audit.bmp", 0, 0) REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOn), "Begin Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxMidi, 1, 0, 0); Cell(kcell1, 0, 0, 0); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOff), "End Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxMidi, 0, 0, 0); Cell(kcell2, 0, 0, 0); ENDCHUNK GOBCHUNK("Listener easel audition speech motion matcher", kidListenEditBoxSpeechMM, gokkNoHitKids) DEFAULT_POSITION(kxpListenEditBoxSpeechMM, kypListenEditBoxSpeechMM, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, cidNil, cidNil, kttListenEditBoxSpeechMM) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4audit.bmp", kxpregListenEditBoxSpeechMM, kypregListenEditBoxSpeechMM) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(kcell1, "studio\bmp\e4auditc.bmp", 0, 0) REP_MBMPREG(kcell2, "studio\bmp\e4audit.bmp", 0, 0) REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOn), "Begin Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeechMM, 1, 0, 0); Cell(kcell1, 0, 0, 0); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOff), "End Rollover while btn up") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxSpeechMM, 0, 0, 0); Cell(kcell2, 0, 0, 0); ENDCHUNK GOBCHUNK("Listener easel audition FX motion matcher", kidListenEditBoxFXMM, gokkNoHitKids) DEFAULT_POSITION(kxpListenEditBoxFXMM, kypListenEditBoxFXMM, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, cidNil, cidNil, kttListenEditBoxFXMM) ENDCHUNK REP_RECT(CHID(kstSliderInvisible, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG(CHID(kstSliderEnabled, krepDefault), "studio\bmp\e4audit.bmp", kxpregListenEditBoxFXMM, kypregListenEditBoxFXMM) ADOPT_MBMP(LAST_MBMP, CHID(kstSliderEnabled, krepMouseDnOff)) REP_MBMPREG(kcell1, "studio\bmp\e4auditc.bmp", 0, 0) REP_MBMPREG(kcell2, "studio\bmp\e4audit.bmp", 0, 0) REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOn), "Begin Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFXMM, 1, 0, 0); Cell(kcell1, 0, 0, 0); ENDCHUNK REP_ANIM(CHID(kstSliderEnabled, krepMouseUpOff), "End Rollover") EnqueueCid(cidEaselPlay, GidParGob(GidParThis()), kidListenEditBoxFXMM, 0, 0, 0); Cell(kcell2, 0, 0, 0); ENDCHUNK // // Cancel button. // GOBCHUNK("Listener easel cancel", kidListenCancel, kgokkRectHit) DEFAULT_POSITION(kxpListenCancel, kypListenCancel, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselCancel) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4can.bmp", kxpregListenCancel, kypregListenCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e4canc.bmp", kxpregListenCancel, kypregListenCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoCancelWav, CHID(kstDefault, krepClicked)) CHILD_SCRIPT("Listener easel cancel", CHID(kstDefault, kchidClick)) EnqueueCid(cidEaselCancel, GidParGob(GidParThis()), 0, 0, 0, 0); ENDCHUNK // // Ok button. // GOBCHUNK("Listener easel ok", kidListenOk, kgokkRectHit) DEFAULT_POSITION(kxpListenOk, kypListenOk, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttEaselOk) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e4okay.bmp", kxpregListenOk, kypregListenOk) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e4okayc.bmp", kxpregListenOk, kypregListenOk) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoOkWav, CHID(kstDefault, krepClicked)) CHILD_SCRIPT("Listener easel ok", CHID(kstDefault, kchidClick)) EnqueueCid(cidEaselOk, GidParGob(GidParThis()), 0, 0, 0, 0); ENDCHUNK // // Tool indicators. // // Indicator Icon for Midi GOBCHUNK("Listener icon for Midi icon", kidListenMidiIcon, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cidNil) ENDCHUNK REP_RECT(CHID(kstDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG( CHID( kstListenLooper, krepDefault ), "studio\bmp\e4loop.bmp",0,0 ) REP_MBMPREG( CHID( kstListenSounderChain, krepDefault ), "studio\bmp\e4queue.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenMatcher, krepDefault ), "studio\bmp\e4mm.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenSounder, krepDefault ), "studio\bmp\e4snd.bmp", 0,0 ) // Indicator Icon for speech GOBCHUNK("Listener icon for speech icon", kidListenSpeechIcon, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cidNil) ENDCHUNK REP_RECT(CHID(kstDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG( CHID( kstListenLooper, krepDefault ), "studio\bmp\e4loop.bmp",0,0 ) REP_MBMPREG( CHID( kstListenSounderChain, krepDefault ), "studio\bmp\e4queue.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenMatcher, krepDefault ), "studio\bmp\e4mm.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenSounder, krepDefault ), "studio\bmp\e4snd.bmp", 0,0 ) // Indicator Icon for FX GOBCHUNK("Listener easel FX icon", kidListenFXIcon, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cidNil) ENDCHUNK REP_RECT(CHID(kstDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG( CHID( kstListenLooper, krepDefault ), "studio\bmp\e4loop.bmp",0,0 ) REP_MBMPREG( CHID( kstListenSounderChain, krepDefault ), "studio\bmp\e4queue.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenMatcher, krepDefault ), "studio\bmp\e4mm.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenSounder, krepDefault ), "studio\bmp\e4snd.bmp", 0,0 ) // Indicator Icon for speech MM GOBCHUNK("Listener easel Speech MM Icon", kidListenSpeechMMIcon, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cidNil) ENDCHUNK REP_RECT(CHID(kstDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG( CHID( kstListenLooper, krepDefault ), "studio\bmp\e4loop.bmp",0,0 ) REP_MBMPREG( CHID( kstListenSounderChain, krepDefault ), "studio\bmp\e4queue.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenMatcher, krepDefault ), "studio\bmp\e4mm.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenSounder, krepDefault ), "studio\bmp\e4snd.bmp", 0,0 ) // Indicator Icon for FX motion matcher GOBCHUNK("Listener easel FX MM Icon", kidListenFXMMIcon, kgokkRectHit) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cidNil) ENDCHUNK REP_RECT(CHID(kstDisabled, krepDefault), "hidden", 0, 0, 0, 0) REP_MBMPREG( CHID( kstListenLooper, krepDefault ), "studio\bmp\e4loop.bmp",0,0 ) REP_MBMPREG( CHID( kstListenSounderChain, krepDefault ), "studio\bmp\e4queue.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenMatcher, krepDefault ), "studio\bmp\e4mm.bmp", 0,0 ) REP_MBMPREG( CHID( kstListenSounder, krepDefault ), "studio\bmp\e4snd.bmp", 0,0 ) // // // Sound Recorder easel // // // Recorder easel's very own glass // GOBCHUNK("Recorder easel pane of glass", kidRecordGlass, kgokkRectHit) DEFAULT_POSITION(0, 0, 100) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, CHID(kstDefault, kchidClick), cidNil, cnoNil) ENDCHUNK REP_FILL( CHID(kstDefault, krepDefault ), "Max", 0,0, kdxpBackground, kdypBackground, Transparent, Palette( 73 )) PATTERN_50 ENDCHUNK CREATE_SCRIPT("Recorder easel - create") CreateChildThis(kidRecordBackground, kidRecordBackground); ENDCHUNK CHILD_SCRIPT("Glass clicked", CHID(kstDefault, kchidClick)) PlaySoundGob(kidBackground, kctgWave, kwavSplot, 0, 0x10000, 1, 0, 1); ENDCHUNK // // Recorder easel background // GOBCHUNK("Record easel background", kidRecordBackground, kgokkRectHit) DEFAULT_POSITION(kxpRecordBackground, kypRecordBackground, 200) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, chidNil, cidNil, cnoNil) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault ), "studio\bmp\e5par.bmp", 0, 0) ADOPT_WAVE(kcnoEzlOpenWav, CHID(kstDefault, krepEnterAnimation)) CREATE_SCRIPT("Recorder easel background created") // Create the sound length indicator controls. CreateChildThis(kidRecordSoundLength, kidRecordSoundLength); // Create the sound name control. CreateChildThis(kidRecordSoundName, kidRecordSoundName); // Create the four buttons that lie across the bottom of the easel. CreateChildThis(kidRecordRecord, kidRecordRecord); CreateChildThis(kidRecordPlay, kidRecordPlay); CreateChildThis(kidRecordCancel, kidRecordCancel); CreateChildThis(kidRecordOk, kidRecordOk); // help balloon If (!::fHelpOn); CreateHelpGob(kidBackground, ktpcEaselHelp37); End; ENDCHUNK // // Sound length area. // GOBCHUNK("Recorder easel sound length", kidRecordSoundLength, gokkNoHitKids) DEFAULT_POSITION(0, 0, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsArrow, cidNil, cidNil, kttRecordSoundLength) ENDCHUNK REP_FILL( CHID(kstDefault, krepDefault ), "default", kxpRecordSoundLengthLeft, kypRecordSoundLengthTop, kxpRecordSoundLengthRight, kypRecordSoundLengthBottom, Palette( 11 ), Transparent) PATTERN_100 ENDCHUNK CREATE_SCRIPT("Create recorder length") // Filter for length setting command. FilterCmdsThis(cidRecordSetLength, cidNil, kchidScript1); ENDCHUNK CHILD_SCRIPT("par / filter cids", kchidScript1) // Fill the length thermometer as required. MaxWidth = kxpRecordSoundLengthRight - kxpRecordSoundLengthLeft + 1; NewWidth = (MaxWidth * _parm[2]) / 100; ResizeThis( NewWidth, kypRecordSoundLengthBottom - kypRecordSoundLengthTop + 1 ); ENDCHUNK // // Parent rectangle for the sound name edit box. // OBJECT("Recorder easel sound name", kidRecordSoundName, 100, kcrsArrow) REP_RECT(CHID(kstDefault, krepDefault), "Visible", kxpRecordSoundNameLeft, kypRecordSoundNameTop, kxpRecordSoundNameRight, kypRecordSoundNameBottom) // // Record button. // GOBCHUNK("Recorder easel record", kidRecordRecord, kgokkRectHit) DEFAULT_POSITION(kxpRecordRecord, kypRecordRecord, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttRecordRecord) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e5mike.bmp", kxpregRecordRecord, kypregRecordRecord) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e5mikes.bmp", kxpregRecordRecord, kypregRecordRecord) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) CHILD_SCRIPT("Recorder easel Record", CHID(kstDefault, kchidClick)) EnqueueCid(cidEaselRecord, kidRecordGlass, 0, 0, 0, 0); // Set the state of both the record and play buttons here, // to prevent the two buttons being momentarily down simultaneously. ChangeStateGob(kidRecordPlay, kstDefault); ChangeStateGob(kidRecordRecord, kstSelected); ENDCHUNK // // Play button. // GOBCHUNK("Recorder easel play", kidRecordPlay, kgokkRectHit) DEFAULT_POSITION(kxpRecordPlay, kypRecordPlay, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttRecordPlay) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e5play.bmp", kxpregRecordPlay, kypregRecordPlay) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e5plays.bmp", kxpregRecordPlay, kypregRecordPlay) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoRPlayWav, CHID(kstDefault, krepClicked)) ADOPT_WAVE(kcnoRPlayWav, CHID(kstSelected, krepClicked)) CHILD_SCRIPT("Recorder easel Play", CHID(kstDefault, kchidClick)) EnqueueCid(cidEaselPlay, kidRecordGlass, 0, 0, 0, 0); // Set the state of both the record and play buttons here, // to prevent the two buttons being momentarily down simultaneously. ChangeStateGob(kidRecordRecord, kstDefault); ChangeStateGob(kidRecordPlay, kstSelected); ENDCHUNK // // Cancel button. // GOBCHUNK("Recorder easel cancel", kidRecordCancel, kgokkRectHit) DEFAULT_POSITION(kxpRecordCancel, kypRecordCancel, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttRecordEaselCancel) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e5can.bmp", kxpregRecordCancel, kypregRecordCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e5canc.bmp", kxpregRecordCancel, kypregRecordCancel) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoCancelWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Recorder easel cancel") EnqueueCid(cidEaselCancel, kidRecordGlass, 0, 0, 0, 0); ENDCHUNK // // Ok button. // GOBCHUNK("Recorder easel ok", kidRecordOk, kgokkRectHit) DEFAULT_POSITION(kxpRecordOk, kypRecordOk, 10) ACTION(fcustNil, fcustNil, fgrfstAll, kcrsHand, CHID(kstDefault, kchidClick), cidNil, kttRecordEaselOk) ENDCHUNK REP_MBMPREG(CHID(kstDefault, krepDefault), "studio\bmp\e5okay.bmp", kxpregRecordOk, kypregRecordOk) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseUpOn)) ADOPT_MBMP(LAST_MBMP, CHID(kstDefault, krepMouseDnOff)) REP_MBMPREG(CHID(kstDefault, krepMouseDnOn), "studio\bmp\e5okayc.bmp", kxpregRecordOk, kypregRecordOk) ADOPT_MBMP(LAST_MBMP, CHID(kstSelected, krepDefault)) ADOPT_WAVE(kcnoOkWav, CHID(kstDefault, krepClicked)) CLICK_SCRIPT("Recorder easel ok") EnqueueCid(cidEaselOk, kidRecordGlass, 0, 0, 0, 0); ENDCHUNK