dragability! Thread last updated on 2005-07-19 19:18:40

Posted by member 124072 on 2005-07-18 22:32:09

making yet another theme for the rebirth of ls.net (im a bit late i think o_o) and was wondering...how do you make an entire thing dragable? for instance lets say I have an lsxcommand and some winamp buttons that fix into a bar with cutouts, how could I make it so when you drag the bar it brings the buttons and lsx with it?

Posted by member 212670 on 2005-07-18 22:42:15 link

Well, using xlabel you could have a parent label, and hook the amp buttons (made out of labels), shortcuts (also labels) and lsxcommand in to it. If you wanted them seperate for some reason, you could hook them in to their own labels, and then just use xlabel's docking feature.

Here's a simple hooking example using xlabel:
*Label parent
parentX 50
parentY 50
parentWidth 76
parentHeight 52
parentSolidColors eeeeee ffffff 000000
parentSolidBevelSize 0
parentMoveable true
parentMoveModifierKey .none
parentText "drag"
parentFontVertAlign Bottom

*Label child
childX 4
childY 4
childWidth 32
childHeight 32
childSolidColors dadada ffffff 000000
childSolidBevelSize 1
childHoverSolidColors eeeeee ffffff 000000
childHoverSolidBevelSize 1
childPressedSolidColors eeeeee 000000 ffffff
childPressedSolidBevelSize 1
childOnLeftClick !whateverbang

*parentModuleHook !LabelLSBoxHook child

*Label child2
child2X 40
child2Y 4
child2Width 32
child2Height 32
child2SolidColors dadada ffffff 000000
child2SolidBevelSize 1
child2HoverSolidColors eeeeee ffffff 000000
child2HoverSolidBevelSize 1
child2PressedSolidColors eeeeee 000000 ffffff
child2PressedSolidBevelSize 1
child2OnLeftClick !whateverbang

*parentModuleHook !LabelLSBoxHook child2

...and so on.

Check out xlabel 3.4.1's readme file. Andymon has done a great job of documenting his modules.

Posted by member 124072 on 2005-07-18 23:29:48 link

but does this work with any and all mods or only xlabel and shortcuts made out of xlabel?

Posted by member 248213 on 2005-07-19 00:07:36 link

if the module supports Hooking (Being hooked) then yes.

Just read the docs. If it says it can be hooked into LSbox, it can be hooked into xLabel :)

Posted by member 212670 on 2005-07-19 01:21:01 link

You can easily make a full theme out of hookable modules. Like fractal said, check out xlabel's readme, specifically the "Hook Modules On Labels" section. Just keep in mind, when you hook something in to a label, its x/y coords become relative to the label's viewable area, not the desktop. (Like if you hook lsxcommand in to a label, x/y 0/0 will stick it in the top left corner of the label.)

Posted by member 124072 on 2005-07-19 02:42:57 link

where on earth is the mod doc for shortcut2-2.0......

Posted by member 248213 on 2005-07-19 19:18:40 link

use labels for the shortcuts. Its easier and eliminates the need to load another module.

+label shortcuts rule (icon images :o)