I've just added some changes to the 1.8 branch that allow a skin designer to create a GUI button that reflects the state of a control that it does not change when the button is pressed.
This means we can now make a push-button that changes the loop state when pressed via a normal push-button (e.g. calls [ChannelX],reloop_exit) while showing the value of another control (in this case, [ChannelX],looping_enabled)
This is a diff against the Shade 1024x768 XGA skin.
As you can see, I added a new connection to the Reloop button, a connection to the control [Channel1],loop_enabled. For this connection I set ConnectValueFromWidget to false, because we do not want changes to the button (clicks) to affect the loop_enabled control. The loop_enabled control is a read only control and should not be set by anyone other than the mixing engine.
I also changed the existing two connections to the reloop_exit control to have ConnectValueToWidget false. We want the button to only reflect the state of the loop_enabled control, not the reloop_exit control. Presses to the button will change the value of reloop_exit, but changes to reloop_exit will not affect the button state.
Finally, I added LeftClickIsPushButton as true to the <PushButton> group. This ensures that while the number of states for the button is 2 (like the play/pause button) left-clicking (i.e. changing reloop_exit) still treats reloop_exit like a push button and not a toggle button.
Jus, please let me know if this is clear or not. Testing the above snippet causes the Channel1 Reloop button to show the 'Out' image when the loop is enabled. Let me know if this doesn't work for you.
I've just added some changes to the 1.8 branch that allow a skin designer to create a GUI button that reflects the state of a control that it does not change when the button is pressed.
This means we can now make a push-button that changes the loop state when pressed via a normal push-button (e.g. calls [ChannelX] ,reloop_ exit) while showing the value of another control (in this case, [ChannelX] ,looping_ enabled)
Here is how to do it: http:// pastebin. com/Ss8JCdmZ
This is a diff against the Shade 1024x768 XGA skin.
As you can see, I added a new connection to the Reloop button, a connection to the control [Channel1] ,loop_enabled. For this connection I set ConnectValueFro mWidget to false, because we do not want changes to the button (clicks) to affect the loop_enabled control. The loop_enabled control is a read only control and should not be set by anyone other than the mixing engine.
I also changed the existing two connections to the reloop_exit control to have ConnectValueToW idget false. We want the button to only reflect the state of the loop_enabled control, not the reloop_exit control. Presses to the button will change the value of reloop_exit, but changes to reloop_exit will not affect the button state.
Finally, I added LeftClickIsPush Button as true to the <PushButton> group. This ensures that while the number of states for the button is 2 (like the play/pause button) left-clicking (i.e. changing reloop_exit) still treats reloop_exit like a push button and not a toggle button.
Jus, please let me know if this is clear or not. Testing the above snippet causes the Channel1 Reloop button to show the 'Out' image when the loop is enabled. Let me know if this doesn't work for you.
Thanks,
RJ