We are working on converting the wiki to a static website controlled by markdown files in https://github.com/nsis-community. You can already see there how plug-ins will be posted. The end-user interface will still be a website but with a fresh coat of paint. Come meet us at Discord to talk about it.

Underline text in LogWindow

From NSIS Wiki
Jump to navigationJump to search
Author: Afrow UK (talk, contrib)


Description

This function will underline text with a specified character (uses "=" as default) Use Fixedsys for the LogWindow font, so that each character is evenly spaced. (To set the LogWindow font to Fixedsys, use the function Change Log Window Font)

Usage

  Push [string] ;string to underline
  Call UnderlineText

The Function

Function UnderlineText
  Exch $0
  Push $1
  Push $2
  Push $3
 
  DetailPrint "$0"
 
  StrLen $2 $0
  StrCpy $1 "=" #("=" is underline character)
 
  loop:
  StrCpy $1 "$1=" #underline text ("=" is underline character)
  StrLen $3 $1
  StrCmp $3 $2 done loop
  done:
 
  DetailPrint "$1"
 
  Pop $3
  Pop $2
  Pop $1
  Pop $0
FunctionEnd

Originally wrote for my D-Day Stats Logger v1.00

-Stu