Menu support for hotkeys and 'text entry' box, savegame support for the name from the text entry

This commit is contained in:
Erich Edgar Hoover 2005-12-26 19:26:46 +00:00
parent 6f145cbe13
commit 848b96039b
3 changed files with 59 additions and 27 deletions

12
lua.cpp
View file

@ -2883,9 +2883,6 @@ static void SubmitSaveGameData() {
if (lua_isnil(table2))
break;
str = lua_getstring(table2);
// Leave out an apparently bogus option
if (!strcmp(str, "000000000000000000000000000000000000000000000000000000000000"))
continue;
int len = strlen(str) + 1;
savedState->writeBlock(&len, sizeof(int));
savedState->writeBlock(str, len);
@ -2912,12 +2909,6 @@ static void GetSaveGameData() {
int strSize;
int count = 0;
// Get the name of the saved game
lua_pushobject(result);
lua_pushnumber(count++);
lua_pushstring(filename); // TODO: Use an actual stored name
lua_settable();
for (;;) {
if (dataSize <= 0)
break;
@ -3053,6 +3044,9 @@ static void Display() {
if (g_engine->getFlipEnable()) {
g_driver->flipBuffer();
}
// refreshDrawMode ensures that the blinking cursor
// for the "text entry" renders correctly
g_engine->refreshDrawMode();
}
static void EngineDisplay() {