



SetColour (lines 5618-5658)
Back to List
Browsing parserm.h
5618 [ SetColour f b window doclear i fwd bwd swin;
5619 if (clr_on && f && b) {
5620 if (window) swin = 5-window; ! 4 for TextGrid, 3 for TextBuffer
5621
5622 fwd = MakeColourWord(f);
5623 bwd = MakeColourWord(b);
5624 for (i=0 : i<=10: i++) {
5625 if (f == CLR_DEFAULT || b == CLR_DEFAULT) { ! remove style hints
5626 glk($00B1, swin, i, 7);
5627 glk($00B1, swin, i, 8);
5628 }
5629 else {
5630 glk($00B0, swin, i, 7, fwd);
5631 glk($00B0, swin, i, 8, bwd);
5632 }
5633 }
5634
5635 ! Now re-open the windows to apply the hints
5636 if (gg_statuswin) glk($0024, gg_statuswin, 0); ! close_window
5637
5638 if (doclear || ( window ~= 1 && (clr_fg ~= f || clr_bg ~= b) ) ) {
5639 glk($0024, gg_mainwin, 0);
5640 gg_mainwin = glk($0023, 0, 0, 0, 3, GG_MAINWIN_ROCK); ! window_open
5641 if (gg_scriptstr ~= 0)
5642 glk($002D, gg_mainwin, gg_scriptstr); ! window_set_echo_stream
5643 }
5644
5645 gg_statuswin = glk($0023, gg_mainwin, $12, gg_statuswin_cursize,
5646 4, GG_STATUSWIN_ROCK); ! window_open
5647 if (statuswin_current && gg_statuswin) MoveCursor(); else MainWindow();
5648
5649 if (window ~= 2) {
5650 clr_fgstatus = f;
5651 clr_bgstatus = b;
5652 }
5653 if (window ~= 1) {
5654 clr_fg = f;
5655 clr_bg = b;
5656 }
5657 }
5658 ];
Last updated 27 February 2004.
This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation.
Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson assisted by C Knight.