How would I make one?
The code to enter presentation mode is:
enterPresMode
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 ifNotNil: [t1 enterPresentationMode]How would I make code for exit presentation mode?
I've already tried the following:
exitPresMode
| t1 |
t1 _ self ownerThatIsA: ScratchPresenterMorph.
t1 ifNotNil: [t1 exitPresentation]exitPresMode
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 ifNotNil: [t1 exitPresentationMode]Offline
When you're in full screen mode, I don't think the ScratchFrameMorph owns the sprites any more (although I might be wrong). To access the SFM, you need to do something along the lines of "t1 _ (self ownerThatIsA: OffscreenWorldMorph) frame.".
Sorry for being a bit vague, but I haven't done anything like this in a while.
Offline
TheSuccessor wrote:
When you're in full screen mode, I don't think the ScratchFrameMorph owns the sprites any more (although I might be wrong). To access the SFM, you need to do something along the lines of "t1 _ (self ownerThatIsA: OffscreenWorldMorph) frame.".
Sorry for being a bit vague, but I haven't done anything like this in a while.
You're right though.
However, the actual presentation mode morph has its own method to exit the mode. Maybe just look that one up and use the ownerThatIsA to point to the PresentationModeMorph or whatever it's called
Offline
(self ownerThatIsA: ScratchPresenterMorph) exitPresentation
Offline
Solved, you're welcome.
Offline
MathWizz wrote:
jvvg wrote:
TheSuccessor wrote:
(self ownerThatIsA: ScratchPresenterMorph) exitPresentation
Doesn't work.
![]()
You ARE running from inside presentation mode, right? xD
Yeah, but that didn't work anyway. We finally figured out this code that works:
(self ownerThatIsA: OffscreenWorldMorph) frame exitPresentationMode.
Offline
Yeah, LS's code works and has been applied. See this Insanity changeset.
Offline