参照:Screen Actions, Values, and Functions — Ren'Py Documentation
ボタンのactionを複数付けると、
ラジオボタンのような一つのみがセレクトされる状態を
Ren'Pyがうまく理解できないことがある。
そのためSelectedIfで選択中の判定に使用したいアクションをかっこで括る。
おそらくラジオボタンの性質上、
変更の内容は違っても変更するものは同じである必要がある。
(Aの横幅を1にするボタン、Aの横幅を2に変更するボタンはその内容をselectedifには選べるがAの横幅を1にするボタン、Aの高さを1に変更にするボタンの内容をselectedifに指定してラジオボタンとして扱うことは不可)
使用例
label _("フォントの変更") style_prefix "radio" if preferences.language == "en_us": textbutton "[gfont_name_en]": action [SelectedIf(StylePreference("width", "0")), gui.SetPreference("font", "JF-Dot-Kappa20-0213.ttf"),Preference("font transform", None)] text_font "JF-Dot-Kappa20-0213.ttf" null width 10 textbutton "BIZ UD Gothic": action [SelectedIf(StylePreference("width", "1")), gui.SetPreference("font", "BIZUDGothic-Regular.ttf"),Preference("font transform", None)] text_font "BIZUDGothic-Regular.ttf"