mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-21 16:32:39 +00:00
scientists discover the geometry
This commit is contained in:
3 files changed
+26
-17
No files matched your search
@@ -54,6 +54,7 @@ object GamePackageUtils {
|
|||||||
40L to "2.2074", // ok
|
40L to "2.2074", // ok
|
||||||
41L to "2.2081",
|
41L to "2.2081",
|
||||||
42L to "2.209",
|
42L to "2.209",
|
||||||
|
43L to "2.2091",
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -43,19 +43,6 @@ fun inputTypeForFlags(i: Int): Int {
|
|||||||
return InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_CLASS_TEXT
|
return InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS or InputType.TYPE_CLASS_TEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
fun usesInlineKeyboard(): Boolean {
|
|
||||||
return Build.VERSION.SDK_INT >= 30
|
|
||||||
}
|
|
||||||
|
|
||||||
fun imeOptionsForFlags(i: Int): Int {
|
|
||||||
val i2 = if ((i and BaseRobTopActivity.KEYBOARD_INPUT_MULTILINE) == 0 || !usesInlineKeyboard())
|
|
||||||
EditorInfo.IME_ACTION_DONE else EditorInfo.IME_ACTION_NONE
|
|
||||||
|
|
||||||
return if (usesInlineKeyboard())
|
|
||||||
EditorInfo.IME_FLAG_NO_FULLSCREEN or EditorInfo.IME_FLAG_NO_EXTRACT_UI or i2
|
|
||||||
else i2
|
|
||||||
}
|
|
||||||
|
|
||||||
class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
|
class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
|
||||||
companion object {
|
companion object {
|
||||||
lateinit var cocos2dxGLSurfaceView: Cocos2dxGLSurfaceView
|
lateinit var cocos2dxGLSurfaceView: Cocos2dxGLSurfaceView
|
||||||
@@ -144,6 +131,21 @@ class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
|
|||||||
requestFocus()
|
requestFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun usesInlineKeyboard(): Boolean {
|
||||||
|
if (!sendNewCocosEvents) return false
|
||||||
|
|
||||||
|
return Build.VERSION.SDK_INT >= 30
|
||||||
|
}
|
||||||
|
|
||||||
|
fun imeOptionsForFlags(i: Int): Int {
|
||||||
|
val i2 = if ((i and BaseRobTopActivity.KEYBOARD_INPUT_MULTILINE) == 0 || !usesInlineKeyboard())
|
||||||
|
EditorInfo.IME_ACTION_DONE else EditorInfo.IME_ACTION_NONE
|
||||||
|
|
||||||
|
return if (usesInlineKeyboard())
|
||||||
|
EditorInfo.IME_FLAG_NO_FULLSCREEN or EditorInfo.IME_FLAG_NO_EXTRACT_UI or i2
|
||||||
|
else i2
|
||||||
|
}
|
||||||
|
|
||||||
fun initView() {
|
fun initView() {
|
||||||
setEGLContextClientVersion(2)
|
setEGLContextClientVersion(2)
|
||||||
isFocusableInTouchMode = true
|
isFocusableInTouchMode = true
|
||||||
|
|||||||
@@ -14,15 +14,21 @@ class Cocos2dxTextInputWrapper(private val cocos2dxGLSurfaceView: Cocos2dxGLSurf
|
|||||||
private var originText: String? = null
|
private var originText: String? = null
|
||||||
private var text: String? = null
|
private var text: String? = null
|
||||||
|
|
||||||
private val isFullScreenEdit: Boolean
|
private fun isFullScreenEdit(): Boolean {
|
||||||
get() = (cocos2dxGLSurfaceView.cocos2dxEditText?.context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).isFullscreenMode
|
if (cocos2dxGLSurfaceView.usesInlineKeyboard()) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
val inputMethodManager = cocos2dxGLSurfaceView.cocos2dxEditText?.context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
|
return inputMethodManager.isFullscreenMode
|
||||||
|
}
|
||||||
|
|
||||||
fun setOriginText(originText: String?) {
|
fun setOriginText(originText: String?) {
|
||||||
this.originText = originText
|
this.originText = originText
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun afterTextChanged(editable: Editable) {
|
override fun afterTextChanged(editable: Editable) {
|
||||||
if (isFullScreenEdit) {
|
if (isFullScreenEdit()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +67,7 @@ class Cocos2dxTextInputWrapper(private val cocos2dxGLSurfaceView: Cocos2dxGLSurf
|
|||||||
|
|
||||||
override fun onTextChanged(pCharSequence: CharSequence, start: Int, before: Int, count: Int) {}
|
override fun onTextChanged(pCharSequence: CharSequence, start: Int, before: Int, count: Int) {}
|
||||||
override fun onEditorAction(textView: TextView, actionID: Int, keyEvent: KeyEvent?): Boolean {
|
override fun onEditorAction(textView: TextView, actionID: Int, keyEvent: KeyEvent?): Boolean {
|
||||||
val fullscreenIme = cocos2dxGLSurfaceView.cocos2dxEditText == textView && isFullScreenEdit
|
val fullscreenIme = cocos2dxGLSurfaceView.cocos2dxEditText == textView && isFullScreenEdit()
|
||||||
if (fullscreenIme) {
|
if (fullscreenIme) {
|
||||||
var text = textView.text.toString()
|
var text = textView.text.toString()
|
||||||
if (originText != text || !cocos2dxGLSurfaceView.sendNewCocosEvents) {
|
if (originText != text || !cocos2dxGLSurfaceView.sendNewCocosEvents) {
|
||||||
|
|||||||
Reference in new issue
Block a user