Exemplo n.º 1
0
Arquivo: menu.c Projeto: ralienpp/deco
static void drawmenu (struct menu *m)
{
    register i, reverse;

    VClearBox (1, m->col-1, m->hgh+3, m->wid+4);
    VSetBold ();
    VDrawBox (1, m->col, m->hgh+2, m->wid+2);
    VSetDim ();
    for (i=0; m->submenu[i].name; ++i)
        if (! m->submenu[i].name[0])
            VHorLine (i+2, m->col+2, m->wid-2);
    VSetNormal ();
    for (i=0; m->submenu[i].name; ++i) {
        if (! m->submenu[i].name[0])
            continue;
        reverse = 0;
        if (i == m->nsm)
            reverse = VStandOut ();
        else if (! m->submenu[i].active)
            VSetDim ();
        VMove (2+i, m->col+1);
        VPutChar (i==m->nsm && !reverse ? '[' : ' ');
        VPrint ("%c %-*s", m->submenu[i].tag ? '*' : ' ',
                m->wid-4, m->submenu[i].name);
        VPutChar (i==m->nsm && !reverse ? ']' : ' ');
        if (i == m->nsm)
            VStandEnd ();
        else if (! m->submenu[i].active)
            VSetNormal ();
    }
}
Exemplo n.º 2
0
Arquivo: menu.c Projeto: ralienpp/deco
static void drawhead (int nm)
{
    register i, reverse;

    VSetDim ();
    reverse = VStandOut ();
    VMove (0, 0);
    for (i=0; i<80; ++i)
        VPutChar (' ');
    VMove (0, 2);
    for (i=0; menu[i].name; ++i) {
        if (i == nm) {
            VStandEnd ();
            VSetBold ();
        }
        VPutChar (' ');
        VPutChar (i==nm && !reverse ? '[' : ' ');
        VPutString (menu[i].name);
        VPutChar (i==nm && !reverse ? ']' : ' ');
        VPutChar (' ');
        if (i == nm) {
            VStandOut ();
            VSetDim ();
        }
    }
    VSetNormal ();
    VStandEnd ();
}
Exemplo n.º 3
0
Arquivo: ex.c Projeto: shodanium/deco
static void printudm ()
{
	register n;

	for (n=0; n<nm; ++n) {
		VMove (menurow+n, menucol+1);
		switch (um[n].key) {
		case 1:         VPutString ("F1");      break;
		case 2:         VPutString ("F2");      break;
		case 3:         VPutString ("F3");      break;
		case 4:         VPutString ("F4");      break;
		case 5:         VPutString ("F5");      break;
		case 6:         VPutString ("F6");      break;
		case 7:         VPutString ("F7");      break;
		case 8:         VPutString ("F8");      break;
		case 9:         VPutString ("F9");      break;
		default:        VPutChar (um[n].key);   break;
		}
		if (um[n].menu)
			VMPutString (menurow+n, menucol+3, "->");
		if (um[n].str)
			VMPutString (menurow+n, menucol+5, um[n].str);
	}
}