aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui32
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-05 11:42:04 +0000
committerMartin Kiewitz2009-10-05 11:42:04 +0000
commit6e38de3905ec7f5cbbfb991b4a4f960027550b3a (patch)
tree43c8cfe8d0e02fb8891ac0836caaae5f6c8e1acc /engines/sci/gui32
parent55e7c29d95b6d77c4e59f1deeae5760f4cf0b29e (diff)
downloadscummvm-rg350-6e38de3905ec7f5cbbfb991b4a4f960027550b3a.tar.gz
scummvm-rg350-6e38de3905ec7f5cbbfb991b4a4f960027550b3a.tar.bz2
scummvm-rg350-6e38de3905ec7f5cbbfb991b4a4f960027550b3a.zip
SCI/newgui: kDrawControl on icon implemented
svn-id: r44658
Diffstat (limited to 'engines/sci/gui32')
-rw-r--r--engines/sci/gui32/gui32.cpp8
-rw-r--r--engines/sci/gui32/gui32.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 718b96dc7f..4d7097a77f 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -584,6 +584,14 @@ void SciGui32::drawControlText(Common::Rect rect, reg_t obj, const char *text, i
if (!s->pic_not_valid) FULL_REDRAW();
}
+void SciGui32::drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo cellNo, int16 style, bool inverse) {
+ rect_t area = gfx_rect(rect.left, rect.top, rect.width(), rect.height());
+
+ ADD_TO_CURRENT_PICTURE_PORT(sciw_new_icon_control(s->port, obj, area, viewId, loopNo, cellNo,
+ (int8)(style & kControlStateFramed), (int8)inverse));
+ if (!s->pic_not_valid) FULL_REDRAW();
+}
+
static gfx_color_t graph_map_color(EngineState *s, int color, int priority, int control) {
gfx_color_t retval;
diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h
index d49fcfa503..839607dbab 100644
--- a/engines/sci/gui32/gui32.h
+++ b/engines/sci/gui32/gui32.h
@@ -60,6 +60,7 @@ public:
void drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo);
void drawControlButton(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 style, bool inverse);
void drawControlText(Common::Rect rect, reg_t obj, const char *text, int16 fontId, int16 mode, int16 style, bool inverse);
+ void drawControlIcon(Common::Rect rect, reg_t obj, GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo, int16 style, bool inverse);
void graphFillBoxForeground(Common::Rect rect);
void graphFillBoxBackground(Common::Rect rect);