diff options
author | Willem Jan Palenstijn | 2009-10-03 22:10:45 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-10-03 22:10:45 +0000 |
commit | bce248cab6759d6213b28a89d96e741e10a5a656 (patch) | |
tree | 879c53deb9be65b2afaa764f66ded1f12c4da75c /engines/sci/engine | |
parent | 3035ca2fd3e5457aedb30dfc002c6bb1303fbbf4 (diff) | |
download | scummvm-rg350-bce248cab6759d6213b28a89d96e741e10a5a656.tar.gz scummvm-rg350-bce248cab6759d6213b28a89d96e741e10a5a656.tar.bz2 scummvm-rg350-bce248cab6759d6213b28a89d96e741e10a5a656.zip |
SCI: Redraw edit controls when they change.
svn-id: r44576
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 51d9d3cb50..e3b8975509 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1399,16 +1399,14 @@ reg_t kEditControl(EngineState *s, int argc, reg_t *argv) { PUT_SEL32V(obj, cursor, cursor); // Write back cursor position s->segMan->strcpy(text_pos, text.c_str()); // Write back string } + if (event.segment) PUT_SEL32V(event, claimed, 1); + _k_draw_control(s, obj, false); + return NULL_REG; case K_CONTROL_ICON: case K_CONTROL_BOX: case K_CONTROL_BUTTON: - // Control shall not be redrawn here, Original Sierra interpreter doesn't do it and it will mangle up - // menus in at least SQ5 - //if (event.segment) PUT_SEL32V(event, claimed, 1); - //_k_draw_control(s, obj, false); return NULL_REG; - break; case K_CONTROL_TEXT: { int state = GET_SEL32V(obj, state); @@ -1460,12 +1458,12 @@ static void _k_draw_control(EngineState *s, reg_t obj, bool inverse) { case K_CONTROL_TEXT: mode = (gfx_alignment_t) GET_SEL32V(obj, mode); - debugC(2, kDebugLevelGraphics, "drawing text %04x:%04x to %d,%d, mode=%d\n", PRINT_REG(obj), x, y, mode); + debugC(2, kDebugLevelGraphics, "drawing text %04x:%04x ('%s') to %d,%d, mode=%d\n", PRINT_REG(obj), text.c_str(), x, y, mode); s->gui->drawControlText(rect, obj, s->strSplit(text.c_str(), NULL).c_str(), font_nr, mode, state, inverse); return; case K_CONTROL_EDIT: - debugC(2, kDebugLevelGraphics, "drawing edit control %04x:%04x to %d,%d\n", PRINT_REG(obj), x, y); + debugC(2, kDebugLevelGraphics, "drawing edit control %04x:%04x (text %04x:%04x, '%s') to %d,%d\n", PRINT_REG(obj), PRINT_REG(text_pos), text.c_str(), x, y); max = GET_SEL32V(obj, max); cursor = GET_SEL32V(obj, cursor); |