[SOLVED] Can I open one specific screen multiple at the same time?
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.
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.
[SOLVED] Can I open one specific screen multiple at the same time?
I want to open the same 'single_window' screen multiple when pressing a button, like a regular GUI OS(see the attachment image if you don't understand. Sorry)
Is It possible to make?
PS: And can I change the screen's zorder when clicking or activating the screen? Also like windows or regular GUI OS
Last edited by wtfman on Tue Sep 20, 2022 12:44 pm, edited 1 time in total.
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Can I open one specific screen multiple at the same time?
Different _tag on each Show allows you to show multiple instances of the screen.https://www.renpy.org/doc/html/screen_actions.html#Show wrote: This action takes the _layer, _zorder and _tag keyword arguments, which have the same meaning as in the renpy.show_screen() function.
- Ocelot
- Lemma-Class Veteran
- Posts: 2434
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Can I open one specific screen multiple at the same time?
1) Yes. renpy.show_screen( 'single_window', tag="some_other_name"). The only requirements are that tags should be unique and you need to keep track of tags used.
2) Yes. Probably works best if you simply reshow window with diffrent zorder.
2) Yes. Probably works best if you simply reshow window with diffrent zorder.
< < insert Rick Cook quote here > >
Re: Can I open one specific screen multiple at the same time?
But when reloading the screen, coordination is reset and always appears in the left top corner of the screen(screen is draggable). Can find or extract the current screen's coordinates?
- Ocelot
- Lemma-Class Veteran
- Posts: 2434
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Can I open one specific screen multiple at the same time?
If they are implemented as Drag Displayables, then coordinates are avaliable as x andy members of corresponding Drag pbject.
Another way to show screen multiple times is to use it multiple times in parent screen. Don't know, if it would be applicable to your project.
Another way to show screen multiple times is to use it multiple times in parent screen. Don't know, if it would be applicable to your project.
< < insert Rick Cook quote here > >
Re: Can I open one specific screen multiple at the same time?
Am I need to use python callback to get screen coordinates?Ocelot wrote: ↑Tue Sep 20, 2022 5:57 am If they are implemented as Drag Displayables, then coordinates are avaliable as x andy members of corresponding Drag pbject.
Another way to show screen multiple times is to use it multiple times in parent screen. Don't know, if it would be applicable to your project.
- Ocelot
- Lemma-Class Veteran
- Posts: 2434
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Can I open one specific screen multiple at the same time?
Depending on how you will structure your screens, maybe yes, maybe screen actions will suffice, maybe a straightforwayd function call before reshowing window.
< < insert Rick Cook quote here > >
Re: Can I open one specific screen multiple at the same time?
Code: Select all
screen text_window(texttitle, innertext, tagname):
drag:
drag_handle (0, 0, 1.0, 50)
drag_name tagname
draggable True
frame:
textbutton "[texttitle]" xalign 0.5 action Hide(tagname), Show("text_window", texttitle="blah", innertext="blahblahblah", tagname = "mumble", _tag = "mumble")
...
screen openbutton:
textbutton "open" action Show("text_window", texttitle="blah", innertext="blahblahblah", tagname = "mumble", _tag = "mumble")
Who is online
Users browsing this forum: kedta35