Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

progress bar display

35 views
Skip to first unread message

nick taseris

unread,
Jan 30, 2025, 2:28:49 AMJan 30
to MPF Users
I have a 12 segment progress bar on the bottom of my display. The left 6 segments are blue and the right 6 segments are green. When I hit a blue target on the playfield I want it to fill a blue segment on the progress bar and then when I hit a green target on the playfield I want it to fill a green segment on the progress bar. When either color adds to the progress bar I want to remove one from the other color's progress bar. The goal is to fill all 6 on one side. What would be the best way to achieve this? I have a counter for each color set up so far but I am not sure about the logic of showing and removing the segment widgets.

Anthony van Winkle

unread,
Jan 30, 2025, 10:26:56 AMJan 30
to MPF Users
I did a very similar thing in my game, and my solution was to make an animated gif for each progress bar where each frame is one more segment filled in. I set the image widget auto_play: false and then in my widget add/update events, include widget_settings with start_frame to the value of the counter/variable.

nick taseris

unread,
Jan 30, 2025, 6:39:31 PMJan 30
to MPF Users
Thank you Anthony!

What mode did you use it on? I want to go and check out your code on github.

Reply all
Reply to author
Forward
0 new messages