showif doesn't deliver events to children of its children

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
Kia
Miko-Class Veteran
Posts: 902
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Skype: KiaAzad
Contact:

showif doesn't deliver events to children of its children

#1 Post by Kia » Thu Mar 21, 2019 5:19 pm

it seems that showif only delivers events to it's children and not their children, considering that often the screen elements are nested, it creates undesirable results while trying it with complex screens.
here's an example:

Code: Select all

transform on_hide_test:
    alpha 0.0
    on appear:
        linear .3 alpha 1
    on show:
        linear .3 alpha 1
    on hide:
        linear .3 alpha 0

screen on_hid_scr:
    default hid = 0
    vbox:
        showif hid:
            hbox:
                button:
                    at on_hide_test
                    text "hide"
                    yalign 0.1
                    action ToggleScreenVariable("hid", 0, 1)
        else:
            button:
                at on_hide_test
                text "hide"
                yalign 0.1
                action ToggleScreenVariable("hid", 0, 1)

Post Reply

Who is online

Users browsing this forum: No registered users