Author Topic: images for toggle status not getting refreshed properly  (Read 794 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
I am trying to get player control buttons change depending on their toggle status, but it doesn't go well.

I've done this before using unicode characters (what is what I think other TM creators have been doing too), but I am now trying to use images instead of font characters. (for Playing/Paused status)

The result is that the image usually doesn't change, or sometimes it changes after a while, but it's unpredictable and not instantly following the actual playing status. (as e.g. the default player controls for TMs shows)

Perhaps I am doing something wrong though.

Here is a functioning TM xml that shows the behaviour:

Code
<?xml version="1.0" encoding="utf-8"?>
<root>

<!-- button play/pause toggle -->
 <element type="Icon" image="Images\toggle test\button_play.png"
 xAnchor="Panel.Left" x="150"
 yAnchor="Panel.Top" y="100"
 mouseOverFg="255,255,255" onClick="PlayPause" visibleTrigger="NotPlaying"></element>

 <element type="Icon" image="Images\toggle test\button_pause.png"
 xAnchor="Panel.Left" x="150"
 yAnchor="Panel.Top" y="100"
 mouseOverFg="255,255,255" onClick="PlayPause" visibleTrigger="Playing"></element>

<!-- button stop -->
 <element type="Icon" image="Images\toggle test\button_stop.png"
 xAnchor="Panel.Left" x="50"
 yAnchor="Panel.Top" y="100"
 mouseOverFg="255,255,255" onClick="PlayStop" />

</root>

The image files for the player buttons can be downloaded here and need to be placed in a folder named:
...\Plugins\TheaterMode.List\Images\toggle test

Perhaps someone can take a look?
Last Edit: November 20, 2023, 04:47:49 PM by hiccup

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1070
  • Heal The World
Tested and can confirm the above.
I see you once raised it before here: https://getmusicbee.com/forum/index.php?topic=35520.0
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.

hiccup

  • Sr. Member
  • ****
  • Posts: 7907
I did have a small itch at the back of my head that Younger Me might have raised this before, but I wasn't sure and couldn't find it.
Good find, and thanks for testing and confirming.