aurawave

Tooltips for disabled choices

Mar 5th, 2026 (edited)
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. textbutton i.caption:
  2. # Only apply custom colors if the button is active.
  3. # Disabled choices will use gui.choice_button_text_insensitive_color.
  4. if i.kwargs.get("sensitive", True): # We need to check the kwarg that corresponds to whether a button is supposed to be disabled or not, but never actually apply the sensitive property
  5. if color != None:
  6. text_color color
  7. if hover != None:
  8. text_hover_color hover
  9. action i.action
  10. else: # If the sensitive kwarg fails (the player doesn't pass the check), make the button look disabled and do nothing
  11. idle_background "gui/button/choice_insensitive_background.png"
  12. hover_background "gui/button/choice_insensitive_background.png"
  13. text_color gui.choice_button_text_insensitive_color
  14. text_hover_color gui.choice_button_text_insensitive_color
  15. action NullAction()
  16. # Optional: If choices are shown but disabled for the player, the text will appear with a strikethrough.
  17. # To enable this feature, simply uncomment this line.
  18. # text_style "disabled_strikethrough"
Tags: ren'py
Advertisement
Add Comment
Please, Sign In to add comment