home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Contrib / BgImage / BgImage.txt < prev    next >
Text File  |  2003-11-18  |  3KB  |  96 lines

  1. BgImage.DLL - NSIS extension DLL
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4. Displays an image or a gradient with user defined texts and/or images behind the NSIS window.
  5. Can also play WAVs.
  6.  
  7. See Example.nsi for a usage example.
  8.  
  9. Usage
  10. ~~~~~
  11.  
  12. 1) Call SetBg to set the background
  13. 2) Call AddText, or AddImage to add texts and images
  14. 3) Call Redraw to update the background window
  15. 4) Optional - repeat steps 2-3 to add more images
  16.            -or-
  17.    call Clear and repeat steps 1-3 for a completely new background.
  18. 5) Call Destroy when the background is no longer required (.onGUIEnd for example)
  19.  
  20. Notes
  21. ~~~~~
  22.  
  23. * All but the last used function (which should be Destroy) must use /NOUNLOAD so the image window won't be destroyed before it should. 
  24.  
  25. * This plugin requires NSIS 2.0b4 and above.
  26.  
  27. * Do not call SetBg (which creates the window) from a section or a function called by a section.
  28.  
  29. * Never use /NOUNLOAD in .onInstSuccess and .onInstFailed. Failing to do so will cause the installer to crash.
  30.   This means you should not call Destroy from .onInstSuccess or .onInstFailed.
  31.  
  32. Available functions
  33. ~~~~~~~~~~~~~~
  34.  
  35. SetBg [/FILLSCREEN|/TILED] path_to_bitmap
  36. SetBg /GRADIENT R G B R G B
  37.    Sets the background and creates the window if necessary
  38.    Use /FILLSCREEN to make the image fill the screen
  39.    Use /TILED to set a tiled background
  40.    Use /GRADIENT to set a gradient background
  41.  
  42.    If SetReturn on was called returns "success" on the stack
  43.      or an error string if there was an error
  44.  
  45.    Do not use in .onInit!
  46.  
  47. AddImage [/TRANSPARENT R G B] path_to_bitmap X Y
  48.    Adds an image to the background window at (X,Y)
  49.      X and Y can be negative to specify distance from right/bottom
  50.    Use /TRANSPARENT to make BgImage draw the image transparently
  51.      Define the transparent color using R G B
  52.  
  53.    If SetReturn on was called returns "success" on the stack
  54.      or an error string if there was an error
  55.  
  56. AddText text font_handle R G B X Y X Y
  57.   Adds text to the background window
  58.   Use NSIS's CreateFont to create a font and pass it as font_handle
  59.   Use R G B to set the text color
  60.   The first X Y is for the top left corner of the text box
  61.   The second X Y is for the bottom right corner of the text box
  62.   X and Y can be negative to specify distance from right/bottoms
  63.  
  64.   If SetReturn on was called returns "success" on the stack
  65.      or an error string if there was an error
  66.  
  67. Clear
  68.    Clears all of the current background, images and texts
  69.  
  70. Destroy
  71.    Destroys the current background window
  72.    Destroy calls Clear automatically
  73.  
  74. Sound [/WAIT|/LOOP] path_to_wav
  75. Sound /STOP
  76.    Plays a wave file
  77.    Use /WAIT to wait for the sound to finish playing
  78.    Use /LOOP to loop the sound
  79.    Use Sound /STOP to stop the loop
  80.  
  81. SetReturn on|off
  82.    Enable return values from SetBg, AddImage and AddText
  83.    Default value is off because all of the possible errors
  84.      are either things you should handle when debugging your script
  85.      such as "can't load bitmap" or errors you can do nothing about
  86.      such as "memory allocation error"
  87.  
  88. Credits
  89. ~~~~~~~
  90.  
  91. Coded by Amir Szekely, aka KiCHiK
  92.  
  93. Ximon Eighteen, aka Sunjammer - Fixed window title bar issues
  94. iceman_k - Text idea and original implementation
  95. Lajos Molnar, aka orfanik - Tile idea and original implementation
  96. Jason Reis - Coding help