home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 June / PCOnline_06_1996.iso / mrmore / mrmore.dir / 00027_Script_27 < prev    next >
Text File  |  1996-04-11  |  714b  |  25 lines

  1. -- Font Popup laden
  2.  
  3. on mouseDown
  4.   global gnFirstSprite
  5.   
  6.   ClosePopup()
  7.   
  8.   set nTextVPos =  the locV of sprite the clickOn
  9.   set nTextHeight = the textheight of field the castNum of sprite the clickon
  10.   
  11.   set n = (the mouseV - nTextVPos) / nTextHeight + 1
  12.   if n < 1 then exit
  13.   
  14.   set sFontName = line n of the text of field the castNum of sprite the clickOn
  15.   if sFontName = "" then exit
  16.   
  17.   set sFileName = "clips\font\" & MakeFontFileName(sFontName) & ".bmp"
  18.   
  19.   set the puppet of sprite (gnFirstSprite + 2) = true
  20.   set the locV of sprite (gnFirstSprite + 2) = nTextVPos + nTextHeight * n - nTextHeight/2
  21.   updateStage
  22.   
  23.   LoadPopup("font", sFontName, sFileName, "", 0)
  24.   
  25. end