Subversion Repositories SvarDOS

Rev

Rev 1308 | Rev 1310 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1308 Rev 1309
Line 127... Line 127...
127
    mdr_cout_char(i, screenw - 1, SCROLL_CURSOR, scheme[COL_SCROLLBAR]);
127
    mdr_cout_char(i, screenw - 1, SCROLL_CURSOR, scheme[COL_SCROLLBAR]);
128
  }
128
  }
129
}
129
}
130
 
130
 
131
 
131
 
-
 
132
static void ui_help(unsigned char screenw) {
-
 
133
#define MAXLINLEN 35
-
 
134
  unsigned short i, x, offset;
-
 
135
  offset = (screenw - MAXLINLEN + 1) >> 1;
-
 
136
  mdr_cout_cursor_hide();
-
 
137
  for (i = 2; i <= 12; i++) {
-
 
138
    for (x = offset - 2; x < offset + MAXLINLEN; x++) mdr_cout_char(i, x, ' ', scheme[COL_STATUSBAR1]);
-
 
139
  }
-
 
140
 
-
 
141
  mdr_cout_str(3, offset, svarlang_str(0, 0), scheme[COL_STATUSBAR1], MAXLINLEN);
-
 
142
  for (i = 0; i <= 2; i++) {
-
 
143
    mdr_cout_str(5 + i, offset, svarlang_str(8, i), scheme[COL_STATUSBAR1], MAXLINLEN);
-
 
144
  }
-
 
145
  mdr_cout_str(9, offset, svarlang_str(8, 10), scheme[COL_STATUSBAR1], MAXLINLEN);
-
 
146
  mdr_cout_str(11, offset, svarlang_str(8, 11), scheme[COL_STATUSBAR1], MAXLINLEN);
-
 
147
 
-
 
148
  keyb_getkey();
-
 
149
  mdr_cout_cursor_show();
-
 
150
#undef MAXLINLEN
-
 
151
}
-
 
152
 
-
 
153
 
132
static void ui_refresh(const struct linedb *db, unsigned char screenw, unsigned char screenh, unsigned char uidirtyfrom, unsigned char uidirtyto) {
154
static void ui_refresh(const struct linedb *db, unsigned char screenw, unsigned char screenh, unsigned char uidirtyfrom, unsigned char uidirtyto) {
133
  unsigned char y = 0;
155
  unsigned char y = 0;
134
  unsigned char len;
156
  unsigned char len;
135
  struct line far *l;
157
  struct line far *l;
136
 
158
 
Line 486... Line 508...
486
        uidirtyto = cursorposy;
508
        uidirtyto = cursorposy;
487
        db.cursor->payload[off] = k;
509
        db.cursor->payload[off] = k;
488
        cursor_right(&db, &cursorposx, &cursorposy, screenw, screenh, &uidirtyfrom, &uidirtyto);
510
        cursor_right(&db, &cursorposx, &cursorposy, screenw, screenh, &uidirtyfrom, &uidirtyto);
489
      }
511
      }
490
 
512
 
-
 
513
    } else if (k == 0x13b) { /* F1 */
-
 
514
      ui_help(screenw);
-
 
515
      uidirtyfrom = 0;
-
 
516
      uidirtyto = 0xff;
-
 
517
 
491
    } else { /* UNHANDLED KEY - TODO IGNORE THIS IN PRODUCTION RELEASE */
518
    } else { /* UNHANDLED KEY - TODO IGNORE THIS IN PRODUCTION RELEASE */
492
      char buff[4];
519
      char buff[4];
493
      const char *HEX = "0123456789ABCDEF";
520
      const char *HEX = "0123456789ABCDEF";
494
      buff[0] = HEX[(k >> 8) & 15];
521
      buff[0] = HEX[(k >> 8) & 15];
495
      buff[1] = HEX[(k >> 4) & 15];
522
      buff[1] = HEX[(k >> 4) & 15];