aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-03 08:40:20 +0200
committerEugene Sandulenko2017-08-04 21:54:20 +0200
commit20734108e31d1e5a4f6431b0a444912d13f79d09 (patch)
tree1069239f7fd9339da7923efeb194d019f4bbe5f8 /graphics
parent04bb7c3e7aca4faba3f98a106de52c866794d9c5 (diff)
downloadscummvm-rg350-20734108e31d1e5a4f6431b0a444912d13f79d09.tar.gz
scummvm-rg350-20734108e31d1e5a4f6431b0a444912d13f79d09.tar.bz2
scummvm-rg350-20734108e31d1e5a4f6431b0a444912d13f79d09.zip
GRAPHICS: MACGUI: Incapsulate MacWindow internals
Diffstat (limited to 'graphics')
-rw-r--r--graphics/macgui/mactextwindow.cpp6
-rw-r--r--graphics/macgui/macwindow.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 668b3c7e76..1743614730 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -77,7 +77,7 @@ void MacTextWindow::resize(int w, int h) {
MacWindow::resize(w, h);
- _maxWidth = _innerDims.width();
+ _maxWidth = getInnerDimensions().width();
_mactext->setMaxWidth(_maxWidth);
}
@@ -86,7 +86,7 @@ void MacTextWindow::appendText(Common::String str, const MacFont *macFont, bool
_contentIsDirty = true;
- _scrollPos = MAX(0, _mactext->getTextHeight() - _innerDims.height());
+ _scrollPos = MAX(0, _mactext->getTextHeight() - getInnerDimensions().height());
updateCursorPos();
}
@@ -189,7 +189,7 @@ bool MacTextWindow::processEvent(Common::Event &event) {
if (click == kBorderScrollUp || click == kBorderScrollDown) {
if (event.type == Common::EVENT_LBUTTONDOWN) {
- int consoleHeight = _innerDims.height();
+ int consoleHeight = getInnerDimensions().height();
int textFullSize = _mactext->getTextHeight();
float scrollPos = (float)_scrollPos / textFullSize;
float scrollSize = (float)consoleHeight / textFullSize;
diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h
index 3e7f474f23..f1e0cac7f3 100644
--- a/graphics/macgui/macwindow.h
+++ b/graphics/macgui/macwindow.h
@@ -308,7 +308,6 @@ protected:
ManagedSurface _composeSurface;
bool _borderIsDirty;
- Common::Rect _innerDims;
private:
MacWindowBorder _macBorder;
@@ -323,6 +322,7 @@ private:
bool _closeable;
int _borderWidth;
+ Common::Rect _innerDims;
bool _beingDragged, _beingResized;
int _draggedX, _draggedY;