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.
def get_sensitive(self):
if _in_replay:
return False
return renpy.can_load(__slotname(self.name, self.page))
def get_selected(self):
if not self.confirm or not self.newest:
return False
return __newest_slot() == __slotname(self.name, self.page)
Can you help me about this methods, when will this method will be used?
They will both be used when the screen renders each button in order to set the sensitive (whether the button responds to clicks or hover events) and selected (whether the button shows the selected version of it's text/background/image or not) properties of the button.
In most cases get_selected will not be used as once you click Load the screen hides to proceed with the loaded game. Systems that limit a game to using just one slot out of a set number might use this though to highlight it.