按钮暂时替换为文本按钮了。界面的布局请根据需要调整。
[RenPy] 纯文本查看 复制代码 init python:
cname = "chief"
# 头像需要将角色对象与image标签关联后再设置
# image side m = "male_icon.png"
# image side f = "female_icon.png"
# 定义两个角色对象,根据后面的选择修改角色对象c的引用
# 此处用不同的文本颜色区分
define m = Character("[cname]", color="#c8ffc8")
define f = Character("[cname]", color="#c8c8ff")
default c = m
screen character_customize():
modal True
vbox:
text "请输入姓名:(不要按回车键)"
xalign 0.5
input value VariableInputValue("cname") length 32 copypaste True
text "请选择性别:"
hbox:
textbutton "男" action [SetVariable("c", m), Return()]
textbutton "女" action [SetVariable("c", f), Return()]
image grey = "#5f5f5f"
label main_menu:
return
label start:
scene grey
call screen character_customize
"......"
c "你好。"
"......"
return
|