mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
cursor position reset for going left
This commit is contained in:
@@ -379,8 +379,9 @@ Object.freeze({"n":"세벌식 3-90","states":states,
|
|||||||
},
|
},
|
||||||
"end":()=>{
|
"end":()=>{
|
||||||
console.log(`end composing`)
|
console.log(`end composing`)
|
||||||
|
let ret = bufAssemble()
|
||||||
reset()
|
reset()
|
||||||
return bufAssemble()
|
return ret
|
||||||
},
|
},
|
||||||
"reset":()=>{ reset() },
|
"reset":()=>{ reset() },
|
||||||
"composing":()=>(states.code!=0)
|
"composing":()=>(states.code!=0)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import net.torvald.terrarum.gamecontroller.TerrarumInputMethod
|
|||||||
import net.torvald.terrarum.utils.Clipboard
|
import net.torvald.terrarum.utils.Clipboard
|
||||||
import net.torvald.terrarumsansbitmap.gdx.CodepointSequence
|
import net.torvald.terrarumsansbitmap.gdx.CodepointSequence
|
||||||
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||||
import java.util.ArrayList
|
|
||||||
import kotlin.streams.toList
|
import kotlin.streams.toList
|
||||||
|
|
||||||
data class InputLenCap(val count: Int, val unit: CharLenUnit) {
|
data class InputLenCap(val count: Int, val unit: CharLenUnit) {
|
||||||
@@ -205,7 +204,12 @@ class UIItemTextLineInput(
|
|||||||
cursorX -= 1
|
cursorX -= 1
|
||||||
cursorDrawX = App.fontGame.getWidth(CodepointSequence(textbuf.subList(0, cursorX)))
|
cursorDrawX = App.fontGame.getWidth(CodepointSequence(textbuf.subList(0, cursorX)))
|
||||||
tryCursorForward()
|
tryCursorForward()
|
||||||
}
|
if (cursorX <= 0) {
|
||||||
|
cursorX = 0
|
||||||
|
cursorDrawX = 0
|
||||||
|
cursorDrawScroll = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (cursorX < textbuf.size && keycodes.contains(Input.Keys.RIGHT)) {
|
else if (cursorX < textbuf.size && keycodes.contains(Input.Keys.RIGHT)) {
|
||||||
// TODO IME endComposing()
|
// TODO IME endComposing()
|
||||||
cursorX += 1
|
cursorX += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user