mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
Fixed screen resolution changes not being applied to the GUI without re-opening it.
This commit is contained in:
parent
22d020004c
commit
4c39ee547c
@ -375,8 +375,15 @@ object TextBuffer {
|
||||
|
||||
var dirty = false
|
||||
|
||||
var lastChange = 0L
|
||||
|
||||
var nodeAddress = ""
|
||||
|
||||
def markDirty() {
|
||||
dirty = true
|
||||
lastChange = owner.owner.world.getWorldTime
|
||||
}
|
||||
|
||||
def render() = false
|
||||
|
||||
def onScreenColorChange()
|
||||
@ -418,36 +425,35 @@ object TextBuffer {
|
||||
|
||||
class ClientProxy(val owner: TextBuffer) extends Proxy {
|
||||
override def render() = {
|
||||
val wasDirty = dirty
|
||||
TextBufferRenderCache.render(owner)
|
||||
wasDirty
|
||||
lastChange == owner.owner.world.getWorldTime
|
||||
}
|
||||
|
||||
override def onScreenColorChange() {
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenCopy(col: Int, row: Int, w: Int, h: Int, tx: Int, ty: Int) {
|
||||
super.onScreenCopy(col, row, w, h, tx, ty)
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenDepthChange(depth: ColorDepth) {
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenFill(col: Int, row: Int, w: Int, h: Int, c: Char) {
|
||||
super.onScreenFill(col, row, w, h, c)
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenPaletteChange(index: Int) {
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenResolutionChange(w: Int, h: Int) {
|
||||
super.onScreenResolutionChange(w, h)
|
||||
dirty = true
|
||||
markDirty()
|
||||
}
|
||||
|
||||
override def onScreenSet(col: Int, row: Int, s: String, vertical: Boolean) {
|
||||
|
@ -9,7 +9,6 @@ import li.cil.oc.common.component
|
||||
import li.cil.oc.util.PackedColor
|
||||
import net.minecraft.nbt.NBTTagCompound
|
||||
import net.minecraft.util.StatCollector
|
||||
import scala.collection.convert.WrapAsScala._
|
||||
|
||||
abstract class GraphicsCard extends component.ManagedComponent {
|
||||
val node = Network.newNode(this, Visibility.Neighbors).
|
||||
|
Loading…
x
Reference in New Issue
Block a user