mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 06:41:51 +09:00
seemingly working hangul 2-set
This commit is contained in:
@@ -101,8 +101,8 @@ object IME {
|
||||
}
|
||||
|
||||
private fun parseImeFile(file: File): TerrarumInputMethod {
|
||||
val src = file.readText(Charsets.UTF_8)
|
||||
val jsval = context.eval("js", "'use strict';$src")
|
||||
val code = file.readText(Charsets.UTF_8)
|
||||
val jsval = context.eval("js", "\"use strict\";(function(){$code})()")
|
||||
val name = jsval.getMember("n").asString()
|
||||
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ class UIItemTextLineInput(
|
||||
override fun update(delta: Float) {
|
||||
super.update(delta)
|
||||
val mouseDown = Terrarum.mouseDown
|
||||
val oldActive = isActive
|
||||
|
||||
if (mouseDown) {
|
||||
isActive = mouseUp
|
||||
@@ -242,6 +243,7 @@ class UIItemTextLineInput(
|
||||
tryCursorBack()
|
||||
}
|
||||
}
|
||||
// TODO IME endComposing() on hitting Enter
|
||||
|
||||
// don't put innards of tryCursorBack/Forward here -- you absolutely don't want that behaviour
|
||||
|
||||
@@ -258,6 +260,9 @@ class UIItemTextLineInput(
|
||||
cursorOn = !cursorOn
|
||||
}
|
||||
}
|
||||
else if (oldActive) { // just became disactivated
|
||||
// TODO IME endComposing()
|
||||
}
|
||||
|
||||
if (mouseDown && !mouseLatched && (enablePasteButton && enableIMEButton && mouseUpOnButton1 || enableIMEButton && !enablePasteButton && mouseUpOnButton2)) {
|
||||
toggleIME()
|
||||
|
||||
Reference in New Issue
Block a user