SkinnedControls plug-in: Difference between revisions
mNo edit summary |
|||
Line 85: | Line 85: | ||
== Problems == | == Problems == | ||
* During the installation, the button "Show Detail" is unskinned => this issue was fixed in version 1.1. | * During the installation, the button "Show Detail" is unskinned => this issue was fixed in version 1.1. | ||
* When you use MessageBox function on some page, the next page's buttons got unskinned: | * When you use MessageBox function on some page, the next page's buttons got unskinned: | ||
Line 98: | Line 99: | ||
</highlight-nsis> | </highlight-nsis> | ||
I used WM_MENUDRAG message [which is normally unused] to notify window to put another refresh message into queue -> to force redrawing. See the source code how it works. | I used WM_MENUDRAG message [which is normally unused] to notify window to put another refresh message into queue -> to force redrawing. See the source code how it works. | ||
*If you use Unicode build of this plugin with non-Unicode NSIS (and vice versa) you can get this error (mentioned [http://forums.winamp.com/showpost.php?p=2347664&postcount=1 in this forum]): | |||
[[File:SkinnedControls-error.png]] | |||
Use appropriate build of plug-in to solve it (Unicode SkinnedControls + Unicode NSIS and so on). | |||
== Versions History == | == Versions History == |
Revision as of 07:53, 23 March 2011
Download Link
http://forums.winamp.com/showpost.php?p=2483668&postcount=165 (XXX KB) - v1.0 by SuperPat
or
http://forums.winamp.com/showpost.php?p=2735682&postcount=240 (235.2 KB) - v1.1 by Tallmaris
or
http://forums.winamp.com/showpost.php?p=2756948&postcount=6 (XXX KB) - v1.2 by Slappy
Description
This plug-in allows to skin ALL installer's buttons - even those on nsDialogs page. Also it allows to skin Scrollbars and added possibility to select color for texts on buttons.
This plug-in has several versions - each version was created by another person, so there might be a large differences between them! There are also several builds - an Unicode and normal version and so on! Be careful what version you use!
This plug-in started as a part on UltraModernUI, but later several changes had been made into it.
How To Use
See example and documentation in {UltraModernUI package}\Examples\SkinnedControls\Example_MUI.nsi from http://forums.winamp.com/showpost.php?p=2483668&postcount=165
SkinnedControls::skinit Function
Skins the installer's buttons and scrollbars with selected bitmaps and sets colours for texts on buttons.
Syntax
; Skin the button Function .onInit InitPluginsDir ; Extract bitmaps for buttons File "/oname=$PLUGINSDIR\button.bmp" "${NSISDIR}\Contrib\SkinnedControls\skins\defaultbtn.bmp" File "/oname=$PLUGINSDIR\scrollbar.bmp" "${NSISDIR}\Contrib\SkinnedControls\skins\defaultsb.bmp" FunctionEnd Function myGUIInit ; start the plugin ; the /disabledtextcolor, /selectedtextcolor and /textcolor parameters are optionnal SkinnedControls::skinit /NOUNLOAD \ /disabledtextcolor=808080 \ /selectedtextcolor=000080 \ /textcolor=000000 \ "/scrollbar=$PLUGINSDIR\scrollbar.bmp" \ "/button=$PLUGINSDIR\button.bmp" Pop $0 StrCmp $0 "success" noerror MessageBox MB_ICONEXCLAMATION|MB_OK "SkinnedControls error: $0" noerror: FunctionEnd
Parameters
/disabledtextcolor=808080
- Color of text when button is disabled (Format is in hex: RRGGBB as CSS colors)
/selectedtextcolor=000080
- Color of text when button is being clicked (Format is in hex: RRGGBB as CSS colors)
/textcolor=000000
- Color for normal state of button (Format is in hex: RRGGBB as CSS colors)
"/scrollbar=$PLUGINSDIR\scrollbar.bmp"
- Scrollbar image (several little images in one file)
"/button=$PLUGINSDIR\button.bmp"
- A 47x45 image file containing three button images of 47x15 each, the first button image is used when the button is not clicked, the second being the button image used when the button is clicked by the user and the third image is used for disabled state.
SkinnedControls::unskinit DLL Function
Releases the plug-in resources.
Syntax
Function .onGUIEnd ; stop the plugin SkinnedControls::unskinit FunctionEnd
Problems
- During the installation, the button "Show Detail" is unskinned => this issue was fixed in version 1.1.
- When you use MessageBox function on some page, the next page's buttons got unskinned:
This issue has been fixed in version 1.2, but it is a little tricky:
MessageBox MB_OK "This message causes SkinnedControls bug..." ; After clicking OK the buttons lost their skin SendMessage $HWNDPARENT ${WM_MENUDRAG} 0 0 ; Do this to force reskin
I used WM_MENUDRAG message [which is normally unused] to notify window to put another refresh message into queue -> to force redrawing. See the source code how it works.
- If you use Unicode build of this plugin with non-Unicode NSIS (and vice versa) you can get this error (mentioned in this forum):
Use appropriate build of plug-in to solve it (Unicode SkinnedControls + Unicode NSIS and so on).
Versions History
- 1.2 (2011)
- Fixed unskinning buttons after MessageBox is shown (see above)
- Project was converted to Visual Studio 2008 format
- 1.1 (2010)
- Littles bug fixes & Unicode build
- 1.0 (2009)
- First version
Credits
- Version 1.0, written by SuperPat
- Based on the Wansis plug-in of Saivert
- Uses wa_dlg.h courtesy of Nullsoft, Inc.
- Version 1.1 by Tallmaris
- Version 1.2 by Slappy Graphical installers: www.unsigned-softworks.sk