Ignore:
Timestamp:
Nov 22, 2009, 3:06:26 PM (11 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Moved help code to help.c
  • Fixed bad string handling in configuration
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/effects.c

    r3996 r3998  
    182182
    183183
    184 void draw_help(struct screen_list *screen_list)
    185 {
    186     int w = 65, h = 20;
    187     int x = (caca_get_canvas_width(screen_list->cv) - w) / 2;
    188     int y = (caca_get_canvas_height(screen_list->cv) - h) / 2;
    189 
    190 
    191     caca_set_color_ansi(screen_list->cv, CACA_BLUE, CACA_BLUE);
    192     caca_fill_box(screen_list->cv, x, y, w, h, '#');
    193     caca_set_color_ansi(screen_list->cv, CACA_DEFAULT, CACA_BLUE);
    194     caca_draw_cp437_box(screen_list->cv, x, y, w, h);
    195 
    196     x += 2;
    197     y++;
    198     caca_printf(screen_list->cv,
    199                 (caca_get_canvas_width(screen_list->cv) -
    200                  strlen(PACKAGE_STRING)) / 2, y - 1, PACKAGE_STRING);
    201     caca_printf(screen_list->cv, x, y++, "Copyright (c) 2006-2009");
    202     caca_printf(screen_list->cv, x, y++, "              Sam Hocevar <sam@zoy.org>");
    203     caca_printf(screen_list->cv, x, y++, "              Jean-Yves Lamoureux <jylam@lnxscene.org>");
    204     caca_printf(screen_list->cv, x, y++, "              Pascal Terjan <pterjan@linuxfr.org>");
    205     caca_printf(screen_list->cv, x, y++, "");
    206     caca_printf(screen_list->cv, x, y++, "");
    207     caca_printf(screen_list->cv, x, y++, "All shortcuts are in format 'ctrl-a-X' where X is :");
    208     caca_printf(screen_list->cv, x, y++, "n:\t Next window");
    209     caca_printf(screen_list->cv, x, y++, "p:\t Previous window");
    210     caca_printf(screen_list->cv, x, y++, "w:\t Switch window manager");
    211     caca_printf(screen_list->cv, x, y++, "c:\t Create new window");
    212     caca_printf(screen_list->cv, x, y++, "m:\t Thumbnails");
    213     caca_printf(screen_list->cv, x, y++, "d:\t Detach");
    214     caca_printf(screen_list->cv, x, y++, "k:\t Close window and kill associated process");
    215     caca_printf(screen_list->cv, x, y++, "h:\t This help");
    216     caca_printf(screen_list->cv, x, y++, "");
    217     caca_printf(screen_list->cv, x, y++, "");
    218     caca_printf(screen_list->cv, x, y++, "See http://caca.zoy.org/wiki/neercs for more informations");
    219 }
    220184
    221185int update_window_list(int c, struct screen_list *screen_list)
Note: See TracChangeset for help on using the changeset viewer.