[Scummvm-cvs-logs] SF.net SVN: scummvm: [27069] scummvm/trunk
knakos at users.sourceforge.net
knakos at users.sourceforge.net
Sun Jun 3 20:44:07 CEST 2007
Revision: 27069
http://scummvm.svn.sourceforge.net/scummvm/?rev=27069&view=rev
Author: knakos
Date: 2007-06-03 11:44:03 -0700 (Sun, 03 Jun 2007)
Log Message:
-----------
Adding the new kFeatureDisableKeyFiltering OSystem feature.
This feature is used by agi's prediction dialog and is a hint to the backend
to temporarily switch off any keyboard mapping, used in devices with limited
keyboard input. Also, supply some comments to the newly added event & feature.
Modified Paths:
--------------
scummvm/trunk/common/events.h
scummvm/trunk/common/system.h
scummvm/trunk/engines/agi/predictive.cpp
Modified: scummvm/trunk/common/events.h
===================================================================
--- scummvm/trunk/common/events.h 2007-06-03 17:32:42 UTC (rev 27068)
+++ scummvm/trunk/common/events.h 2007-06-03 18:44:03 UTC (rev 27069)
@@ -57,6 +57,12 @@
EVENT_QUIT = 10,
EVENT_SCREEN_CHANGED = 11,
+ /** The backend requests the agi engine's predictive dialog to be shown.
+ * TODO: Fingolfin suggests that it would be of better value to expand
+ * on this notion by generalizing its use. For example the backend could
+ * use events to ask for the save game dialog or to pause the engine.
+ * An associated enumerated type can accomplish this.
+ **/
EVENT_PREDICTIVE_DIALOG = 12
};
Modified: scummvm/trunk/common/system.h
===================================================================
--- scummvm/trunk/common/system.h 2007-06-03 17:32:42 UTC (rev 27068)
+++ scummvm/trunk/common/system.h 2007-06-03 18:44:03 UTC (rev 27069)
@@ -125,7 +125,7 @@
kFeatureAutoComputeDirtyRects,
/**
- * This flags determines either cursor can have its own palette or not
+ * This flag determines either cursor can have its own palette or not
* It is currently used only by some Macintosh versions of Humongous
* Entertainment games. If backend doesn't implement this feature then
* engine switches to b/w version of cursors.
@@ -142,7 +142,22 @@
/**
* Set to true to iconify the window.
*/
- kFeatureIconifyWindow
+ kFeatureIconifyWindow,
+
+ /**
+ * This feature, set to true, is a hint toward the backend to disable all
+ * key filtering/mapping, in cases where it would be beneficial to do so.
+ * As an example case, this is used in the agi engine's predictive dialog.
+ * When the dialog is displayed this feature is set so that backends with
+ * phone-like keypad temporarily unmap all user actions which leads to
+ * comfortable word entry. Conversely, when the dialog exits the feature
+ * is set to false.
+ * TODO: Fingolfin suggests that the way the feature is used can be
+ * generalized in this sense: Have a keyboard mapping feature, which the
+ * engine queries for to assign keys to actions ("Here's my default key
+ * map for these actions, what do you want them set to?").
+ */
+ kFeatureDisableKeyFiltering
};
/**
Modified: scummvm/trunk/engines/agi/predictive.cpp
===================================================================
--- scummvm/trunk/engines/agi/predictive.cpp 2007-06-03 17:32:42 UTC (rev 27068)
+++ scummvm/trunk/engines/agi/predictive.cpp 2007-06-03 18:44:03 UTC (rev 27069)
@@ -120,6 +120,7 @@
AgiBlock tmpwindow;
_predictiveDialogRunning = true;
+ _system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, true);
// FIXME: Move this to a more appropriate place.
initAsciiToNumTable();
@@ -405,6 +406,7 @@
_gfx->doUpdate();
}
+ _system->setFeatureState(OSystem::kFeatureDisableKeyFiltering, false);
_predictiveDialogRunning = false;
return rc;
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