mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 22:01:52 +09:00
more text on the config gui
This commit is contained in:
@@ -177,9 +177,19 @@ class UIIMEConfig(remoCon: UIRemoCon?) : UICanvas() {
|
||||
App.fontGame.draw(batch, txt2, selDrawX + halfselw + (halfselw - tw2) / 2, y1)
|
||||
|
||||
// title
|
||||
// TODO only when text input using gamepad is supported, and even then, use text spinner
|
||||
// val title = Lang["MENU_LABEL_IME"]
|
||||
// App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat())
|
||||
// todo show "Keyboard"/"Gamepad" accordingly
|
||||
val title = Lang["MENU_CONTROLS_KEYBOARD"]
|
||||
batch.color = Color.WHITE
|
||||
App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat())
|
||||
|
||||
|
||||
// button help for string input UI
|
||||
val help1 = "↓ ${Lang["MENU_LABEL_IME_TOGGLE"]}"
|
||||
App.fontGame.draw(batch, help1, drawX + 10f, height - 40f - 28f)
|
||||
val help2 = "${Lang["MENU_LABEL_PASTE_FROM_CLIPBOARD"]} ↑"
|
||||
App.fontGame.draw(batch, help2, drawX + keyboardTestPanel.width - 4f - App.fontGame.getWidth(help2), height - 40f + 30f)
|
||||
|
||||
|
||||
|
||||
batch.color = Color.WHITE
|
||||
uiItems.forEach { it.render(batch, camera) }
|
||||
|
||||
@@ -197,18 +197,20 @@ class UIKeyboardControlPanel(remoCon: UIRemoCon?) : UICanvas() {
|
||||
uiItems.forEach { it.render(batch, camera) }
|
||||
buttonReset.render(batch, camera)
|
||||
|
||||
// title
|
||||
// todo show "Keyboard"/"Gamepad" accordingly
|
||||
batch.color = Color.WHITE
|
||||
val title = Lang["MENU_CONTROLS_KEYBOARD"]
|
||||
App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat())
|
||||
|
||||
val desc = Lang["MENU_LABEL_KEYCONFIG_HELP1"]
|
||||
App.fontGame.draw(batch, desc, drawX.toFloat() + (width - App.fontGame.getWidth(desc)) / 2, drawY + 360f)
|
||||
|
||||
// action palette
|
||||
batch.color = Color.WHITE
|
||||
if (keycapClicked >= 0 && controlSelected < 0) {
|
||||
controlPalette.render(batch, camera)
|
||||
}
|
||||
|
||||
// title
|
||||
// TODO display window "title" using text spinner ONLY WHEN gamepad config is also supported
|
||||
// val title = Lang["MENU_OPTIONS_CONTROLS"]
|
||||
// batch.color = Color.WHITE
|
||||
// App.fontGame.draw(batch, title, drawX.toFloat() + (width - App.fontGame.getWidth(title)) / 2, drawY.toFloat())
|
||||
|
||||
}
|
||||
|
||||
fun setControlOf(key: Int, control: Int) {
|
||||
|
||||
@@ -113,8 +113,8 @@ internal class UnsafePtr(pointer: Long, allocSize: Long) {
|
||||
// appear (e.g. getting garbage values when it fucking shouldn't)
|
||||
|
||||
// using ifs instead of assertions: inactive assert statements still slows down the app
|
||||
if (destroyed) { throw DanglingPointerException("The pointer is already destroyed ($this)") }
|
||||
if (index !in 0 until size) { throw AddressOverflowException("Index: $index; alloc size: $size") }
|
||||
// if (destroyed) { throw DanglingPointerException("The pointer is already destroyed ($this)") }
|
||||
// if (index !in 0 until size) { throw AddressOverflowException("Index: $index; alloc size: $size") }
|
||||
}
|
||||
|
||||
operator fun get(index: Long): Byte {
|
||||
|
||||
Reference in New Issue
Block a user