mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
reading text from the keyboard input panel will return the string in Unicode NFC
This commit is contained in:
14
.idea/libraries/ibm_icu_icu4j.xml
generated
Normal file
14
.idea/libraries/ibm_icu_icu4j.xml
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
<component name="libraryTable">
|
||||
<library name="ibm.icu.icu4j" type="repository">
|
||||
<properties maven-id="com.ibm.icu:icu4j:70.1" />
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/icu4j-70.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$PROJECT_DIR$/lib/icu4j-70.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/lib/icu4j-70.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
BIN
lib/icu4j-70.1-javadoc.jar
Normal file
BIN
lib/icu4j-70.1-javadoc.jar
Normal file
Binary file not shown.
BIN
lib/icu4j-70.1-sources.jar
Normal file
BIN
lib/icu4j-70.1-sources.jar
Normal file
Binary file not shown.
BIN
lib/icu4j-70.1.jar
Normal file
BIN
lib/icu4j-70.1.jar
Normal file
Binary file not shown.
@@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.Pixmap
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer
|
||||
import com.ibm.icu.text.Normalizer2
|
||||
import com.jme3.math.FastMath
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.gamecontroller.*
|
||||
@@ -433,9 +434,11 @@ class UIItemTextLineInput(
|
||||
}
|
||||
|
||||
private fun textbufToString(): String {
|
||||
return textbuf.toJavaString()
|
||||
return textbuf.toJavaString().toUnicodeNFC()
|
||||
}
|
||||
|
||||
private fun String.toUnicodeNFC() = Normalizer2.getNFCInstance().normalize(this)
|
||||
|
||||
private fun moveCursorToEnd(stride: Int) {
|
||||
try {
|
||||
cursorX += stride
|
||||
|
||||
@@ -23,5 +23,6 @@
|
||||
<orderEntry type="library" name="gdx-platform-1.10.0-natives-desktop" level="project" />
|
||||
<orderEntry type="library" name="graalvm-js-21.1.0 and graalvm-js-scriptengine-21.1.0" level="project" />
|
||||
<orderEntry type="library" name="jetbrains.kotlinx.coroutines.core" level="project" />
|
||||
<orderEntry type="library" name="ibm.icu.icu4j" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Reference in New Issue
Block a user