247 } |
247 } |
248 |
248 |
249 // ------------------------------------------------------------------------------------------------- |
249 // ------------------------------------------------------------------------------------------------- |
250 // |
250 // |
251 static FUNCTION |
251 static FUNCTION |
252 inteface_nicklist_width() -> int |
252 interface_nicklist_width() -> int |
253 { |
253 { |
254 // Allocate at least 12 characters, at most 24 characters, for the nicklist. If we cannot |
254 // Allocate at least 12 characters, at most 24 characters, for the nicklist. If we cannot |
255 // afford that (o_O) then we probably shouldn't draw the nicklist at all I think. |
255 // afford that (o_O) then we probably shouldn't draw the nicklist at all I think. |
256 int nicklistWidth = COLS / 4; |
256 int nicklistWidth = COLS / 4; |
257 |
257 |
288 ++x; |
288 ++x; |
289 } |
289 } |
290 else switch (byte) |
290 else switch (byte) |
291 { |
291 { |
292 case RLINE_ON_BLACK: |
292 case RLINE_ON_BLACK: |
|
293 case RLINE_ON_RED: |
293 case RLINE_ON_GREEN: |
294 case RLINE_ON_GREEN: |
294 case RLINE_ON_YELLOW: |
295 case RLINE_ON_YELLOW: |
295 case RLINE_ON_BLUE: |
296 case RLINE_ON_BLUE: |
296 case RLINE_ON_MAGENTA: |
297 case RLINE_ON_MAGENTA: |
297 case RLINE_ON_CYAN: |
298 case RLINE_ON_CYAN: |
298 case RLINE_ON_WHITE: |
299 case RLINE_ON_WHITE: |
299 attron (interface_color_pair (Color (byte - RLINE_ON_BLACK), DEFAULT)); |
300 attron (interface_color_pair (Color (byte - RLINE_ON_BLACK), DEFAULT)); |
300 break; |
301 break; |
301 |
302 |
302 case RLINE_OFF_BLACK: |
303 case RLINE_OFF_BLACK: |
|
304 case RLINE_OFF_RED: |
303 case RLINE_OFF_GREEN: |
305 case RLINE_OFF_GREEN: |
304 case RLINE_OFF_YELLOW: |
306 case RLINE_OFF_YELLOW: |
305 case RLINE_OFF_BLUE: |
307 case RLINE_OFF_BLUE: |
306 case RLINE_OFF_MAGENTA: |
308 case RLINE_OFF_MAGENTA: |
307 case RLINE_OFF_CYAN: |
309 case RLINE_OFF_CYAN: |
331 return; |
333 return; |
332 |
334 |
333 g_outputScroll = clamp (g_outputScroll, 0, g_output.size() - 1); |
335 g_outputScroll = clamp (g_outputScroll, 0, g_output.size() - 1); |
334 |
336 |
335 int height = LINES - 3; |
337 int height = LINES - 3; |
336 int width = COLS - inteface_nicklist_width(); |
338 int width = COLS - interface_nicklist_width(); |
337 int printOffset = 0; |
339 int printOffset = 0; |
338 int end = g_output.size() - 1 - g_outputScroll; |
340 int end = g_output.size() - 1 - g_outputScroll; |
339 int start = end; |
341 int start = end; |
340 int usedHeight = 0; |
342 int usedHeight = 0; |
341 int y = 1; |
343 int y = 1; |
402 // ------------------------------------------------------------------------------------------------- |
404 // ------------------------------------------------------------------------------------------------- |
403 // |
405 // |
404 static FUNCTION |
406 static FUNCTION |
405 interface_render_nicklist() -> void |
407 interface_render_nicklist() -> void |
406 { |
408 { |
407 int width = inteface_nicklist_width(); |
409 int width = interface_nicklist_width(); |
408 int height = LINES- 3; |
410 int height = LINES- 3; |
409 int y = 1; |
411 int y = 1; |
410 int x = COLS - width; |
412 int x = COLS - width; |
411 |
413 |
412 if (width == 0) |
414 if (width == 0) |