我对主窗口中的弹出窗口有疑问。如何确保当有一个弹出窗口(用于设置日期和时间)时,直到用户关闭该弹出窗口,才能触摸主窗口(即关闭或按下任何按钮)。
我尝试使用 public static class AnimSprite implements Comparable<AnimSprite >
{
//...//
Override
public int compareTo(AnimSprite o)
{
float result = this.z - o.z;
if (result == 0f) result = this.y - o.y;
return ((int)(result));
}
,但仍可以关闭主窗口,这会导致错误消息:
grab_set
bgerror failed to handle background error.
对我有用,但是我无法移动弹出窗口。
grab_set_global
我希望它专注于弹出窗口,并且在关闭/销毁弹出窗口之前,它下面的主窗口将无法关闭。