mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 05:01:43 +00:00
GRAPHICS: Fix bug in MacText::draw() on calculating bounding rect size
Change is _surface->w to _surface->h in the fourth arg to Common::Rect
This commit is contained in:
parent
f2f420e15f
commit
b127beb03c
@ -333,8 +333,8 @@ void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int
|
||||
g->fillRect(Common::Rect(x, y, x + w, y + w), _bgcolor);
|
||||
}
|
||||
|
||||
g->blitFrom(*_surface, Common::Rect(MIN<int>(_surface->w, x), MIN<int>(_surface->h, y),
|
||||
MIN<int>(_surface->w, x + w), MIN<int>(_surface->w, y + w)),
|
||||
g->blitFrom(*_surface, Common::Rect(MIN<int>(_surface->w, x), MIN<int>(_surface->h, y),
|
||||
MIN<int>(_surface->w, x + w), MIN<int>(_surface->h, y + w)),
|
||||
Common::Point(xoff, yoff));
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "graphics/macgui/macwindowmanager.h"
|
||||
#include "graphics/macgui/macfontmanager.h"
|
||||
#include "graphics/macgui/mactextwindow.h"
|
||||
|
||||
namespace Graphics {
|
||||
@ -33,4 +35,9 @@ MacTextWindow::MacTextWindow(MacWindowManager *wm) :
|
||||
MacTextWindow::~MacTextWindow() {
|
||||
}
|
||||
|
||||
const Font *MacTextWindow::getTextWindowFont() {
|
||||
// TODO: make this have an actual effect
|
||||
return _wm->_fontMan->getFont(Graphics::MacFont(kMacFontChicago, 8));
|
||||
}
|
||||
|
||||
} // End of namespace Graphics
|
||||
|
@ -29,6 +29,8 @@ class MacTextWindow : public MacWindow {
|
||||
public:
|
||||
MacTextWindow(MacWindowManager *wm);
|
||||
~MacTextWindow();
|
||||
|
||||
const Font *getTextWindowFont();
|
||||
};
|
||||
|
||||
} // End of namespace Graphics
|
||||
|
Loading…
x
Reference in New Issue
Block a user