Marquee plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
Line 46: Line 46:


:; /STEP=x
:; /STEP=x
:: Text movement step, negative for left2right, higher value = faster scroll, default is 1 pixel. /STEP=0 sets /START=CENTER
:: Text movement step, negative for left2right, higher value = faster scroll, default is 1 pixel. Default /START value for /STEP=0 is CENTER.


:; /INTERVAL=xx
:; /INTERVAL=xx

Revision as of 06:21, 21 July 2005

Author: Takhir (talk, contrib)


Links

Download:
Marquee.zip (9 KB)
Forum thread

Description

Result looks like marquee tag on the html page, scrolling text. Some animation on the INSTFILES page during long installs may be useful (but this is applicable to other pages as well, for example as a help text near some controls), attached plug-in is one of possible ways. Text length to be displayed may be big enough, limited by NSIS 'stringsize' parameter, 1024 and 8096 bytes for common and special NSIS builds. 18 parameters define text, border, font and scroll. The only big limitation I see now - horizontal scroll only (both directions). Extended functionality (compare to html tag) - bi-directional movement (/swing).

Syntax

"start" DLL function

Marquee::start [params] "text to display"

Starts the text movement.

[params]
Parameters. Can be any of the following:
/FACE=FontFace
Typeface name of font, default is Times (meaning Times New Roman).
/COLOR=xxxxxx
Font color, hex value RGB, FF0000 is red, default - current system color.
/HEIGHT=xxx
Height, in logical units, of the font's character cell or character, default is 18.
/WIDTH=xxx
Average char width, in logical units, set -1 to use current system font, default is 10.
/WEIGHT=xxx
Weight of the font in the range 0 through 1000, default is 600 (FW_SEMIBOLD, WINGDI.H).
/CHARSET=xxx
Character set, default is 0 (ANSI_CHARSET, WINGDI.H).
/ITALIC
Italic font, default is no italic font.
/UNDERLINE
Underlined font, defalt is no.
/SCROLLS=x
Number of text scrolls, set 1 for once, default is 0 (non-stop).
/STEP=x
Text movement step, negative for left2right, higher value = faster scroll, default is 1 pixel. Default /START value for /STEP=0 is CENTER.
/INTERVAL=xx
Text movement interval (between jumps), lower value = faster scroll, default is 20 milliseconds.
/LEFT=x
Additional left spacer, percents of the dialog width, default is 0 (%).
/RIGHT=x
Additional right spacer, percents of the dialog width, default is left spacer value.
/TOP=xx
Text top spacer, percents of the dialog client area height, default is 60 (%).
/BORDER=x
Displays "x" pixel(s) border rectangle.
/SPACER=x
"x" pixels spacer between text clipping rect and border, 0 if border not set, default is 1.
/BCOL=xxxxxx
Border color, default is text color.
/SWING
bi-directional movement
/START={RIGHT|LEFT|CENTER}
start position inside rectangle (for /step=0 mainly). Default position is outside paint rectangle
"text to display"
Max length 1024 or 8096.

"stop" DLL function

Marquee::stop

Stops the text movement.

Example

   Marquee::start /NOUNLOAD /color=0000b0 /top=80 "Marquee plug-in"
;  add you code here
   Marquee::stop