I'm having trouble messing around with the choice menu buttons. I know how to get rid of the button background/frame and change the font, but that's it.
How would I go about repositioning or reskinning the buttons? This isn't for anything specific; I just wanna know for reference since I'm brushing up on my GUI-making skills.
Thanks!
Customizing Choice Menu? How do?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: Customizing Choice Menu? How do?
You begin by going to the Cookbook section of the forum where all the tutorials are stored and reading this tutorial: [Tutorial] Customizing Menus. This will give you all the basics of how ALL the buttons can be changed, including the Choice buttons.Giovedi wrote:I'm having trouble messing around with the choice menu buttons. I know how to get rid of the button background/frame and change the font, but that's it.
How would I go about repositioning or reskinning the buttons? This isn't for anything specific; I just wanna know for reference since I'm brushing up on my GUI-making skills.
Thanks!
Changing the choice buttons to your personal graphics is as simple as making your graphic and adding it in right UNDER the screen choice code.
Code: Select all
###################################################################
init -2:
$ config.narrator_menu = True
## ----- Button Background -------------------------------------
style menu_choice_button is button:
background Frame("ui/choice_bg_idle.png",0,0)
hover_background Frame("ui/choice_bg_hover.png",0,0)
# Sets Max Widths
xminimum int(config.screen_width * 0.45)
xmaximum int(config.screen_width * 0.45)
#Sets minimum height -- recommend exact height of your button image
yminimum 60
ypadding 5
xpadding 5
Code: Select all
screen choice:
window:
style "menu_window"
xalign 0.5
yalign 0.5
Code: Select all
##############################################################################
# Choice
screen choice:
window:
style "menu_window"
xalign 0.5
yalign 0.5
$i = 0
hbox:
spacing 2
vbox:
style "menu"
spacing 2
for caption, action, chosen in items:
$i += 1
if i % 2 == 1:
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
if i % 2 == 0:
$i = 1
else:
$i = 1
vbox:
style "menu"
spacing 2
for caption, action, chosen in items:
$i += 1
if i % 2 == 1:
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
screen choice2:
window:
style "menu_window"
xalign 0.5
yalign 0.5
vbox:
style "menu"
spacing 5
for caption, action, chosen in items:
if action:
button:
action action
style "menu_choice_button"
text caption style "menu_choice"
else:
text caption style "menu_caption"
##########################################################################
init -2:
$ config.narrator_menu = True
# Menu Choice Buttons -----------------------------------
## ----- Menu Choice Background -----------------
# The frame around the buttons.
style menu_window:
is default
## ----- Button Text ------------------------------
style menu_choice is button_text:
# font "fo/AZOTE.TTF"
size 22
color "#ffcc66"
hover_color "#ffffff"
xalign 0.5
yalign 0.5
outlines [(1, "#330000", 0, 0)]
hover_outlines [(1, "#660066", 0, 0)]
drop_shadow [(2, 2)]
drop_shadow_color "#663300"
## ----- Button Background -------------------------------------
style menu_choice_button is button:
background Frame("ui/choice_bg_idle.png",0,0)
hover_background Frame("ui/choice_bg_hover.png",0,0)
# Sets Max Widths
xminimum int(config.screen_width * 0.55)
xmaximum int(config.screen_width * 0.55)
#Sets minimum height -- recommend exact height of your button image
yminimum 60
ypadding 5
xpadding 5
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Re: Customizing Choice Menu? How do?
Thanks -- the cookbook tutorials confused me, see, because I'm not all that good at this stuff. I appreciate your explanation!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Lohre