GLK: FROTZ: Move setReverseVideo into Window

This commit is contained in:
Paul Gilbert 2019-03-13 20:19:11 -07:00
parent 7a13a60678
commit d6b41b59f3
5 changed files with 15 additions and 23 deletions

View File

@ -693,12 +693,5 @@ uint GlkInterface::roundDiv(uint x, uint y) {
return quotient;
}
void GlkInterface::os_set_reverse_video(bool flag) {
#ifdef GARGLK
_reverseVideo = flag;
garglk_set_reversevideo(flag);
#endif
}
} // End of namespace Frotz
} // End of namespace Glk

View File

@ -242,11 +242,6 @@ protected:
* Waits for the user to type an input line
*/
zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued);
/**
* Set whether reverse video mode is active
*/
void os_set_reverse_video(bool flag);
public:
/**
* Constructor

View File

@ -437,7 +437,7 @@ void Processor::z_show_status() {
// Move to top of the status window, and print in reverse style.
_wp.setWindow(1);
os_set_reverse_video(true);
_wp._upper.setReverseVideo(true);
_wp._upper.setCursor(Point(1, 1));
// If the screen width is below 55 characters then we have to use

View File

@ -257,14 +257,12 @@ void Window::setStyle(int style) {
void Window::updateStyle() {
uint style = _currStyle;
/*
if (style & REVERSE_STYLE) {
os_set_reverse_video(true);
}*/
if (!_win)
createGlkWindow();
if (style & REVERSE_STYLE)
setReverseVideo(true);
if (style & FIXED_WIDTH_STYLE) {
if (_currFont == GRAPHICS_FONT)
_win->_stream->setStyle(style_User1); // character graphics
@ -287,11 +285,12 @@ void Window::updateStyle() {
_win->_stream->setStyle(style_Normal); // propr
}
/*
if (_currStyle == 0) {
os_set_reverse_video(false);
}
*/
if (_currStyle == 0)
setReverseVideo(false);
}
void Window::setReverseVideo(bool reverse) {
_win->_stream->setReverseVideo(reverse);
}
void Window::createGlkWindow() {

View File

@ -192,6 +192,11 @@ public:
* Set the textstyle
*/
void setStyle(int style = -1);
/**
* Set reverse video
*/
void setReverseVideo(bool reverse);
};
/**