nsDialogs: the next InstallOptions
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5199 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
edd3c299f7
commit
74bf17be17
15 changed files with 1832 additions and 0 deletions
76
Contrib/nsDialogs/example.nsi
Normal file
76
Contrib/nsDialogs/example.nsi
Normal file
|
@ -0,0 +1,76 @@
|
|||
!include nsDialogs.nsh
|
||||
!include LogicLib.nsh
|
||||
|
||||
Name "nsDialogs Example"
|
||||
OutFile "nsDialogs Example.exe"
|
||||
|
||||
XPStyle on
|
||||
|
||||
Page license
|
||||
Page custom nsDialogsPage
|
||||
|
||||
Var BUTTON
|
||||
Var EDIT
|
||||
Var CHECKBOX
|
||||
|
||||
Function nsDialogsPage
|
||||
|
||||
nsDialogs::Create /NOUNLOAD 1018
|
||||
Pop $0
|
||||
|
||||
GetFunctionAddress $0 OnBack
|
||||
nsDialogs::OnBack /NOUNLOAD $0
|
||||
|
||||
${NSD_CreateButton} 0 0 100% 12u Test
|
||||
Pop $BUTTON
|
||||
GetFunctionAddress $0 OnClick
|
||||
nsDialogs::OnClick /NOUNLOAD $BUTTON $0
|
||||
|
||||
${NSD_CreateText} 0 35 100% 12u hello
|
||||
Pop $EDIT
|
||||
GetFunctionAddress $0 OnChange
|
||||
nsDialogs::OnChange /NOUNLOAD $EDIT $0
|
||||
|
||||
${NSD_CreateCheckbox} 0 -50 100% 8u Test
|
||||
Pop $CHECKBOX
|
||||
GetFunctionAddress $0 OnCheckbox
|
||||
nsDialogs::OnClick /NOUNLOAD $CHECKBOX $0
|
||||
|
||||
${NSD_CreateLabel} 0 40u 75% 40u "* Type `hello there` above.$\n* Click the button.$\n* Check the checkbox.$\n* Hit the Back button."
|
||||
Pop $0
|
||||
|
||||
nsDialogs::Show
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function OnClick
|
||||
|
||||
MessageBox MB_OK clicky
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function OnChange
|
||||
|
||||
System::Call user32::GetWindowText(i$EDIT,t.r0,i${NSIS_MAX_STRLEN})
|
||||
|
||||
${If} $0 == "hello there"
|
||||
MessageBox MB_OK "right back at ya"
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function OnBack
|
||||
|
||||
MessageBox MB_YESNO "are you sure?" IDYES +2
|
||||
Abort
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function OnCheckbox
|
||||
|
||||
MessageBox MB_OK "checkbox clicked"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Section
|
||||
SectionEnd
|
Loading…
Add table
Add a link
Reference in a new issue