Making the dialogue box disapper by right-clicking [Solved]

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
kikcac

Making the dialogue box disapper by right-clicking [Solved]

#1 Post by kikcac »

I want the dialogue box to disapear when right-clicked, like in Re:Alistar so that people can see the CG and and other images in full-view.
Does anyone know how to do this?
Thank you in advance! Oh, and I'm not so good with Renpy so please explain in easy language.
Last edited by kikcac on Mon Jul 08, 2013 11:40 pm, edited 1 time in total.

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Making the dialogue box disapper by right-clicking

#2 Post by pwisaguacate »

By default, the middle mouse button (and h key) hides the dialogue box. You can change it with the following:

Code: Select all

init:
    $ config.keymap['hide_windows'].append('mouseup_3') # To hide text on right click
    $ config.keymap['hide_windows'].remove('mouseup_2') # To remove keymapping of middle mouse button
Note that RE: Alistair++ uses menu buttons directly built into the textbox, so you might have to design it that way and remove the keymapping from game_menu:

Code: Select all

init:
    $ config.keymap['game_menu'].remove('K_ESCAPE')
    $ config.keymap['game_menu'].remove('mouseup_3')
    $ config.keymap['game_menu'].remove('joy_menu')
(It is uncommon for people to do this. If you wish to keep the right click menu but have an obvious way to hide all the screens, then you could add a button that says "Hide" with the Hide_Interface() function:)

Code: Select all

# For example, for the quick menu in screenss.rpy
screen quick_menu:
    [...]

        textbutton _("Hide") action HideInterface()
        [...]

kikcac

Re: Making the dialogue box disapper by right-clicking

#3 Post by kikcac »

@pwisaguacate: Thank you so much! It works.

For others who also wants to this kind of option, here is the quote I added at the end of options.rpy:

Code: Select all

init:
    $ config.keymap['hide_windows'].append('mouseup_3') # To hide text on right click.
    $ config.keymap['hide_windows'].remove('mouseup_2') # To remove keymapping of middle mouse button.
    $ config.keymap['hide_windows'].remove('h') # To remove leymapping of H button
    $ config.keymap['hide_windows'].remove('joy_hide')
    $ config.keymap['game_menu'].remove('K_ESCAPE')
    $ config.keymap['game_menu'].remove('mouseup_3')
    $ config.keymap['game_menu'].remove('joy_menu')
A helpful link: http://www.renpy.org/wiki/renpy/doc/reference/Keymap.

404
Newbie
Posts: 2
Joined: Sun Oct 17, 2010 4:32 pm
Projects: The End of Dreaming
Location: In The Woods
Contact:

Re: Making the dialogue box disapper by right-clicking [Solv

#4 Post by 404 »

I want to implement this but instead of a click, I want my window to disappear by hitting the spacebar. I'd also like to add a dissolve transition whenever you hit spacebar to hide the text window. How could I do this?

Post Reply

Who is online

Users browsing this forum: munni