#include "Content\\ShellScripts\\stddefs.h" #define nMSG_StopMovie 69 #define nMSG_MovieStop 70 main { GUI_CREATE { object o_cinema = cinema_script focus(o_cinema) } GUI_DRAW { setpencolor(0,0,0,255) drawrect 0,0 to getresx(),74 drawrect 0,(getresy() - 74) to getresx(), getresy() } } cinema_script { GUI_CREATE { @mouse@pointer.showMousePointer = 0 stop 0 location = 0, 73, 0 movie cinema = szPATH_MOVIES "Gameopen.mpg" scale (cinema) = 167, 167, 100 play cinema region = 0,0 to 800,600 framerate = 30 int mstop } LBUTTON_UPDATE { if (mouse.left == BUTTON_PRESSED) { spew "left click" mail(nMSG_StopMovie,this) } } GUI_DRAW { render cinema,location//,0,30 } GUI_MAILBOX { if (mstop ==1) { return } if (getmessage() == nMSG_StopMovie || getmessage() == nMSG_MovieStop) { mstop = 1 stop cinema unfocus if(exists(@CampaignScreen@)) { if (getvolume(0)) loop @SHELL@music, 0 script_continue @CampaignScreen@ script_end } if(exists(@Cinema_Credits@)) { if (getvolume(0)) loop @SHELL@music, 0 script_continue @Cinema_Credits@ script_end } @mouse@pointer.showMousePointer = 1 } } GUI_EXECUTE { if (getstatus(cinema) == 3) { unfocus if (getvolume(0)) loop @SHELL@music, 0 @SHELL@currentScreen = @SHELL@lastScreen[@SHELL@lastScreenDepth] if (@SHELL@lastScreenDepth > 0) { @SHELL@lastScreenDepth-- } @MOUSE@pointer.showMousePointer = 1 } } GUI_CHAR { int ch = getchar() if (ch == char(" ")) // only escape or space exit the cinema { mail(nMSG_StopMovie,this) } if (ch == 27) { mail(nMSG_StopMovie,this) } } }