是否可以显示在 roPinEntryDialog 中输入的数字?

Is it possible to show the numbers entered in a roPinEntryDialog?

我有一个使用 roPinEntryDialog 的 Roku 应用程序,像这样:

function EnterCode() as Boolean
    screen = CreateObject("roPinEntryDialog")
    mp = CreateObject("roMessagePort")
    screen.SetMessagePort(mp)
    screen.SetNumPinEntryFields(8)
    screen.SetTitle("Enter Code")
    screen.AddButton(0, "Next")
    screen.AddButton(1, "Cancel")
    screen.Show()

    while true
        msg = wait(0, screen.GetMessagePort())
        if type(msg) = "roPinEntryDialogEvent"
            print "Show Code: Index: ";msg.GetIndex();" Data: ";msg.GetData()
            if msg.isScreenClosed()
                return false              
            else if msg.isButtonPressed()
                token=screen.Pin()
                print "token: ";token
                if msg.GetIndex() = 0 then return true
                if msg.GetIndex() = 1 then return false
            endif
        endif
    end while
end function

当我使用此对话框时,它会将输入的数字显示为星号。我尝试使用 screen.SetSecureText(false),但不幸的是,它只适用于文本框。有没有办法显示输入的数字?如果没有,是否有我应该尝试的替代数字对话框?

roPinEntryDialog 不支持。如果您正在编写 SceneGraph 应用程序,则可以使用 PinPad widget or MiniKeyboard.

这里是 Roku 员工。

Cassidy,请注意,自 2018 年 1 月起,old SDK1 visual screen components are actually deprecated 和包含这些组件将导致频道更新无法通过我们的认证。此外,这些组件将于次年从固件本身中删除. roPinEntryDialog 包含在弃用组件列表中。

虽然仍然需要使用 SDK1 UI 提交频道更新,但您最终将不得不更新 SceneGraph 中的 UI。鉴于您已经在频道上工作,现在可能是转换频道的理想时机。

如前所述,我建议使用 PinPad、PinDiaglog、Keyboard 或 KeyboardDialog 节点。如果您确定要使用旧的 SDK1 模型,那么您可以使用 roKeyboardScreen,但您会有 运行 让用户输入字母和数字的风险。