- May 24, 2020
- 160
- 79
Hey everyone,
Let's say I created a music room and I want to add the play on repeat and shuffle function with toggle buttons.
How would one do that?
From my understanding the musicroom class (in my case, the music room is called mr), has two variables (single_track and shuffle), that I want to change with a toggle button.
So my first impulse was this:
However, the mr.single_track doesn't work, which means, that class variables have to be changed differently is that correct?
Does anyone have a working toggle button for their music room and is willing to share their code with me?
Thanks in advance.
EDIT: I'm a useless piece of shit. Right beneath the documentation is a section that mentions two functions:
ToggleSingleTrack(self)
ToggleShuffle(self)
EDIT 2:
Still... Does anyone know why this:
textbutton "Listen on repeat" action If (mr.single_track == False; mr.single_track = True; mr.single_track = False)
doesn't work?
How do I change class variables correctly?
Let's say I created a music room and I want to add the play on repeat and shuffle function with toggle buttons.
You must be registered to see the links
How would one do that?
From my understanding the musicroom class (in my case, the music room is called mr), has two variables (single_track and shuffle), that I want to change with a toggle button.
So my first impulse was this:
Python:
frame:
xalign 0.5
yalign 0.5
textbutton "Listen on repeat" action If (mr.single_track == False; mr.single_track = True; mr.single_track == False)
Does anyone have a working toggle button for their music room and is willing to share their code with me?
Thanks in advance.
EDIT: I'm a useless piece of shit. Right beneath the documentation is a section that mentions two functions:
ToggleSingleTrack(self)
ToggleShuffle(self)
EDIT 2:
Still... Does anyone know why this:
textbutton "Listen on repeat" action If (mr.single_track == False; mr.single_track = True; mr.single_track = False)
doesn't work?
How do I change class variables correctly?
Last edited: