引用・参考文献 [Solved]Opacity update after slider moving - Lemma Soft Forums
1.変数の定義
define persistent.window_alpha = 1.0
options.rpy内とかに👆をかいときます
defineの意味はここ Python ステートメント — Ren'Py Documentation
defaultでもよさげかな?とりあえずこれで動いてるしいっか……
2.オプションに追加
label _("ウインドウ透明度") null height (6) hbox: style_prefix "slider" text _("淡 ") : alt "" bar value FieldValue(persistent, 'window_alpha', 1.0, max_is_zero=False, offset=0, step=1): xmaximum 270 text _(" 濃") : alt ""
screens.rpyのpreferencesスクリーンにこんなん書く
null height:~px分の高さの空白表示 間隔を調整してます(6pxくらいあけてねってかいてる)
style_prefix:これをかいたらslider~うんぬんってかくstyleに順じた見た目になる
styleはcssの定義に似てるやつ……ちょっと説明のしかたがわからない!
xmaximum:バーの最大の長さは270ぐらいにしてねってかいてる
alt:セルフボイシング(テキスト読み上げ機能)の読み上げ
3.sayスクリーンに追加
screen say(who, what): style_prefix "say" window: id "window" # こっから追加 background Transform(style.window.background, alpha=persistent.window_alpha) # 追加おわり
screens.rpyのsayスクリーンに追記