First unread post7 posts Page 1 of 1
Unread postby Yin Cognyto » 10 Jul 2018 23:07
What is the setting for disabling a button manually? In my case, I want to put record buttons that can capture video, audio and images in the skin, and I want the video capture button to be disabled when I'm in audio mode (because there's no video there). Something like this:
Code: Select all
#if<SkinName==AudioSkin>
   L: Start Recording Video (disabled state)
   <Button Tooltip='$ID_SAVE_MOVIE_START' CmdID='ID_SAVE_MOVIE_START' [UnknownSetting]='[DisabledValue]' Left='-40' Top='-48' Width='48' Height='48' ImageTop='189' HoriCenter='1' />
#else
   L: Start Recording Video (enabled state)
   <Button Tooltip='$ID_SAVE_MOVIE_START' CmdID='ID_SAVE_MOVIE_START' [UnknownSetting]='[EnabledValue]' Left='-40' Top='-48' Width='48' Height='48' ImageTop='189' HoriCenter='1' />
#endif
I've tried with Enabled='0', AutoEnable='0' and AutoVisible='-1' on a regular Play button used for testing and it didn't work. Visually, I want to basically activate the 4th state of the button from Main.png, which it seems to be the disabled state; practically, I want the button to be disabled for left clicks (but not for right clicks!).

P.S. I know that I can simply delete the command from the CmdID value to achieve the practical result, but I want visual clarity too (so that the user knows why clicking the button does nothing).
Unread postby D2NP » 11 Jul 2018 00:49
I think that's right
just add
CmdID='' AltCmdID='CMD...'
for button in audio mode and change button image to the 4ch state

if I get you right
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 11 Jul 2018 02:49
Yes, you got me right. However, doing this means that I have to copy/paste the disabled button image another 2 times to the right of the original in Main.png, to cover for mouse over and mouse pushed states, which seems a little redundant to me - it's like creating another button entirely. I thought that the 4th image of the button was taken automatically by PotPlayer when the button is disabled for whatever reason, so I expected a more "elegant" solution... :)

To be more clear with this:
- in almost every skin I tested, a button is represented like this in Main.png:

                                        Width/
                                     ImageWidth
ImageLeft, ImageTop    -----------------------------------------------------------------------
                                     |   Normal   | Mouse Over | Mouse Push |  [Disabled?] |
Height/ImageHeight     |      (1st)     |      (2nd)       |       (3rd)       |      (4th)        |
                                     |     State    |       State      |       State       |       State      |
                                      -----------------------------------------------------------------------

with PotPlayer automatically incrementing ImageLeft by the value of Width or ImageWidth to get the next button state, when conditions are met to show that state (e.g. mouse over, a click, etc). I thought PotPlayer would automatically go to the 4th (or last) button frame/state if disabling (aka greying out or dimming) the button was possible. After all, there are options like DimTextColor that suggest a dimmed/disabled state is possible for buttons too. This is why I find it strange that you need to create another button to simulate the "dimmed" state of the same button.

I can do it like we discussed, no problem - it's easy to edit the png, but as I said, I thought such a dimmed state of a button was "by design" in PotPlayer, seeing the layout in most skin images and options such as DimTextColor for texts...
Unread postby D2NP » 11 Jul 2018 03:25
Oh, you about 4th frame,
Now potplayer does not use 4th frame,
it seems it was used in older versions of the player

so
yes, need create another button or <Image Enabled='1' AltCmdID='CMD...' ... />
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 11 Jul 2018 04:00
That explains it, thanks. So now it's safe to cut those 4th frames from the png-s, right? Good idea with an enabled image, I didn't know images could act like buttons...
Unread postby D2NP » 11 Jul 2018 04:12
Yes, 4th frame is not needed.
"Еnabled" for <Layout <Label <PicLabel too
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 11 Jul 2018 05:13
Good to know - thanks.
First unread post7 posts Page 1 of 1

Login

Who is online

Users browsing this forum: No registered users and 1 guest