当前位置:首页>优优资讯 > 软件教程 > 电脑软件教程 > NSIS入门之如何编写脚本语言实现火焰效果

NSIS入门之如何编写脚本语言实现火焰效果

作者:本站整理 时间:2015-02-06

    怎样给画面中添加火焰特效呢?接下来小编就跟大家分享如何编写NSIS脚本语言实现火焰效果,有兴趣的用户可以在电脑上试下。火焰特效在影视作品中应用得非常普遍,让画面显得更加逼真。那么在NSIS环境中是否能够通过脚本语言实现这种特效呢?今天我们就继续讲解NSIS的入门课程,看看如何编写脚本语言实现火焰效果。
 

 
(有兴趣的用户不妨将下面这段代码复制到NSIS插件中运行看看)
/*
if you have this effects,please keep!

Writer:【Mr.Z_production ·JUAN】
http://blog.163.com/53_54
Thanks:Restools,zhfi,X-Star
*/
!AddPluginDir "."
!AddIncludeDir "."
!include MUI2.nsh
; --------------------------------------------------
; General settings.
Name "Flame_Effects Example"
OutFile "NSIS_fire.exe"
SetCompressor /SOLID lzma
ReserveFile "${NSISDIR}Pluginssystem.dll"
ReserveFile firectrl.dll
; --------------------------------------------------
; 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
!define MUI_WELCOMEPAGE_TEXT "火焰效果"
 !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 "english"
Function .onGUIEnd
SetPluginUnload manual
firectrl::disablefire
System::Free
FunctionEnd
Function .onInit
InitPluginsDir
SetOutPath $PLUGINSDIR
File firectrl.dll
SetOutPath $TEMP
FunctionEnd
Function Pre
  System::Call 'user32::LoadImage(i,t,i,i,i,i,) i (0,"$PLUGINSDIRmodern-wizard.bmp",0,0,0,0x10) .s'
Pop $R0
 System::Call '$PLUGINSDIRfirectrl::enablefire(i,i,i,i,i) i ($HWNDPARENT,0,0,$R0,50)'
FunctionEnd
Function leave
 System::Call '$PLUGINSDIRfirectrl::disablefire()'
FunctionEnd
 Section "Dummy" SecDummy
 SectionEnd


相关文章

相关推荐

最新攻略

用户评论

(已有0条评论)
表情
注:您的评论需要经过审核才能显示哦,请文明发言!
还没有评论,快来抢沙发吧!