Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 1fb101a

Browse files
committed
Fix isFullscreen not being updated before opening screen
1 parent c5e67fd commit 1fb101a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dockyard.version=0.9.7.1-SNAPSHOT
1+
dockyard.version=0.9.7.3-SNAPSHOT
22
kotlin.code.style=official

src/main/kotlin/io/github/dockyardmc/ui/Screen.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ abstract class Screen : CompositeDrawable() {
4141
if (event.cancelled) return
4242

4343
inventorySnapshot = InventorySnapshot(player)
44+
45+
// build before isFullscreen check to make sure that one is set
46+
buildComponent()
47+
4448
if (isFullscreen) {
4549
player.clearInventory()
4650
}

src/main/kotlin/io/github/dockyardmc/ui/TestScreen.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class TestScreen : Screen() {
1212

1313
override fun buildComponent() {
1414
withScreenName("test")
15+
withScreenFullscreen(true)
1516
withScreenRows(6)
1617

1718
withSlot(4, 2) {

0 commit comments

Comments
 (0)