软件发布| 专题库| 优优资讯| 苹果专区| 安卓专区| 软件下载| 首页
优优资讯 电脑教程 安卓教程 安卓攻略 苹果教程 苹果攻略 新闻资讯

NSIS入门之水纹特效脚本语言

时间:2015-02-06 来源:本站整理 我要评论

    NSIS工具中提供了丰富的脚本范例,包括火焰、水纹特效等等。今天我们就来看看如何用脚本语言实现水纹特效。为了方便用户使用和掌握,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


用户评论

(已有0条评论)
表情
注:您的评论需要经过审核才能显示哦,请文明发言!
还没有评论,快来抢沙发吧!
快速检索
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z