Implement more sophisticated readline-mode

This commit is contained in:
2021-11-04 13:40:42 -04:00
parent cf5a2d7462
commit deaf4e4873
7 changed files with 150 additions and 64 deletions

View File

@@ -210,7 +210,7 @@ void TextGame::event_init(int argc, char *argv[])
actor_id_ = world_->create_login_actor();
printbuffer_line_ = 0;
stdostream() << "Login actor ID: " << actor_id_ << std::endl;
get_stdio_channel()->out()->write_bytes(console_.get_prompt());
get_stdio_channel()->set_prompt(console_.get_prompt());
}
void TextGame::event_update()
@@ -231,7 +231,7 @@ void TextGame::event_update()
stop_driver();
return;
}
get_stdio_channel()->out()->write_bytes(console_.get_prompt());
get_stdio_channel()->set_prompt(console_.get_prompt());
}
}