跳转至

ShowQuestionDialog

格式

ShowQuestionDialog(speaker, content, choices, callback)

简介

打开选择对话框。

参数

名称 类型 描述
speaker string 角色名
content string 对话内容
choices list 选择内容
callback 回调函数

实例

当运行开始时打开选择对话框。

import fg

asset = fg.AssetCreate()
asset.name = 'Main Scene'
asset.state = fg.STATE.VOXMODEL
asset.vmFile = 'mainScene'
asset.icon='icon.png'

fg.AssetRegister(asset)

def onStart(self):
    fg.ShowQuestionDialog("NPC", "Hello World!",["A","B"], None)

fg.AssetSetStartCBFunc(asset, onStart)