aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/frotz
diff options
context:
space:
mode:
authorPaul Gilbert2019-01-02 19:17:08 -0800
committerPaul Gilbert2019-01-02 19:17:08 -0800
commit8d6909608d3faff88a43408b01097a070c45db21 (patch)
treed888910defd3d165c2cda37a910d64f5f2a484f5 /engines/glk/frotz
parent313337eb82534b23afd31da5c205f96faaea9e24 (diff)
downloadscummvm-rg350-8d6909608d3faff88a43408b01097a070c45db21.tar.gz
scummvm-rg350-8d6909608d3faff88a43408b01097a070c45db21.tar.bz2
scummvm-rg350-8d6909608d3faff88a43408b01097a070c45db21.zip
GLK: FROTZ: Window positions & sizes are in characters, not pixels
Diffstat (limited to 'engines/glk/frotz')
-rw-r--r--engines/glk/frotz/windows.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/glk/frotz/windows.cpp b/engines/glk/frotz/windows.cpp
index ffee6392c7..e4179caeea 100644
--- a/engines/glk/frotz/windows.cpp
+++ b/engines/glk/frotz/windows.cpp
@@ -23,6 +23,7 @@
#include "glk/frotz/windows.h"
#include "glk/frotz/frotz.h"
#include "glk/window_pair.h"
+#include "glk/conf.h"
namespace Glk {
namespace Frotz {
@@ -63,7 +64,8 @@ void Window::setSize(const Point &newSize) {
winid_t win = getWindow();
checkRepositionLower();
- win->setSize(newSize);
+ Point s(newSize.x * g_conf->_monoInfo._cellW, newSize.y * g_conf->_monoInfo._cellH);
+ win->setSize(s);
/* TODO
// Keep the cursor within the window
@@ -78,7 +80,8 @@ void Window::setPosition(const Point &newPos) {
winid_t win = getWindow();
checkRepositionLower();
- win->setPosition(newPos);
+ Point pos((newPos.x - 1) * g_conf->_monoInfo._cellW, (newPos.y - 1) * g_conf->_monoInfo._cellH);
+ win->setPosition(pos);
}
const uint16 &Window::operator[](WindowProperty propType) {