How to make a toggle button little planet / normal view

  • Hey guys!

    So i managed to sue the regular interface of the example 360 video player to create a drop down of only projection I like. But I really want to create one toggle button that when pressed switches to little planet view and when pressed again switches to normal view.


    Code
    <layer name="videointerface_snd_button"
    		       style="videointerface_baseimage|videointerface_glow" crop="0|0|64|64"
    		       align="left" x="0" scale="0.5"
    		       onclick="videointerface_toggleview();"
    		       />


    Code
    <action name="videointerface_toggleview">
    		if(plugin[get(videointerface_video)].volume GT 0,
    			set(plugin[get(videointerface_video)].volume, 0.0);
    			set(layer[videointerface_snd_button].crop, 64|0|64|64);
    		,
    			set(plugin[get(videointerface_video)].volume, 0.2);
    			set(layer[videointerface_snd_button].crop, 0|0|64|64);
    		);
    	</action>


    This si as far as i got with reverse engineering the "sound" toggle button and I know taht I ahve to change this part of the code but not sure what the event or action should be :

    Code
    if(plugin[get(videointerface_video)].volume GT 0,
    			set(plugin[get(videointerface_video)].volume, 0.0);
    			set(layer[videointerface_snd_button].crop, 64|0|64|64);
    		,
    			set(plugin[get(videointerface_video)].volume, 0.2);
    			set(layer[videointerface_snd_button].crop, 0|0|64|64);
    		);

    Thanks in advance for any help.

    -M

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!