blob: 074cc7862000309da880ce816e660356e44aaa38 [file] [log] [blame] [raw]
package li.cil.oc.server.components
import li.cil.oc.common.components.IScreen
import li.cil.oc.common.tileentity.TileEntityScreen
import li.cil.oc.server.PacketSender
class Screen(val owner: TileEntityScreen) extends IScreen {
def resolution_=(value: (Int, Int)) = {
val (w, h) = value
PacketSender.sendScreenResolutionChange(owner, w, h)
}
def set(col: Int, row: Int, s: String) =
PacketSender.sendScreenSet(owner, col, row, s)
def fill(col: Int, row: Int, w: Int, h: Int, c: Char) =
PacketSender.sendScreenFill(owner, col, row, w, h, c)
def copy(col: Int, row: Int, w: Int, h: Int, tx: Int, ty: Int) =
PacketSender.sendScreenCopy(owner, col, row, w, h, tx, ty)
}