aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/gui_v2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/gui_v2.cpp')
-rw-r--r--engines/kyra/gui_v2.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 5b5a24b24e..c5e5bab2d3 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -746,21 +746,17 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
int curPos = strlen(buffer);
int x2 = x, y2 = y;
- Screen::FontId of = _screen->setFont(Screen::FID_8_FNT);
_text->printText(buffer, x, y, c1, c2, c2);
-
+
for (int i = 0; i < curPos; ++i)
x2 += getCharWidth(buffer[i]);
drawTextfieldBlock(x2, y2, c3);
- _screen->setFont(of);
_keyPressed.reset();
_cancelNameInput = _finishNameInput = false;
while (running && !_vm->shouldQuit()) {
- of = _screen->setFont(Screen::FID_8_FNT);
checkTextfieldInput();
- _screen->setFont(of);
processHighlights(_savenameMenu);
char inputKey = _keyPressed.ascii;
@@ -783,8 +779,7 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
drawTextfieldBlock(x2, y2, c3);
_screen->updateScreen();
_lastScreenUpdate = _vm->_system->getMillis();
- } else if ((uint8)inputKey > 31 && (uint8)inputKey < (_vm->gameFlags().lang == Common::JA_JPN ? 176 : 226) && curPos < bufferSize) {
- of = _screen->setFont(Screen::FID_8_FNT);
+ } else if ((uint8)inputKey > 31 && (uint8)inputKey < (_vm->gameFlags().lang == Common::JA_JPN ? 128 : 226) && curPos < bufferSize) {
if (x2 + getCharWidth(inputKey) + 7 < 0x11F) {
buffer[curPos] = inputKey;
const char text[2] = { buffer[curPos], 0 };
@@ -795,7 +790,6 @@ const char *GUI_v2::nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8
_screen->updateScreen();
_lastScreenUpdate = _vm->_system->getMillis();
}
- _screen->setFont(of);
}
_keyPressed.reset();