Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- textbutton i.caption:
- # Only apply custom colors if the button is active.
- # Disabled choices will use gui.choice_button_text_insensitive_color.
- 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
- if color != None:
- text_color color
- if hover != None:
- text_hover_color hover
- action i.action
- else: # If the sensitive kwarg fails (the player doesn't pass the check), make the button look disabled and do nothing
- idle_background "gui/button/choice_insensitive_background.png"
- hover_background "gui/button/choice_insensitive_background.png"
- text_color gui.choice_button_text_insensitive_color
- text_hover_color gui.choice_button_text_insensitive_color
- action NullAction()
- # Optional: If choices are shown but disabled for the player, the text will appear with a strikethrough.
- # To enable this feature, simply uncomment this line.
- # text_style "disabled_strikethrough"
Advertisement
Add Comment
Please, Sign In to add comment