Print screen address at the top of the frame
2
.gitignore
vendored
@ -44,3 +44,5 @@ cacerts
|
|||||||
|
|
||||||
# Workspace save
|
# Workspace save
|
||||||
/save
|
/save
|
||||||
|
|
||||||
|
*~
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 120 B |
BIN
sprites/BorderT.png
Normal file
|
After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 161 B After Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
@ -1,10 +1,11 @@
|
|||||||
Border 96 8 2 8
|
BorderB 3 25 2 8
|
||||||
|
BorderT 0 25 2 10
|
||||||
Circle 0 0 24 24
|
Circle 0 0 24 24
|
||||||
Computer 24 0 24 24
|
Computer 25 0 24 24
|
||||||
CornerBL 96 0 8 8
|
CornerBL 118 0 8 8
|
||||||
CornerBR 104 0 8 8
|
CornerBR 100 11 8 8
|
||||||
CornerTL 112 0 8 8
|
CornerTL 100 0 8 10
|
||||||
CornerTR 120 0 8 8
|
CornerTR 109 0 8 10
|
||||||
DefaultNode 48 0 24 24
|
DefaultNode 50 0 24 24
|
||||||
Empty 98 8 1 1
|
Empty 6 25 1 1
|
||||||
Screen 72 0 24 24
|
Screen 75 0 24 24
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class ScreenWidget(screen: Screen) extends Widget with Logging {
|
|||||||
|
|
||||||
private var data: Array[Cell] = Array.fill(width * height)(Cell(' ', background, foreground))
|
private var data: Array[Cell] = Array.fill(width * height)(Cell(' ', background, foreground))
|
||||||
|
|
||||||
minimumSize = Size2D(width * fontWidth + 32, height * fontHeight + 32)
|
minimumSize = Size2D(width * fontWidth + 32, height * fontHeight + 40)
|
||||||
maximumSize = minimumSize
|
maximumSize = minimumSize
|
||||||
|
|
||||||
private var lastMousePos = Vector2D(0, 0)
|
private var lastMousePos = Vector2D(0, 0)
|
||||||
@ -91,7 +91,7 @@ class ScreenWidget(screen: Screen) extends Widget with Logging {
|
|||||||
val sx = position.x
|
val sx = position.x
|
||||||
val sy = position.y
|
val sy = position.y
|
||||||
val w = fontWidth * width + 32
|
val w = fontWidth * width + 32
|
||||||
val h = fontHeight * height + 32
|
val h = fontHeight * height + 40
|
||||||
|
|
||||||
g.foreground = RGBAColor(30, 30, 30)
|
g.foreground = RGBAColor(30, 30, 30)
|
||||||
g.sprite = "Empty"
|
g.sprite = "Empty"
|
||||||
@ -103,19 +103,25 @@ class ScreenWidget(screen: Screen) extends Widget with Logging {
|
|||||||
val Cell(char, bg, fg) = data(y * width + x)
|
val Cell(char, bg, fg) = data(y * width + x)
|
||||||
g.background = IntColor(bg)
|
g.background = IntColor(bg)
|
||||||
g.foreground = IntColor(fg)
|
g.foreground = IntColor(fg)
|
||||||
g.char(sx + x * fontWidth + 16, sy + y * fontHeight + 16, char)
|
g.char(sx + x * fontWidth + 16, sy + y * fontHeight + 20, char)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g.sprite("CornerTL", sx, sy, 16, 16)
|
g.sprite("CornerTL", sx, sy, 16, 20)
|
||||||
g.sprite("CornerTR", sx + w - 16, sy, 16, 16)
|
g.sprite("CornerTR", sx + w - 16, sy, 16, 20)
|
||||||
g.sprite("CornerBL", sx, sy + h - 16, 16, 16)
|
g.sprite("CornerBL", sx, sy + h - 16, 16, 16)
|
||||||
g.sprite("CornerBR", sx + w - 16, sy + h - 16, 16, 16)
|
g.sprite("CornerBR", sx + w - 16, sy + h - 16, 16, 16)
|
||||||
g.sprite("Border", sx + 16, sy + 0, w - 32, 16)
|
g.sprite("BorderT", sx + 16, sy + 0, w - 32, 20)
|
||||||
g.sprite("Border", sx + 16, sy + h - 16, w - 32, 16)
|
g.sprite("BorderB", sx + 16, sy + h - 16, w - 32, 16)
|
||||||
g.sprite("Border", sx + 0, sy + 16, 16, h - 32, 270)
|
g.sprite("BorderB", sx + 0, sy + 20, 16, h - 36, 270)
|
||||||
g.sprite("Border", sx + w - 16, sy + 16, 16, h - 32, 270)
|
g.sprite("BorderB", sx + w - 16, sy + 20, 16, h - 36, 270)
|
||||||
|
|
||||||
|
g.setSmallFont()
|
||||||
|
g.background = RGBAColor(0, 0, 0, 0)
|
||||||
|
g.foreground = RGBAColor(110, 110, 110)
|
||||||
|
g.text(sx + 12, sy + 6, screen.node.address)
|
||||||
|
g.setNormalFont()
|
||||||
}
|
}
|
||||||
|
|
||||||
def set(x: Int, y: Int, text: String, vertical: Boolean): Unit = {
|
def set(x: Int, y: Int, text: String, vertical: Boolean): Unit = {
|
||||||
|
|||||||