Does the image have to be changeable (are you thinking of the jokeyface / angryface icons like in Dragon Age)? If not, I think it'd be easier to just bake the image into a background image. The thing is using the {image} tag is text tag behavior, and customizing that involves editing renpy common files, I think.
A workaround that wouldn't require completely overhauling the menu functions or text tag functions might be something like the following (emphasizing that this is a workaround, not an elegant solution, and that it cribs the idea from this post:
http://lemmasoft.renai.us/forums/viewto ... 78#p310660 )
Code: Select all
screen choice(items):
window:
style "menu_window"
xalign 0.5
yalign 0.5
vbox:
style "menu_vbox"
spacing 2
for caption, action, chosen in items:
## add an hbox so the image and button show up side-by-side.
hbox:
if " (angry)" in caption:
$ caption = caption.replace(" (angry)", "")
add "angry image"
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
label start:
menu:
"Choice 1 (angry)":
pass
"Choice 2":
pass
Depending on how many images you have, you could just hard code the images in with (angry), (happy), etc. Or you could try to parse for it more efficiently if you have a better grasp on python than I do -- I imagine it would require some form of regex, which I know how to read but not write, if you know what I mean.
This method would place the image outside the button, so it may not be what you want (or you could design around it if you'd like), but you could also try fiddling around with placing the image inside the button or not using an hbox and having the image overlap with the button in some form -- it would probably require some trial and error to get the styles right.