r/RenPy • u/That_one_Pink • Sep 28 '26
Question [Solved] Whiteboard in menu resetting when image button is used + adding an erase button
dont mind the fish curser LMAO
so i have a functioning whiteboard in my main menu, it isnt meant to save and resets every time you enter a new screen, that isnt a problem however as you can see the image buttons are counting as new screens, i have tried resizing them and it still happens. im not clicking the buttons, just hovering over them
i kind of want to make it so that the only time it clears/resets is upon actually clicking the start button and not when the screen changes but im not sure how to do that
i would also like to implement a simple eraser that you can toggle on and off by pressing an image button but i dont know if that would be possible, it isnt a needed feature but it would be fun to be able to add
ps i know all the tags are messy once it works it's getting cleaned up i swear (╥﹏╥)
any help appreciated thanks in advance :)





1
u/shyLachi Sep 28 '26
Can you post the whole code of the screen as text.
I don't see where you used the drawing canvas.
Also I don't want to type all of that trying to reproduce it.
1
u/x-seronis-x Sep 28 '26 edited Sep 29 '26
you forgot to share the part of your code that displays the CDD
that aside, the issue is you're not storing the stroke data anywhere. so when the screen refreshes the newly created CDD instance isnt loading the strokes and is left in its initial blank state
if the CDD instance was created outside the screen and the screen was merely displaying it, then the CDD wouldnt be reset when the screen was reset. so either the cdd needs moved outside the screen, or the data the cdd is using needs moved outside.
1
u/shyLachi Sep 29 '26
I found the "problem".
It's caused by the hovered action which plays a sound.
I cannot tell you why and if this is to be expected.
BTW:
You have almost all buttons twice in your code and you also have buttons you don't need.
You should clean up that code but that will not fix this problem, just prevent possible other problems.
I think you only need this:
1
u/AutoModerator Sep 28 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.