@@ -84,6 +84,9 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
84
84
/* * Whether the view is being painted for the first time. */
85
85
protected var firstPaint: Boolean = true
86
86
87
+ /* * Whether the view should be painted to a fresh inventory. */
88
+ protected var drawToFreshInventory: Boolean = true
89
+
87
90
/* * Whether a click is being processed. */
88
91
public var isProcessingClick: Boolean = false
89
92
@@ -278,6 +281,11 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
278
281
openIfClosed.set(true )
279
282
shouldBeOpened.set(true )
280
283
284
+ // If we want to redraw the title we use a new inventory always
285
+ if (backing.builder.redrawTitleOnReopen) {
286
+ drawToFreshInventory = true
287
+ }
288
+
281
289
// Either draw the entire interface or just re-render it
282
290
if (firstPaint) {
283
291
redrawComplete()
@@ -671,7 +679,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
671
679
drawPaneToInventory(drawNormalInventory = false , drawPlayerInventory = true )
672
680
}
673
681
674
- protected open fun requiresNewInventory (): Boolean = firstPaint
682
+ protected open fun requiresNewInventory (): Boolean = drawToFreshInventory
675
683
676
684
protected open fun requiresPlayerUpdate (): Boolean = false
677
685
@@ -730,6 +738,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
730
738
}
731
739
openIfClosed.set(false )
732
740
firstPaint = false
741
+ drawToFreshInventory = false
733
742
}
734
743
}
735
744
0 commit comments