aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ThemeEngine.cpp')
-rw-r--r--gui/ThemeEngine.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index fdd7750af9..e2fa2580f5 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -48,6 +48,8 @@ const char * const ThemeEngine::kImageLogoSmall = "logo_small.bmp";
const char * const ThemeEngine::kImageSearch = "search.bmp";
const char * const ThemeEngine::kImageEraser = "eraser.bmp";
const char * const ThemeEngine::kImageDelbtn = "delbtn.bmp";
+const char * const ThemeEngine::kImageList = "list.bmp";
+const char * const ThemeEngine::kImageGrid = "grid.bmp";
struct TextDrawData {
const Graphics::Font *_fontPtr;
@@ -175,6 +177,7 @@ static const DrawDataInfo kDrawDataDefaults[] = {
{kDDButtonIdle, "button_idle", true, kDDWidgetBackgroundSlider},
{kDDButtonHover, "button_hover", false, kDDButtonIdle},
{kDDButtonDisabled, "button_disabled", true, kDDNone},
+ {kDDButtonPressed, "button_pressed", false, kDDButtonIdle},
{kDDSliderFull, "slider_full", false, kDDNone},
{kDDSliderHover, "slider_hover", false, kDDNone},
@@ -428,7 +431,7 @@ bool ThemeEngine::init() {
void ThemeEngine::clearAll() {
if (_initOk) {
_system->clearOverlay();
- _system->grabOverlay((OverlayColor *)_screen.pixels, _screen.w);
+ _system->grabOverlay(_screen.pixels, _screen.pitch);
}
}
@@ -453,7 +456,7 @@ void ThemeEngine::refresh() {
if (_useCursor) {
CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize);
- CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
+ CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true);
}
}
}
@@ -464,7 +467,7 @@ void ThemeEngine::enable() {
if (_useCursor) {
CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize);
- CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
+ CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true);
CursorMan.showMouse(true);
}
@@ -877,6 +880,8 @@ void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, W
dd = kDDButtonHover;
else if (state == kStateDisabled)
dd = kDDButtonDisabled;
+ else if (state == kStatePressed)
+ dd = kDDButtonPressed;
queueDD(dd, r, 0, hints & WIDGET_CLEARBG);
queueDDText(getTextData(dd), getTextColor(dd), r, str, false, true, _widgets[dd]->_textAlignH, _widgets[dd]->_textAlignV);
@@ -1125,6 +1130,7 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid
break;
case kStateEnabled:
+ case kStatePressed:
colorId = kTextColorNormal;
break;
}
@@ -1145,6 +1151,7 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid
break;
case kStateEnabled:
+ case kStatePressed:
colorId = kTextColorAlternative;
break;
}
@@ -1282,7 +1289,7 @@ void ThemeEngine::openDialog(bool doBuffer, ShadingStyle style) {
_vectorRenderer->setSurface(&_screen);
}
-bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY, int scale) {
+bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY) {
if (!_system->hasFeature(OSystem::kFeatureCursorPalette))
return true;
@@ -1300,7 +1307,6 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
// Set up the cursor parameters
_cursorHotspotX = hotspotX;
_cursorHotspotY = hotspotY;
- _cursorTargetScale = scale;
_cursorWidth = cursor->w;
_cursorHeight = cursor->h;
@@ -1418,7 +1424,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena
for (Common::ArchiveMemberList::const_iterator i = members.begin(), end = members.end(); i != end; ++i) {
Common::SeekableReadStream *stream = (*i)->createReadStream();
if (stream) {
- font = Graphics::loadTTFFont(*stream, pointsize, false,
+ font = Graphics::loadTTFFont(*stream, pointsize, 0, false,
#ifdef USE_TRANSLATION
TransMan.getCharsetMapping()
#else