home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 June / PCOnline_06_1996.iso / mrmore / mrmore.dir / 00002_Script_2 < prev    next >
Text File  |  1996-04-11  |  4KB  |  136 lines

  1. -- Popup-Script
  2.  
  3. on CheckForPopup
  4.   global gbPopIsOn
  5.   
  6.   if gbPopIsOn then return true
  7.   return false
  8. end
  9.  
  10.  
  11. on DoPopupAnim  --  ******************************************************************  animation popup
  12.   global gnAnimatePopup, gnPopupGrafik, gnLastPopupAnim
  13.   
  14.   if gnAnimatePopup > 0 and the timer > gnLastPopupAnim + 3*60 then
  15.     set gnLastPopupAnim = the timer
  16.     set s = the filename of cast the castNum of sprite gnPopupGrafik
  17.     --    set sExt = char length(s)-3 to length(s) of s
  18.     set s = char 1 to length(s)-4 of s
  19.     set nFrame = value(char length(s) of s)
  20.     set nFrame = nFrame + 1
  21.     if nFrame > gnAnimatePopup then set nFrame = 1
  22.     
  23.     set the filename of cast the castNum of sprite gnPopupGrafik = char 1 to length(s)-1 of s & string(nFrame)
  24.     updatestage
  25.     
  26.   end if
  27.   
  28. end
  29.  
  30.  
  31. on InitWaitWindow sType, sCont -- *************************************************************** wait-window 
  32.   global gnPopupFrame, gbPopIsOn, gnPopupText
  33.   
  34.   ClosePopup()
  35.   
  36.   if the castNum of sprite gnPopupText > 0 then
  37.     set the puppet of sprite gnPopupText = true
  38.     set the text of cast the castNum of sprite gnPopupText = "installing: " & sCont & return & "0 %"
  39.     set the locH of sprite gnPopupText = 180
  40.     set the locV of sprite gnPopupText = 220
  41.   end if
  42.   
  43.   if the castNum of sprite gnPopupFrame > 0 then
  44.     set the puppet of sprite gnPopupFrame = true
  45.     set the castNum of sprite gnPopupFrame = the number of cast "PopupRahmen II"
  46.     set the locH of sprite gnPopupFrame = 148
  47.     set the locV of sprite gnPopupFrame = 190
  48.   end if
  49.   
  50.   updateStage
  51.   set gbPopIsOn = true
  52. end
  53.  
  54.  
  55. on LoadPopup sKategorie, sName, sGrafik, sText, nAnim    -- ***********************************  popup laden
  56.   global gnPopupFrame, gnEinkaufsknopf, gbPopIsOn, gnPopupGrafik, gnPopupAus, gsDefPath
  57.   global gnPopupInstall, gsPopupType, gsPopupCont, gnPopupText, gnAnimatePopup, gnLastPopupAnim
  58.   
  59.   cursor 4
  60.   
  61.   if not gbPopIsOn then
  62.     set gnLastPopupAnim = the timer
  63.     set gnAnimatePopup = nAnim
  64.     set the puppet of sprite gnPopupFrame = true
  65.     --  set the puppet of sprite gnEinkaufsknopf = true
  66.     set the puppet of sprite gnPopupGrafik = true
  67.     set the puppet of sprite gnPopupAus = true
  68.     set the puppet of sprite gnPopupInstall = true
  69.     
  70.     set the castNum of sprite gnPopupFrame = the number of cast "PopupRahmen I"
  71.     
  72.     set the locH of sprite gnPopupFrame = 242
  73.     -- set the locH of sprite gnEinkaufsknopf = 244
  74.     set the locH of sprite gnPopupInstall = 270
  75.     set the locH of sprite gnPopupAus = 466
  76.     
  77.     set the locV of sprite gnPopupFrame = 17
  78.     set the locV of sprite gnPopupAus = 427
  79.     set the locV of sprite gnPopupInstall = 427
  80.     --    set the locV of sprite gnEinkaufsknopf = 429
  81.     
  82.     if sGrafik <> "" then
  83.       set the fileName of cast "PopupGrafik" = gsDefPath&sGrafik
  84.       set the puppet of sprite gnPopupGrafik = true
  85.       if sKategorie = "font" then 
  86.         set the locH of sprite gnPopupGrafik = 285
  87.         set the locV of sprite gnPopupGrafik = 120
  88.       else
  89.         set the locH of sprite gnPopupGrafik = 270
  90.         set the locV of sprite gnPopupGrafik = 25
  91.       end if
  92.     end if
  93.     
  94.     if sText <> "" then
  95.       set the text of cast "PopupText" = sText
  96.       set the puppet of sprite gnPopupText = true
  97.       set the locH of sprite gnPopupText = 275
  98.       set the locV of sprite gnPopupText = 30
  99.     end if
  100.     
  101.     set gsPopupType = sKategorie
  102.     set gsPopupCont = sName
  103.     set gbPopIsOn = true
  104.     updateStage
  105.     
  106.   end if
  107.   
  108.   cursor 0
  109.   
  110.   put "Popup loaded!"  
  111. end
  112.  
  113.  
  114. on ClosePopup  -- ****************************************** popup schlie▀en
  115.   global gnPopupFrame, gnEinkaufsknopf, gbPopIsOn, gnPopupGrafik, gnPopupAus
  116.   global gnPopupInstall, gnLastPopupAnim, gnPopupText
  117.   
  118.   if  gbPopIsOn then
  119.     --    put "closing"
  120.     set the locH of sprite gnPopupFrame = -2000
  121.     set the locH of sprite gnEinkaufsknopf = -2000
  122.     set the locH of sprite gnPopupGrafik = -2000
  123.     set the locH of sprite gnPopupText = -2000
  124.     set the locH of sprite gnPopupAus = -2000
  125.     set the locH of sprite gnPopupInstall = -2000
  126.     
  127.     set gnLastPopupAnim = 0
  128.     
  129.     set gbPopIsOn = false
  130.     updateStage
  131.   end if
  132.   
  133. end
  134.  
  135.  
  136.