Android Studio Libgdx更多触动屏幕

时间:2015-08-23 21:24:25

标签: android libgdx touch

当我需要同时按下2个按钮时,我遇到了问题。我正在使用Gdx.input.getX()来获取坐标并检查按下哪个区域,但是当同时有两个触摸时,它不再起作用。在这种情况下该怎么办?

1 个答案:

答案 0 :(得分:0)

使用InputProcessor。 https://github.com/libgdx/libgdx/wiki/Event-handling

例如:

    Dim insertSql As String = "INSERT INTO StudentTable VALUES ('" + BadgeNoTextBox.Text + "','" + FirstNameTextBox.Text + "','" + LastNameTextBox.Text + "','" + SAPSIDTextBox.Text + "','" + EmailTextBox.Text + "'.'" + PhoneTextBox.Text + "','" + CollegeComboBox.Text + "')"
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""C:\Users\larsennicholasg\Documents\Visual Studio   2012\Projects\SSCLogin\SSCLogin\My Project\SSCStudent.mdb"""
    Dim da As New OleDbDataAdapter(insertSql, conn)

    If (da.Update(ds)) Then
        MessageBox.Show("Success")
    Else
        MessageBox.Show("Fail")
    End If