mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-27 15:06:41 -04:00
send palette change update
(cherry picked from commit f74af9cafe257dea80fadaa52d41d63654ae2a81)
This commit is contained in:
parent
21ce8b11cb
commit
50f5713bfd
@ -308,6 +308,9 @@ class TextBuffer(val host: EnvironmentHost) extends prefab.ManagedEnvironment wi
|
|||||||
colorDepthChanged
|
colorDepthChanged
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override def onBufferPaletteChange(index: Int): Unit =
|
||||||
|
proxy.onBufferPaletteChange(index)
|
||||||
|
|
||||||
override def onBufferColorChange(): Unit =
|
override def onBufferColorChange(): Unit =
|
||||||
proxy.onBufferColorChange()
|
proxy.onBufferColorChange()
|
||||||
|
|
||||||
|
@ -20,9 +20,12 @@ trait TextBufferProxy extends api.internal.TextBuffer {
|
|||||||
|
|
||||||
override def getColorDepth: TextBuffer.ColorDepth = data.format.depth
|
override def getColorDepth: TextBuffer.ColorDepth = data.format.depth
|
||||||
|
|
||||||
|
def onBufferPaletteChange(index: Int): Unit = {}
|
||||||
|
|
||||||
override def setPaletteColor(index: Int, color: Int): Unit = data.format match {
|
override def setPaletteColor(index: Int, color: Int): Unit = data.format match {
|
||||||
case palette: PackedColor.MutablePaletteFormat =>
|
case palette: PackedColor.MutablePaletteFormat =>
|
||||||
palette(index) = color
|
palette(index) = color
|
||||||
|
onBufferPaletteChange(index)
|
||||||
case _ => throw new Exception("palette not available")
|
case _ => throw new Exception("palette not available")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user