Side screen setup with no click-advancement. Modal not effective.

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
User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Side screen setup with no click-advancement. Modal not effective.

#1 Post by ISAWHIM »

I have a side-screen, with buttons. The buttons have spaces between them, and some are just images. (Non-functioning backgrounds that rest where an actual button may be.) Essentially, the whole right-hand side of the game is a GUI of buttons, maps, etc... The game should not advance when clicking anything in that area. Even dead-space.

The issue I have, is this...

I don't want to advance the game, dialogue, if they accidentally click in the spaces between the buttons, or if they click on one of the non-button images... Because they think it is a button.

I tried setting the screen to "modal True", which does not work, and oddly, I can't select any answers in a "menu:", when that screen is set to "modal True".

"Does not work" = It advances the dialogue when clicking in the modal screen.
"Does work" = It blocks the ability to click the "choices" in the "menu:" prompts. Even though the modal screen is not covering that screen.

So... How can I define a section of the screen to stop advancement with the mouse, but still respond to mouse-input, so things can be "selected" and "hovered".

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Side screen setup with no click-advancement. Modal not effective.

#2 Post by ISAWHIM »

Can I block just the "Click to continue" function, and somehow tie it to an actual "function", called when they click on designated things?

Hijacking the mouse isn't an option, because then you couldn't click on buttons or choices, etc...

Eg, clicking on the "scene" area, or the "say" windows and children. (Adding that the "scene" area is not the "screen", it is constrained to a specific area.)

Code: Select all

init python:
    config.layer_clipping['master'] = (14, 14, 1536, 864)

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Side screen setup with no click-advancement. Modal not effective.

#3 Post by ISAWHIM »

Got it...

Made a giant button underneath the side-screens, with a NullAction()...

The odd size and position is just the right-most area on a 1080p screen, where my game GUI is located. (Travel buttons, maps, clock, calendar, etc...)

Code: Select all

screen sideInfo:
    zorder 10
    fixed:
        button xpos 1564 ypos 0 xsize 356 ysize 1080 action NullAction()
Now, if I click anywhere in that area, except an actual button (which is loaded on a higher level, by loading after this button.) It will not advance the dialogue and it isn't disrupting the ability to click things that pop-up, out of the way, like my "menu:" answers/choices.

Post Reply

Who is online

Users browsing this forum: piinkpuddiin