aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorEugene Sandulenko2005-05-31 23:41:27 +0000
committerEugene Sandulenko2005-05-31 23:41:27 +0000
commitf8f9ed18a8e7e073e9481fb9f016a722cecfebf4 (patch)
treed2f0dcbb6a46854f1d95f1f3806ee92e2cad6620 /saga
parent6d0082d29da1a3adb05743d70f11904a282e0938 (diff)
downloadscummvm-rg350-f8f9ed18a8e7e073e9481fb9f016a722cecfebf4.tar.gz
scummvm-rg350-f8f9ed18a8e7e073e9481fb9f016a722cecfebf4.tar.bz2
scummvm-rg350-f8f9ed18a8e7e073e9481fb9f016a722cecfebf4.zip
Allow entry of space and some letters such as 'r' and 'p' as parts of
save names. svn-id: r18305
Diffstat (limited to 'saga')
-rw-r--r--saga/input.cpp5
-rw-r--r--saga/interface.cpp3
-rw-r--r--saga/interface.h4
3 files changed, 10 insertions, 2 deletions
diff --git a/saga/input.cpp b/saga/input.cpp
index b3dfbad697..7d2a2664c5 100644
--- a/saga/input.cpp
+++ b/saga/input.cpp
@@ -47,6 +47,11 @@ int SagaEngine::processInput() {
if (event.kbd.keycode == 'd')
_console->attach();
}
+ if (_interface->_textInput) {
+ _interface->processAscii(event.kbd.ascii);
+ return SUCCESS;
+ }
+
switch (event.kbd.keycode) {
case '#':
case '`':
diff --git a/saga/interface.cpp b/saga/interface.cpp
index 534d48a269..3e2f848420 100644
--- a/saga/interface.cpp
+++ b/saga/interface.cpp
@@ -858,7 +858,8 @@ void Interface::processTextInput(uint16 ascii) {
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);
diff --git a/saga/interface.h b/saga/interface.h
index cd20655e43..b6b559efca 100644
--- a/saga/interface.h
+++ b/saga/interface.h
@@ -212,6 +212,8 @@ public:
bool processAscii(uint16 ascii);
void processKeyUp(uint16 ascii);
+ bool _textInput;
+
private:
static void textInputRepeatCallback(void *refCon);
@@ -245,6 +247,7 @@ public:
}
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 @@ private:
Rect _optionSaveRectSlider;
Rect _optionSaveRectBottom;
- bool _textInput;
char _textInputString[SAVE_TITLE_SIZE];
uint _textInputStringLength;
uint _textInputPos;