2023-06-17, 09:22
Code:
I want to add a toggle button to Estuary's player OSD - in VideoOSD.xml file.
the toggle button runs an addon's script. and toggles it's actions to on/off
I am using these two icons for the button:
https://imgur.com/a/YjuY2vq
https://imgur.com/a/15sAnTA
The default icon is for OFF - white "IMAX" icon, and when clicking I want to change the icon image to ON - the green "IMAX" icon.
How do I configure it to use the same toggle button and change the icon image on button click?
For now I've put the two icons next to each other:
https://imgur.com/a/Rm1NCCS
Using this code: (the first button "settings-subtitle" is original Estuary button, copied it's code to create the custom button):
xml:<control type="radiobutton" id="70046">
<include content="OSDButton">
<param name="texture" value="osd/fullscreen/buttons/settings-subtitle.png"/>
</include>
<onclick>ActivateWindow(osdsubtitlesettings)</onclick>
<visible>!VideoPlayer.Content(LiveTV) | VideoPlayer.HasSubtitles</visible>
</control>
<control type="radiobutton" id="700452">
<include content="OSDButton">
<param name="texture" value="imax/imax_off.png"/>
</include>
<onclick>RunScript(plugin.custom.script,do_something)</onclick>
</control>
<control type="radiobutton" id="700453">
<include content="OSDButton">
<param name="texture" value="imax/imax_on.png"/>
</include>
<onclick>RunScript(plugin.custom.script,do_something)</onclick>
</control>