[Scummvm-cvs-logs] SF.net SVN: scummvm:[44576] scummvm/trunk/engines/sci/engine/kgraphics.cpp

wjpalenstijn at users.sourceforge.net wjpalenstijn at users.sourceforge.net
Sun Oct 4 00:10:45 CEST 2009


Revision: 44576
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44576&view=rev
Author:   wjpalenstijn
Date:     2009-10-03 22:10:45 +0000 (Sat, 03 Oct 2009)

Log Message:
-----------
SCI: Redraw edit controls when they change.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-03 22:07:18 UTC (rev 44575)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-10-03 22:10:45 UTC (rev 44576)
@@ -1399,16 +1399,14 @@
 				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 @@
 
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list