Ren'Py A non-focusable imagebutton.

Mr. TurTur

Newbie
Jun 12, 2020
85
75
So I created a screen with a working light switch.

br_light_idle/hover means Lights out. It is a dark but transparent layer.

I can use the light switch and turn it on and off without any problems.



BUT when the light is off and the br_light layer is on the screen, it blocks all other imagebuttons.

I want the layer to just darken the image so I can still use the buttons underneath.


Does anyone have any ideas? ty :)


(My swork around would be to create a dark and a light version of each image button and cut out fitting holes in the dark layer.
But that would be sooo tedious).


Screenshot 2022-06-08 204601.png
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,369
15,285
BUT when the light is off and the br_light layer is on the screen, it blocks all other imagebuttons.
When you put a wall between you and what you want to touch, you can't touch it.
It's exactly the same problem that you encounter here. By putting an imagebutton on top of the other buttons, you block them.


Just use and it should works fine:
Python:
screen whatever():

    [...]

    imagebutton:
        auto "br_button_%s"
        action ToggleVariable( "bccc" )

    if bccc:
        add Solid( "#00000055" ) pos(0,0) size( config.screen_width, config.screen_height )
 
  • Like
Reactions: Mr. TurTur