home *** CD-ROM | disk | FTP | other *** search
/ 3D World 124 / 3DW_124.iso / pc / Interface / POPUP.dir / 00004_ouid.ls < prev    next >
Encoding:
Text File  |  2009-03-18  |  831 b   |  35 lines

  1. on loadTextFile aPath
  2.   t = getNetText(aPath)
  3.   if netDone(t) then
  4.     txt = netTextResult(t)
  5.     member("popup_title").text = txt.line[1]
  6.     member("popup_info").text = txt.line[2..txt.line.count]
  7.     parseFormatInfo(member("popup_info"))
  8.     sprite(2).pFormat()
  9.   end if
  10. end
  11.  
  12. on parseFormatInfo aTxt
  13.   greenStart = 0
  14.   i = 1
  15.   aTxt.fontSize = 14
  16.   aTxt.antialias = 1
  17.   aTxt.antiAliasThreshold = 1
  18.   aTxt.font = "WeddingSans Medium *"
  19.   aTxt.color = rgb(0, 0, 0)
  20.   repeat while i <= aTxt.char.count
  21.     if aTxt.char[i] = "<" then
  22.       greenStart = i
  23.     end if
  24.     if aTxt.char[i] = ">" then
  25.       if greenStart > 0 then
  26.         aTxt.char[greenStart..i].color = rgb(255, 255, 255)
  27.         delete aTxt.char[greenStart]
  28.         delete aTxt.char[i - 1]
  29.         greenStart = 0
  30.       end if
  31.     end if
  32.     i = i + 1
  33.   end repeat
  34. end
  35.