下载吧编程开发

分类分类

NSIS水纹特效

2014-06-06 17:19作者:下载吧

NSIS的强大在于其可以很好的与C类语言结合,这不在NSIS中实现的水纹特效脚本正说明了这一特性,使用已经开发好的插件,我们可以在不使用过多精力去开发相应组件功能的同时又可以享受插件中强大接口的成果,流水涤波浪,细叶逐纹路,当鼠标轻轻划过一滴滴,一圈圈引人入胜,教人耳目一新,画面在眼前模糊,风景在水里飘过...
NSIS水纹特效
/*

脚本编写:zhfi
特别感谢:Restools,X-Star
*/

!AddPluginDir "."
!AddIncludeDir "."

!include MUI2.nsh

; --------------------------------------------------
; General settings.

Name "WaterCtrl_Test Example"
OutFile "WaterCtrl_Test.exe"
SetCompressor /SOLID lzma    

ReserveFile "${NSISDIR}Pluginssystem.dll"
ReserveFile waterctrl.dll

;SetFont tahoma 8

; --------------------------------------------------
; MUI interface settings.
 !define MUI_FINISHPAGE_NOAUTOCLOSE
; --------------------------------------------------
; Insert MUI pages.
!define MUI_WELCOMEFINISHPAGE_BITMAP WizModernImage-Is.bmp

; Installer pages
!define MUI_PAGE_CUSTOMFUNCTION_PRE pre
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave
 !insertmacro MUI_PAGE_WELCOME

 !insertmacro MUI_PAGE_INSTFILES

!define MUI_PAGE_CUSTOMFUNCTION_Pre pre
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leave
 !insertmacro MUI_PAGE_FINISH

; --------------------------------------------------
; Languages.

 !insertmacro MUI_LANGUAGE "SimpChinese"

Function .onGUIEnd
SetPluginUnload manual
waterctrl::disablewater
System::Free
FunctionEnd

Function .onInit
InitPluginsDir
SetOutPath $PLUGINSDIR
File waterctrl.dll
SetOutPath $TEMP
FunctionEnd

Function Pre
  System::Call 'user32::LoadImage(i,t,i,i,i,i,) i (0,"$PLUGINSDIRmodern-wizard.bmp",0,0,0,0x2010) .s'
Pop $R0
 System::Call '$PLUGINSDIRwaterctrl::enablewater(i,i,i,i,i,i) i ($HWNDPARENT,0,0,$R0,3,50)'
 System::Call '$PLUGINSDIRwaterctrl::setwaterparent(i $HWNDPARENT)'
 System::Call '$PLUGINSDIRwaterctrl::flattenwater()'
 System::Call '$PLUGINSDIRwaterctrl::waterblob(i,i,i,i) i (70,198,10,1000)'
FunctionEnd

Function leave
 System::Call '$PLUGINSDIRwaterctrl::disablewater()'
FunctionEnd

 Section "Dummy" SecDummy
 SectionEnd


 

展开全部

相关教程