Anyone have a working example of renpy.get_displayable_properties?
Posted: Fri Jul 30, 2021 4:15 am
Anyone have a working example of renpy.get_displayable_properties?
For the sake of learning, I'm trying to get the displayable properties of the Preferences button on the main menu, but I can't get it to return the dictionary of values.
First I added an id to the Preferences displayable.
Then from a function, I'm trying to use get_displayable_properties, but I have no idea what layer the Preferences button is on? I tried all of them, but nothing gets returned.
I've tried every combo, none of them work?
For the sake of learning, I'm trying to get the displayable properties of the Preferences button on the main menu, but I can't get it to return the dictionary of values.
First I added an id to the Preferences displayable.
Code: Select all
textbutton _("Preferences"):
id 'btn_pref'
Code: Select all
init python:
def function_testing():
b5a = renpy.get_displayable_properties(screen='main_menu', id='btn_pref', layer='master')
print b5a
b6a = renpy.get_displayable_properties(screen='game_menu', id='btn_pref', layer='master')
print b6a
b7a = renpy.get_displayable_properties(screen='navigation', id='btn_pref', layer='master')
print b7a
c5b = renpy.get_displayable_properties(screen='main_menu', id='btn_pref', layer='transient')
print c5b
c6b = renpy.get_displayable_properties(screen='game_menu', id='btn_pref', layer='transient')
print c6b
c7b = renpy.get_displayable_properties(screen='navigation', id='btn_pref', layer='transient')
print c7b
db5 = renpy.get_displayable_properties(screen='main_menu', id='btn_pref', layer='screens')
print db5
db6 = renpy.get_displayable_properties(screen='game_menu', id='btn_pref', layer='screens')
print db6
db7 = renpy.get_displayable_properties(screen='navigation', id='btn_pref', layer='screens')
print db7
eb5 = renpy.get_displayable_properties(screen='main_menu', id='btn_pref', layer='overlay')
print eb5
eb6 = renpy.get_displayable_properties(screen='game_menu', id='btn_pref', layer='overlay')
print eb6
eb7 = renpy.get_displayable_properties(screen='navigation', id='btn_pref', layer='overlay')
print eb7