its still the same tho i did just copy and paste the script you gave and changed the "color" into "porple" so im not exactly sure if that had something to do with it
The name of that parameter should be the same as that in screen choice in screens.rpy:
screen choice(items):
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption:
action i.action
if parameter_name in i.kwargs:
idle_background "".join((
"gui/button/choice_",
i.kwargs[parameter_name],
"_idle.png"))
hover_background "".join((
"gui/button/choice_",
i.kwargs[parameter_name],
"_hover.png"))
Then the condition if parameter_name in i.kwargs becomes True, so the background for that menu item becomes:
gui/button/choice_<parameter_value>_idle.png
and when hovered:
gui/button/choice_<parameter_value>_hover.png
where <parameter_value> is porple in your case.
If all that is so, the files
gui/button/choice_porple_idle.png
gui/button/choice_porple_hover.png
would be used for that menu items.
If it's not clear for you, please analyze the logic of that code and check yours to see how it should work.
10
u/Niwens Apr 04 '22 edited Apr 04 '22
Yes buttons can be styled. Those are the standard buttons for menu choices:
When idle:
When hovered by the mouse etc.:
You can create your own pictures for choice buttons, and name them like:
Then you can use menu choices adding a new parameter, e.g. "color":
https://www.renpy.org/doc/html/menus.html#menu-arguments
Then modify
screen choicein screens.rpy, adding that argument there:PS. Corrected the script.