aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-10-29 00:56:13 -0700
committerPaul Gilbert2018-12-08 19:05:59 -0800
commit1a889689f863b58cf3afdf09e4cb7d98f2ef1477 (patch)
treefc30cb1ebc88bf1f66474ea462705c836d421aab /engines
parent48a00e7c0019ea2cc0681342baa828d9cfb6c00d (diff)
downloadscummvm-rg350-1a889689f863b58cf3afdf09e4cb7d98f2ef1477.tar.gz
scummvm-rg350-1a889689f863b58cf3afdf09e4cb7d98f2ef1477.tar.bz2
scummvm-rg350-1a889689f863b58cf3afdf09e4cb7d98f2ef1477.zip
GLK: Added pair window drawing
Diffstat (limited to 'engines')
-rw-r--r--engines/gargoyle/window_pair.cpp22
-rw-r--r--engines/gargoyle/window_text_buffer.cpp1
-rw-r--r--engines/gargoyle/window_text_grid.cpp2
3 files changed, 24 insertions, 1 deletions
diff --git a/engines/gargoyle/window_pair.cpp b/engines/gargoyle/window_pair.cpp
index 3f0f294afa..26903cd278 100644
--- a/engines/gargoyle/window_pair.cpp
+++ b/engines/gargoyle/window_pair.cpp
@@ -22,6 +22,8 @@
#include "gargoyle/window_pair.h"
#include "gargoyle/conf.h"
+#include "gargoyle/gargoyle.h"
+#include "gargoyle/screen.h"
namespace Gargoyle {
@@ -121,7 +123,25 @@ void PairWindow::rearrange(const Rect &box) {
void PairWindow::redraw() {
Window::redraw();
- // TODO
+ _child1->redraw();
+ _child2->redraw();
+
+ Window *child = !_backward ? _child1 : _child2;
+ Rect box(child->_bbox.left, child->_yAdj ? child->_bbox.top - child->_yAdj : child->_bbox.top,
+ child->_bbox.right, child->_bbox.bottom);
+
+ if (_vertical) {
+ int xBord = _wBorder ? g_conf->_wBorderX : 0;
+ int xPad = (g_conf->_wPaddingX - xBord) / 2;
+
+ g_vm->_screen->fillRect(Rect(box.right + xPad, box.top, box.right + xPad + xBord, box.bottom),
+ g_conf->_borderColor);
+ } else {
+ int yBord = _wBorder ? g_conf->_wBorderY : 0;
+ int yPad = (g_conf->_wPaddingY - yBord) / 2;
+ g_vm->_screen->fillRect(Rect(box.left, box.bottom + yPad, box.right, box.bottom + yPad + yBord),
+ g_conf->_borderColor);
+ }
}
void PairWindow::getArrangement(glui32 *method, glui32 *size, Window **keyWin) {
diff --git a/engines/gargoyle/window_text_buffer.cpp b/engines/gargoyle/window_text_buffer.cpp
index 3946771017..d40dcf1602 100644
--- a/engines/gargoyle/window_text_buffer.cpp
+++ b/engines/gargoyle/window_text_buffer.cpp
@@ -611,6 +611,7 @@ void TextBufferWindow::requestLineEvent(char *buf, glui32 maxlen, glui32 initlen
return;
}
+ _lineRequest = true;
int pw;
gli_tts_flush();
diff --git a/engines/gargoyle/window_text_grid.cpp b/engines/gargoyle/window_text_grid.cpp
index 55ccdcc62d..cad18af48f 100644
--- a/engines/gargoyle/window_text_grid.cpp
+++ b/engines/gargoyle/window_text_grid.cpp
@@ -223,6 +223,8 @@ void TextGridWindow::requestLineEvent(char *buf, glui32 maxlen, glui32 initlen)
return;
}
+ _lineRequest = true;
+
if ((int)maxlen > (_width - _curX))
maxlen = (_width - _curX);