|
|
|
@ -76,18 +76,11 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) { |
|
|
|
attrset(CRT_colors[METER_TEXT]); |
|
|
|
attrset(CRT_colors[METER_TEXT]); |
|
|
|
int captionLen = 3; |
|
|
|
int captionLen = 3; |
|
|
|
mvaddnstr(y, x, caption, captionLen); |
|
|
|
mvaddnstr(y, x, caption, captionLen); |
|
|
|
x += captionLen; |
|
|
|
x += captionLen+1; |
|
|
|
w -= captionLen; |
|
|
|
w -= captionLen+1; |
|
|
|
|
|
|
|
|
|
|
|
// Draw the bar borders
|
|
|
|
|
|
|
|
attrset(CRT_colors[BAR_BORDER]); |
|
|
|
|
|
|
|
mvaddch(y, x, '['); |
|
|
|
|
|
|
|
w--; |
|
|
|
|
|
|
|
mvaddch(y, x + MAXIMUM(w, 0), ']'); |
|
|
|
|
|
|
|
w--; |
|
|
|
|
|
|
|
attrset(CRT_colors[RESET_COLOR]); |
|
|
|
attrset(CRT_colors[RESET_COLOR]); |
|
|
|
|
|
|
|
|
|
|
|
x++; |
|
|
|
if (caption[0] == 0) { |
|
|
|
|
|
|
|
|
|
|
|
if (w < 1) { |
|
|
|
if (w < 1) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
|