mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-21 08:19:33 +00:00
impl showDialog
This commit is contained in:
2 files changed
+14
-1
No files matched your search
@@ -14,6 +14,7 @@ import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.FrameLayout
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
@@ -230,7 +231,14 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
|
||||
}
|
||||
|
||||
override fun showDialog(title: String, message: String) {
|
||||
TODO("Not yet implemented")
|
||||
runOnUiThread {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle(title)
|
||||
.setMessage(message)
|
||||
// the button shouldn't do anything but close
|
||||
.setPositiveButton(R.string.message_box_accept) { _, _ -> }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun showEditTextDialog(
|
||||
|
||||
@@ -40,6 +40,11 @@ object Cocos2dxHelper {
|
||||
return BaseRobTopActivity.me.get()?.resources?.configuration?.densityDpi ?: -1
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showDialog(title: String, message: String) {
|
||||
cocos2dxHelperListener?.showDialog(title, message)
|
||||
}
|
||||
|
||||
fun init(context: Context, cocos2dxHelperListener: Cocos2dxHelperListener) {
|
||||
val applicationInfo: ApplicationInfo = context.applicationInfo
|
||||
// sContext = pContext
|
||||
|
||||
Reference in new issue
Block a user