[In Progress] Give a viewport a border when it has focus?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

[In Progress] Give a viewport a border when it has focus?

#1 Post by henvu50 »

How can you give the viewport a border when it has focus, but then make the border go away when it loses focus?

EDIT:

I have to give the viewport a tooltip, then check that tooltip to see if the viewport is focused. If it's focused, then I have to add an image border around the viewport. When it's unfocused, the tooltip changes to something else, so then the border is no longer shown.

Seems odd that I have to take this approach. My gut tells me there is a better way to do this.

But for now, this works quite well in case anyone needs to do this in the future.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], myself600