aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDmitry Iskrich2016-07-03 16:48:38 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit260c44beed4c67f3576503e6a22daad955ec2af5 (patch)
treef706eecfcf49ac1271e05a800c7da60a7435e088 /engines
parent3cf8510c418ae6fd9683691c8da01aba062c3367 (diff)
downloadscummvm-rg350-260c44beed4c67f3576503e6a22daad955ec2af5.tar.gz
scummvm-rg350-260c44beed4c67f3576503e6a22daad955ec2af5.tar.bz2
scummvm-rg350-260c44beed4c67f3576503e6a22daad955ec2af5.zip
DIRECTOR: Handle text gutter/border box
Diffstat (limited to 'engines')
-rw-r--r--engines/director/score.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index cfce7a4b6e..655cf91340 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1340,6 +1340,45 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteID) {
}
font->drawString(&surface, text, x, y, width, 0);
+
+ if (textCast->borderSize != kSizeNone) {
+ uint16 size = textCast->borderSize;
+
+ //Indent from borders, measured in d4
+ x -= 1;
+ y -= 4;
+
+ height += 4;
+ width += 1;
+
+ while (size) {
+ surface.frameRect(Common::Rect(x, y, x + height, y + width), 0);
+ x--;
+ y--;
+ height += 2;
+ width += 2;
+ size--;
+ }
+ }
+
+ if (textCast->gutterSize != kSizeNone) {
+ x -= 1;
+ y -= 4;
+
+ height += 4;
+ width += 1;
+ uint16 size = textCast->gutterSize;
+
+ surface.frameRect(Common::Rect(x, y, x + height, y + width), 0);
+
+ while (size) {
+ surface.drawLine(x + width, y, x + width, y + height, 0);
+ surface.drawLine(x, y + height, x + width, y + height, 0);
+ x++;
+ y++;
+ size--;
+ }
+ }
}
void Frame::drawBackgndTransSprite(Graphics::ManagedSurface &target, const Graphics::Surface &sprite, Common::Rect &drawRect) {