Custom Say Window

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
Majirefy
Regular
Posts: 26
Joined: Sun Dec 12, 2010 2:55 pm
Projects: Sonata Twilight
Location: China
Contact:

Custom Say Window

#1 Post by Majirefy »

I'm trying to add some image buttons to my say window and NVL window, like "skip", "load", "save", "settings" like the picture shows below.
I have tried many scripts before, like this: http://lemmasoft.renai.us/forums/viewto ... ext+window
But problem is, these button appears as soon as the game starts. That is to say, I just want to show these buttons with the appearance of my say window and NVL window, and can disappear as soon as my say window disappears.
So, how can it be possible?
Thanks for help! :P
Attachments
2.png
1.png
"God's his heaven, all's right with the world."

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Custom Say Window

#2 Post by PyTom »

Your best bet nowadays is to use screens to customize the say and nvl windows, and then add the buttons as part of the screen.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Majirefy
Regular
Posts: 26
Joined: Sun Dec 12, 2010 2:55 pm
Projects: Sonata Twilight
Location: China
Contact:

Re: Custom Say Window

#3 Post by Majirefy »

PyTom wrote:Your best bet nowadays is to use screens to customize the say and nvl windows, and then add the buttons as part of the screen.
I'm sorry, but would you please give me more hint? I have no idea about that....
For example, what will be the label name of my code?
"God's his heaven, all's right with the world."

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: Custom Say Window

#4 Post by SleepKirby »

It's something like this code from backansi's post:

Code: Select all

init:
    screen say:
        window id "window":
        has vbox

        if who:
            text who id "who"

        text what id "what"

        imagebutton 'status.png' action Jump('status')
        imagebutton 'save.png' action ShowMenu('save')
        # .....
The say screen is the screen that defines the say window. You can define your own say screen, like this, and you can add your buttons to the say screen. This way, the buttons and the say window will always show/hide at the same time.

You can do something similar with the nvl screen. Unfortunately, the documentation on the nvl screen doesn't have an example for making a nvl screen with screen language. I don't have experience with NVL, but I think you just need to change the window properties to put the window on a different part of the screen, and then everything else should be very similar (unless I'm missing something).

Majirefy
Regular
Posts: 26
Joined: Sun Dec 12, 2010 2:55 pm
Projects: Sonata Twilight
Location: China
Contact:

Re: Custom Say Window

#5 Post by Majirefy »

SleepKirby wrote:It's something like this code from backansi's post:

Code: Select all

init:
    screen say:
        window id "window":
        has vbox

        if who:
            text who id "who"

        text what id "what"

        imagebutton 'status.png' action Jump('status')
        imagebutton 'save.png' action ShowMenu('save')
        # .....
The say screen is the screen that defines the say window. You can define your own say screen, like this, and you can add your buttons to the say screen. This way, the buttons and the say window will always show/hide at the same time.

You can do something similar with the nvl screen. Unfortunately, the documentation on the nvl screen doesn't have an example for making a nvl screen with screen language. I don't have experience with NVL, but I think you just need to change the window properties to put the window on a different part of the screen, and then everything else should be very similar (unless I'm missing something).
In truth, I have managed to refine my say screen, but the problem is... as you mentioned above, I can hardly get anything about NVL destination. After tons of failures that I tried to make a new definition of NVL mode in screen language, I found out it was not as easy as say... Or I do not know how to do that...

But thanks very much! :D
"God's his heaven, all's right with the world."

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Draida