Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLK: FROTZ: Fix #10843 Status bar disappearing when textbox is shown
  • Loading branch information
dreammaster committed Jan 2, 2019
1 parent aa9a1ab commit 4568e49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions engines/glk/frotz/glk_interface.cpp
Expand Up @@ -591,6 +591,7 @@ zchar GlkInterface::os_read_line(int max, zchar *buf, int timeout, int width, in
glk_request_timer_events(0);
buf[ev.val1] = '\0';

// If the upper status line area was expanded to show a text box/quotation, restore it back
if (gos_upper && mach_status_ht < curr_status_ht)
reset_status_ht();
curr_status_ht = 0;
Expand Down
13 changes: 8 additions & 5 deletions engines/glk/window_text_grid.cpp
Expand Up @@ -646,11 +646,14 @@ void TextGridWindow::getSize(uint *width, uint *height) const {
/*--------------------------------------------------------------------------*/

void TextGridWindow::TextGridRow::resize(size_t newSize) {
_chars.clear();
_attrs.clear();
_chars.resize(newSize);
_attrs.resize(newSize);
Common::fill(&_chars[0], &_chars[0] + newSize, ' ');
size_t oldSize = _chars.size();
if (newSize != oldSize) {
_chars.resize(newSize);
_attrs.resize(newSize);

if (newSize > oldSize)
Common::fill(&_chars[0] + oldSize, &_chars[0] + newSize, ' ');
}
}

} // End of namespace Glk

0 comments on commit 4568e49

Please sign in to comment.