mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-21 16:32:39 +00:00
platformcapability changed to bool
This commit is contained in:
2 files changed
+8
-5
No files matched your search
@@ -451,9 +451,12 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCapabilityAdded(capability: String) {
|
override fun onCapabilityAdded(capability: String): Boolean {
|
||||||
if (capability == GeodeUtils.CAPABILITY_EXTENDED_INPUT) {
|
if (capability == GeodeUtils.CAPABILITY_EXTENDED_INPUT) {
|
||||||
mGLSurfaceView?.useKeyboardEvents = true
|
mGLSurfaceView?.useKeyboardEvents = true
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ object GeodeUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface CapabilityListener {
|
interface CapabilityListener {
|
||||||
fun onCapabilityAdded(capability: String)
|
fun onCapabilityAdded(capability: String): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const val CAPABILITY_EXTENDED_INPUT = "extended_input"
|
const val CAPABILITY_EXTENDED_INPUT = "extended_input"
|
||||||
@@ -460,12 +460,12 @@ object GeodeUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun reportPlatformCapability(capability: String?) {
|
fun reportPlatformCapability(capability: String?): Boolean {
|
||||||
if (capability.isNullOrEmpty()) {
|
if (capability.isNullOrEmpty()) {
|
||||||
return
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
capabilityListener.get()?.onCapabilityAdded(capability)
|
return capabilityListener.get()?.onCapabilityAdded(capability) ?: false
|
||||||
}
|
}
|
||||||
|
|
||||||
external fun nativeKeyUp(keyCode: Int, modifiers: Int)
|
external fun nativeKeyUp(keyCode: Int, modifiers: Int)
|
||||||
|
|||||||
Reference in new issue
Block a user