mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
making sure unused screen be disposed, and not breaking the app
This commit is contained in:
@@ -2053,7 +2053,7 @@
|
||||
},
|
||||
{
|
||||
"n": "MENU_LABEL_MAINMENU",
|
||||
"s": "메뉴"
|
||||
"s": "메인 메뉴"
|
||||
},
|
||||
{
|
||||
"n": "MENU_LABEL_MORE",
|
||||
|
||||
@@ -478,6 +478,7 @@ public class AppLoader implements ApplicationListener {
|
||||
|
||||
if (this.screen != null) {
|
||||
this.screen.hide();
|
||||
this.screen.dispose();
|
||||
}
|
||||
this.screen = screen;
|
||||
if (this.screen != null) {
|
||||
|
||||
@@ -239,7 +239,7 @@ object LoadScreen : ScreenAdapter() {
|
||||
for (i in 0 until messages.elemCount) {
|
||||
Terrarum.fontGame.draw(it,
|
||||
messages[i] ?: "",
|
||||
40f,
|
||||
AppLoader.getTvSafeGraphicsWidth() + 16f,
|
||||
80f + (messages.size - i - 1) * Terrarum.fontGame.lineHeight
|
||||
)
|
||||
}
|
||||
@@ -264,7 +264,7 @@ object LoadScreen : ScreenAdapter() {
|
||||
for (i in 0 until messages.elemCount) {
|
||||
Terrarum.fontGame.draw(it,
|
||||
messages[i] ?: "",
|
||||
40f,
|
||||
AppLoader.getTvSafeGraphicsWidth() + 16f,
|
||||
80f + (messages.size - i - 1) * Terrarum.fontGame.lineHeight
|
||||
)
|
||||
}
|
||||
|
||||
@@ -198,7 +198,6 @@ class UIItemInventoryElem(
|
||||
|
||||
|
||||
override fun dispose() {
|
||||
itemImage?.texture?.dispose()
|
||||
}
|
||||
|
||||
override fun keyUp(keycode: Int): Boolean {
|
||||
|
||||
@@ -180,7 +180,6 @@ class UIItemInventoryElemSimple(
|
||||
|
||||
|
||||
override fun dispose() {
|
||||
itemImage?.texture?.dispose()
|
||||
}
|
||||
|
||||
override fun keyUp(keycode: Int): Boolean {
|
||||
|
||||
@@ -186,7 +186,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
IngameRenderer.dispose()
|
||||
blockPointingCursor.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user