[Scummvm-cvs-logs] CVS: scummvm gapi_keys.h,1.1,1.2 gui.cpp,1.36,1.37 gui.h,1.18,1.19

Nicolas Bacca arisme at users.sourceforge.net
Sun Apr 21 14:55:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv4071

Modified Files:
	gapi_keys.h gui.cpp gui.h 
Log Message:
New key page in GUI

Index: gapi_keys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gapi_keys.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** gapi_keys.h	14 Mar 2002 14:45:03 -0000	1.1
--- gapi_keys.h	21 Apr 2002 21:54:08 -0000	1.2
***************
*** 12,16 ****
  	ACTION_KEYBOARD = 6,
  	ACTION_SOUND = 7,
! 	ACTION_RIGHTCLICK = 8
  };
  
--- 12,17 ----
  	ACTION_KEYBOARD = 6,
  	ACTION_SOUND = 7,
! 	ACTION_RIGHTCLICK = 8,
! 	ACTION_CURSOR = 9
  };
  
***************
*** 21,26 ****
  
  
! #define NUMBER_ACTIONS 5
! #define TOTAL_ACTIONS 8
  
  #define GAPI_KEY_BASE 1000
--- 22,27 ----
  
  
! #define NUMBER_ACTIONS 10
! #define TOTAL_ACTIONS 9
  
  #define GAPI_KEY_BASE 1000
***************
*** 33,36 ****
--- 34,41 ----
  #define GAPI_KEY_INBOX 7
  #define GAPI_KEY_ITASK 8
+ #define GAPI_KEY_VKUP 9
+ #define GAPI_KEY_VKDOWN 10
+ #define GAPI_KEY_VKLEFT 11
+ #define GAPI_KEY_VKRIGHT 12
  
  #define INTERNAL_KEY_CALENDAR 0xc1

Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** gui.cpp	19 Apr 2002 11:12:27 -0000	1.36
--- gui.cpp	21 Apr 2002 21:54:08 -0000	1.37
***************
*** 28,32 ****
  
  #ifdef _WIN32_WCE
! // Additional variables for Win32 specific GUI
  #include "gapi_keys.h"
  extern bool toolbar_drawn;
--- 28,32 ----
  
  #ifdef _WIN32_WCE
! // Additional variables for WinCE specific GUI
  #include "gapi_keys.h"
  extern bool toolbar_drawn;
***************
*** 36,39 ****
--- 36,40 ----
  extern void registry_save(void);
  uint16 _key_mapping_required;
+ uint16 _current_page;
  #else
  #define registry_save() ;
***************
*** 191,200 ****
  			case GUI_KEYTEXT:
  				strcpy(text,
! 							 getGAPIKeyName(getAction(w->_string_number - 1)->action_key));
  				break;
  			case GUI_ACTIONTEXT:
  				strcpy(text,
! 							 getActionName(getAction(w->_string_number - 1)->action_type));
  				break;
  #endif
  			}
--- 192,208 ----
  			case GUI_KEYTEXT:
  				strcpy(text,
! 							 getGAPIKeyName(getAction((_current_page * 5) + w->_string_number - 1)->action_key));
  				break;
  			case GUI_ACTIONTEXT:
  				strcpy(text,
! 							 getActionName(getAction((_current_page * 5) + w->_string_number - 1)->action_type));
! 				break;
! 			case GUI_NEXTTEXT:
! 				if (_current_page == 0)
! 					strcpy(text, "Next");
! 				else
! 					strcpy(text, "Prev");
  				break;
+ 
  #endif
  			}
***************
*** 360,411 ****
  };
  const GuiWidget keys_dialog[] = {
! 	{GUI_STAT, 0xFF, GWF_DEFAULT, 30, 10, 260, 130, 0, 0},
  
  	// First action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10, 15, 15, 10, 3},	// CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10, 15, 15, 11, 4},	// CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 11 + 33 + 10, 10 + 10, 100, 15, 100,
! 	 1},
  	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 3, 100, 15, 1, 1},
  
  	//Second action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5, 15, 15, 20, 3},	// CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5, 15, 15, 21, 4},	// CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10, 10 + 10 + 15 + 5, 100,
! 	 15, 101, 2},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 3, 100, 15, 2,
! 	 2},
! 
  	//Third action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5 + 15 + 5, 15, 15, 30, 3},	// CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5 + 15 + 5, 15, 15, 31, 4},	// CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10,
! 	 10 + 10 + 15 + 5 + 15 + 5, 100, 15, 102, 3},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 15 + 5 + 3,
! 	 100, 15, 3, 3},
  
  	//Fourth action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 40, 3},
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 41, 4},
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 100, 15, 103, 4},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 3, 100, 15, 4, 4},
  
  	//Fifth action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 50, 3},
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 51, 4},
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 100, 15, 104, 5},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120,
! 	 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5 + 3, 100, 15, 5, 5},
  
  	//OK
! 	{GUI_RESTEXT, 0x01, GWF_BUTTON, 30 + 113, 10 + 106, 54, 16, 60, 9},
! 	{0, 0, 0, 0, 0, 0, 0, 0, 0}
  };
  
--- 368,408 ----
  };
  const GuiWidget keys_dialog[] = {
! 	{GUI_STAT, 0xFF, GWF_DEFAULT, 30, 10, 260, 130, 0, 0 },
  
  	// First action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10, 15, 15, 10, 3}, // CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10, 15, 15, 11, 4}, // CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 11 + 33 + 10, 10 + 10, 100, 15, 100, 1},
  	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 3, 100, 15, 1, 1},
  
  	//Second action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5, 15, 15, 20, 3}, // CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5, 15, 15, 21, 4}, // CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10, 10 + 10 + 15 + 5, 100, 15, 101, 2},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 3, 100, 15, 2,  2},
! 	
  	//Third action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5 + 15 + 5, 15, 15, 30, 3},// CUSTOMTEXT_PLUS
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5 + 15 + 5, 15, 15, 31, 4}, // CUSTOMTEXT_MINUS
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10, 10 + 10 + 15 + 5 + 15 + 5, 100, 15, 102, 3},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 15 + 5 + 3, 100, 15, 3, 3},
  
  	//Fourth action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 40, 3},
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 41, 4},
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5, 100, 15, 103, 4},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 3, 100, 15, 4, 4},
  
  	//Fifth action
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 11, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 50, 3},
! 	{GUI_CUSTOMTEXT, 0x01, GWF_BUTTON, 30 + 33, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 15, 15, 51, 4},
! 	{GUI_ACTIONTEXT, 0x01, GWF_BUTTON, 30 + 10 + 33 + 10, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5, 100, 15, 104, 5},
! 	{GUI_KEYTEXT, 0x01, 0, 30 + 11 + 33 + 120, 10 + 10 + 15 + 5 + 15 + 5 + 15 + 5 + 15 + 5 + 3, 100, 15, 5, 5},
  
  	//OK
! 	{GUI_RESTEXT, 0x01, GWF_BUTTON, 30 + 60, 10 + 106, 54, 16, 60, 9 },
! 	//Previous-Next
! 	{GUI_NEXTTEXT, 0x01, GWF_BUTTON, 30 + 120, 10 + 106, 54, 16, 61, 0 }, 
! 	{0,0,0,0,0,0,0,0,0}
  };
  
***************
*** 552,558 ****
  
  		if ((cmd % 10) == 1)
! 			setNextType((cmd / 10) - 1);
  		else
! 			setPreviousType((cmd / 10) - 1);
  
  		draw(0, 200);
--- 549,555 ----
  
  		if ((cmd % 10) == 1)
! 			setNextType((_current_page * 5) + (cmd / 10) - 1);
  		else
! 			setPreviousType((_current_page * 5) + (cmd / 10) - 1);
  
  		draw(0, 200);
***************
*** 561,565 ****
  	}
  
! 	_key_mapping_required = cmd;
  
  	if (cmd == 60) {
--- 558,563 ----
  	}
  
! 	if (cmd >= 100)
! 		_key_mapping_required = cmd;
  
  	if (cmd == 60) {
***************
*** 568,571 ****
--- 566,579 ----
  		close();
  	}
+ 
+ 	if (cmd == 61) {
+ 		if (!_current_page)
+ 			_current_page = 1;
+ 		else
+ 			_current_page = 0;
+ 		draw(0, 200);
+ 		return;
+ 	}
+ 
  #else
  	close();
***************
*** 575,579 ****
  void Gui::handleLauncherDialogCommand(int cmd)
  {
! 	printf("handle launcher command\n");
  	switch (cmd) {
  	case 20:
--- 583,587 ----
  void Gui::handleLauncherDialogCommand(int cmd)
  {
! 	debug(9, "handle launcher command\n");
  	switch (cmd) {
  	case 20:
***************
*** 590,597 ****
  		_dialog = ABOUT_DIALOG;
  		draw(0, 100);
! 		printf("about dialog\n");
  		break;
  	default:
! 		printf("default\n");
  		close();
  	}
--- 598,605 ----
  		_dialog = ABOUT_DIALOG;
  		draw(0, 100);
! 		debug(9, "about dialog\n");
  		break;
  	default:
! 		debug(9, "default\n");
  		close();
  	}
***************
*** 806,810 ****
  		clearActionKey(letter);
  		if (_key_mapping_required)
! 			getAction(_key_mapping_required - 100)->action_key = letter;
  		_key_mapping_required = 0;
  		draw(0, 200);
--- 814,818 ----
  		clearActionKey(letter);
  		if (_key_mapping_required)
! 			getAction((_current_page * 5) + _key_mapping_required - 100)->action_key = letter;
  		_key_mapping_required = 0;
  		draw(0, 200);
***************
*** 902,905 ****
--- 910,916 ----
  void Gui::options()
  {
+ #ifdef _WIN32_WCE
+ 	_current_page = 0;
+ #endif
  	_widgets[0] = options_dialog;
  	_active = true;

Index: gui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** gui.h	17 Apr 2002 16:02:29 -0000	1.18
--- gui.h	21 Apr 2002 21:54:08 -0000	1.19
***************
*** 36,40 ****
  	GUI_ACTIONTEXT = 6,
  	GUI_KEYTEXT = 7,
! 	GUI_SCROLLTEXT = 8
  };
  
--- 36,41 ----
  	GUI_ACTIONTEXT = 6,
  	GUI_KEYTEXT = 7,
! 	GUI_SCROLLTEXT = 8,
! 	GUI_NEXTTEXT = 9
  };
  
***************
*** 46,50 ****
  	GWF_DEFAULT = GWF_BORDER|GWF_CLEARBG,
  	GWF_BUTTON = GWF_BORDER|GWF_CLEARBG|GWF_DELAY
- 
  };
  
--- 47,50 ----





More information about the Scummvm-git-logs mailing list