Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Do you happen to know how to strikethrough a disabled choice? I have it greyed out with config.include_disabled_choice=True, but having a strikethrough would look better. It’s been a long time since I did this and I can’t remember how it was done.

(3 edits) (+1)

I figured it out, it's actually pretty simple. There's just one line you need to add and one you need to change in the existing code. Let me know if this works for you!

for i in visible_items:
    $ color = i.kwargs.get("color", None)
    $ hover = i.kwargs.get("hover", None)
    $ tooltip_text = i.kwargs.get("tooltip_text", None) # Optional
    ## Add this line
    $ caption = "{s}" + i.caption + "{/s}"
    ## Modify this line
    textbutton (caption if not i.kwargs.get("sensitive", True) else i.caption):
        action i.action
        sensitive i.kwargs.get("sensitive", True)
        ...

This is good enough for me to tinker with, thank you!