Ren'Py Mouse Disable

zhoope

Newbie
Game Developer
May 8, 2017
39
31
good night/morning everyone , I had a little problem in the past days i really need disable all mouse functions in labels and screens

what I've tried:

screen my_key:
key "mouse_03" action null action (work on text but skip the images )
i try to hide the mouse but still works (even invisible )

anyone knows how i can literally remove the mouse? or disable all the functions?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,191
good night/morning everyone , I had a little problem in the past days i really need disable all mouse functions in labels and screens
Why ?

What you're asking for is like saying "I want to disable the steering wheel in the car I'm building". So there's high chances that it's your answer to a problem, but not the answer to your problem.
 

zhoope

Newbie
Game Developer
May 8, 2017
39
31
Because when the user clicks on the label/screens all the images are skiped to next narrator textbox thats why i want to disable the mouse buttons

I will exemplify with images:


sorry abt the 'one problem' its only

i hope u can help me to solve this problem or teaching me an alternative way

note: The balons is in auto-mode they change every 4.5 sec by default
note: the user can change the time of balons
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,607
2,256
Okay.
It sounds like you are trying to solve the wrong problem.

If I had to guess, you need to add modal True to your screen: definition.

When you define a screen, there is an option modal. If it is switched on, then all other screen actions (like click to advance) are disabled. Only things defined as part of that screen are clickable. It sounds like that is what you want.

It is also possible that your screen definition is broken in some way I can't begin to guess at... like you've created a frame with an action and so when you click what you think is the background, the game thinks you need to invoke that action.

But my guess remains modal True.

There are lots of examples in other threads, this one is something I wrote recently:
https://f95zone.to/threads/how-to-open-world.63374/post-4313026


I'll also copy-paste a brief introduction to call screen and show screen I wrote in a different thread, just in case you are mixing those two up.
In your case, I'm almost certain you want to be using call screen.
[...]​
displays a pre-written screen on top of the existing UI and waits for the screen to trigger an action.​
[...]​
displays a pre-written screen on top of the existing UI and just carries on.​
Actions are still processed, but if the player never clicks on the right place - nothing will ever be triggered.​
"show" is generally used for things like navigation/room buttons or status windows. Things the player may or may not use.​
"call" is generally used for things that require the player to do something before continuing.​
99%* of the time, "called" screens will have the show modal which causes all other UI elements to be disabled while the current screen is being shown. It basically forces the player to use the screen and nothing else.​
* 84.7% of statistics on the internet are randomly made up on the spot and do not reflect real life.
70%* of the time, "shown" screens will have a matching statement too.​
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,191
Okay.
It sounds like you are trying to solve the wrong problem.
Totally agree.


If I had to guess, you need to add modal True to your screen: definition.
Another solution, if the modal property isn't enough, is to use a screen that will capture the click while doing nothing :
Code:
screen myWait( delay=1.0 ):
    imagebutton:
        idle Solid( "#00000000" )
        xpos 0 ypos 0
        xsize config.screen_width ysize config.screen_height
        action NullAction()

    timer delay action Hide( "myWait" )
It will create a full transparent imagebutton covering the whole screen, that do nothing when clicked, and that disappear after the given delay.

So, in your game you just have to do something like :
Code:
    show screen myWait( 5 * balloonDelay )
To make the screen appear and stay for 5 balloons * the delay defined by the user for each balloon.


But still it's just a workaround. Ideally this part of the game mechanism should be wrote in a way that don't trigger this problem.
 

zhoope

Newbie
Game Developer
May 8, 2017
39
31
I am very grateful for the time that both of you have afford to help me However doesn't solved the problem but helped me to have the base knowledge to find an alternative solution, btw the prologue will be release in this friday.