Layercut 1.0

The Layered Shortcut Module

Layercut is a module for LiteStep based on the shortcut2 module. It's allow you to make real transparency shortcut with 24-bits png with alpha channel. This module only works on Windows 2000/XP.

-= Syl =-



Table of contents


History
    04/02/2002 - ver 1.0
    • First release.

    started the 03/02/2002.


Installation

Copy Layercut.dll in your module directory and load the module:

LoadModule "c:\LiteStep\Modules\Layercut.dll"

if c:\LiteStep\Modules\ is your module directory of course...
Don't forget to not load the shorcut2.dll module, because it's useless...



Usage

Advantages:
- Shortcut with real transparency
- Shortcut alpha channel is enable and make the shortcut transparent
- Faster with LSDynamic

Disadvantages:
- a little bit slower than shortcut2
- zorder is different than shortcut2

The syntaxe is compatible with shortcut2. You can also specify the alpha value for the shortcut:

*Shortcut [CAPTION] [X] [Y] [NORMAL.BMP] [HOVER.BMP] [CLICK.BMP] #[GROUP][FLAGS] [a:ALPHA_VALUE] [HOVER.WAV] [CLICK.WAV] [ACTION]

ALPHA_VALUE is between 0 (transparent) to 255 (opaque). for example, a:128 if 50% transparent.
For more information about how shortcut works, view the help file about shortcut2 in the LiteStep documenttion folder.

Settings

ShortcutDefaultAlpha <value>
Set the default alpha for the shortcuts.

Bangs

!ShortcutGroupSetAlpha value groups
Change the alpha of a shortcut group.



Examples

copy the file skull1.png in your images directory, then copy this line in your step.rc.

*Shortcut "" 0 0 skull1.png skull1.png skull1.png #1t a:192 !none

This line draw a 24-bits png image with alpha channel in it, and with a global transparency of 192.



Tips

To create a png with an alpha channel, there is two way (with Photoshop):
You can create a new image with a transparent background, and draw a new image on it, then save this image into a png file.
Or you can add a new channel to the image in the layer tab, then draw a black and white image, where black is transparent and white is opaque. The advantage of the alpha channel is that you can make alpha-per-pixel and use the 256 colors grayscale to make smooth transparency.
You can also convert tga 32-bits to png 24-bits.



Known bugs

This module only works on Windows 2000/XP.

This module is slower than the standard shortcut2 if you use it like shortcut2, I mean that if you don't want transparency, don't use it.

This module was made because it was too slow with LSDynamic to make shortcuts transparent, and this module is faster for transparency than other applications could make (like LSDynamic with shortcut2). Use the setting DynLayeredShortcut because you can't change the alpha of this shortcut in the old way. If you don't, this won't work.

Due to the huge modification to make shortcuts transparent, some flags for windows creation has changed, and some modification may appear with ontop shortcut, or when you change the ontop state of a shortcut. I tried to keep the shortcut2 feelings, but sometimes it was impossible.



Greetings

Thanks to the LSdev Team to let me use the shortcut2 sources to make this module.



Contact

If you have a problem, want a new feature, want to report a bug, email me.


-= Syl =-
Web: http://www.epita.fr:8000/~rouque_s/
Mail: rouque_s@epita.fr
ICQ: 84198930