标签: user-interface libgdx
如何检查舞台的演员是否对用户可见?
我回收了一个 Dialog 来向用户显示消息,用 stage.show(dialog) 显示它。
stage.show(dialog)
我已经尝试过 dialog.isVisible() 但它返回 true 即使它不可见...
dialog.isVisible()
true
谢谢
答案 0 :(得分:1)
对于对话框,您需要检查 hasParent 以查看它是否在舞台上
hasParent