Help - Search - Members - Calendar
Full Version: Panels UI: help to create button for mute volume
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Yeye
Hello,

i want to create a button to allow mute volume, i try this

CODE
$button(260,375,30,10,,,/yeye\mute0.png,/yeye\mute0h.png,'Volume mute',)


it is work.
But it left some details as when sound is muted the button don't stay with the muted picture.
that why i try

CODE
$button(260,375,30,10,,,
$ifgreater($get(vol),0,$imageabs2(0,0,0,0,0,0,260,375,/yeye\mute0.png,),$imageabs2(0,0,0,0,0,0,260,375,/yeye\mute1.png,)),
$ifgreater($get(vol),0,$imageabs2(0,0,0,0,0,0,260,375,/yeye\mute0h.png,),$imageabs2(0,0,0,0,0,0,260,375,/yeye\mute1h.png,)),
'Volume mute',)

with this last code, the button does'nt work, and only mute0h.png and mute1h.png are displayed (if sound is muted or not).


mute0.png fit to normal sound
mute0h.png fit to normal sound but when mouse is on the button
mute1.png fit to normal muted sound
mute1h.png fit to normal muted sound but when mouse is on the button


someone can help me?
Best regards (sorry for my english language, but it isn't my native language)
dRsrb
Hi!

This works for me:
CODE
    $button(x,y,0,0,0,0,
        $ifgreater($mul(%cwb_volume%,-1),99,
            $get(path-images)'\image_1.png'
        ,
            $get(path-images)'\image_0.png'
        )
    ,
        $ifgreater($mul(%cwb_volume%,-1),99,
            $get(path-images)'\image_0-h.png'
        ,
            $get(path-images)'\image_1-h.png'
        )
    ,
        'Playback/Volume mute'
    ,
        TOOLTIP:"Mute Volume"
    )
Yeye
It is work thank you very much. My brain is broken. biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.