Sub btnDialogue_Click
screen.Initialize("overlay")
screen.Color = xui.Color_ARGB(0x80, 0x20, 0x20, 0x20)
screen.Elevation = 16dip ' Ensure any elevated views are covered
Activity.AddView(screen, 0, 0, 100%x, 100%y) ' Load background panel
base.Initialize("")
screen.AddView(base, 5%x, 30%y, 90%x , 120dip)
base.LoadLayout("Dialogue")
lblQuery.Text = "Are you sure that you want to leave the game?"
lblNo.Text = "Exit"
lblYes.Text = "Cancel"
End Sub
Sub overlay_Touch (Action As Int, X As Float, Y As Float)
Return True ' Ensure touches on the overlay are consumed
End Sub
Sub lblNo_Click
MsgboxAsync("Exit the game", "Response received")
clear
End Sub
Sub lblYes_Click
MsgboxAsync("Continue with the game", "Response received")
clear
End Sub
' Clear overlay dialogue
Sub clear
base.RemoveAllViews
screen.RemoveView
End Sub