[Scummvm-cvs-logs] CVS: scummvm/saga input.cpp,1.45,1.46 interface.cpp,1.99,1.100 interface.h,1.55,1.56

Eugene Sandulenko sev at users.sourceforge.net
Tue May 31 16:42:34 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26539

Modified Files:
	input.cpp interface.cpp interface.h 
Log Message:
Allow entry of space and some letters such as 'r' and 'p' as parts of
save names.


Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/input.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- input.cpp	31 May 2005 20:08:44 -0000	1.45
+++ input.cpp	31 May 2005 23:41:27 -0000	1.46
@@ -47,6 +47,11 @@
 				if (event.kbd.keycode == 'd')
 					_console->attach();
 			}
+			if (_interface->_textInput) {
+				_interface->processAscii(event.kbd.ascii);
+				return SUCCESS;
+			}
+
 			switch (event.kbd.keycode) {
 			case '#':
 			case '`':

Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- interface.cpp	31 May 2005 20:08:44 -0000	1.99
+++ interface.cpp	31 May 2005 23:41:27 -0000	1.100
@@ -858,7 +858,8 @@
 	default:
 		if (((ascii >= 'a') && (ascii <='z')) || 
 			((ascii >= '0') && (ascii <='9')) ||
-			((ascii >= 'A') && (ascii <='Z'))) {
+			((ascii >= 'A') && (ascii <='Z')) ||
+			(ascii == ' ')) {
 			if (_textInputStringLength < SAVE_TITLE_SIZE - 1) {
 				ch[0] = ascii;
 				tempWidth = _vm->_font->getStringWidth(SMALL_FONT_ID, ch, 0, 0);

Index: interface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- interface.h	31 May 2005 20:08:45 -0000	1.55
+++ interface.h	31 May 2005 23:41:27 -0000	1.56
@@ -212,6 +212,8 @@
 	bool processAscii(uint16 ascii);
 	void processKeyUp(uint16 ascii);
 
+	bool _textInput;
+
 private:
 	static void textInputRepeatCallback(void *refCon);
 
@@ -245,6 +247,7 @@
 	}
 	void saveState(Common::OutSaveFile *out);
 	void loadState(Common::InSaveFile *in);
+
 private:
 	void handleMainUpdate(const Point& mousePoint);					// main panel update
 	void handleMainClick(const Point& mousePoint);					// main panel click
@@ -395,7 +398,6 @@
 	Rect _optionSaveRectSlider;
 	Rect _optionSaveRectBottom;
 	
-	bool _textInput;
 	char _textInputString[SAVE_TITLE_SIZE];
 	uint _textInputStringLength;
 	uint _textInputPos;





More information about the Scummvm-git-logs mailing list