예제 #1
0
static void palette_list_draw(void)
{
        int n, focused = (ACTIVE_PAGE.selected_widget == 48);
        int fg, bg;

        draw_fill_chars(56, 27, 76, 46, 0);

        fg = 6;
        bg = 0;
        if (focused && -1 == selected_palette) {
                fg = 0;
                bg = 3;
        } else if (-1 == selected_palette) {
                bg = 14;
        }

        draw_text_len("User Defined", 21, 56, 27, fg, bg);
        for (n = 0; n < 19 && palettes[n].name[0]; n++) {
                fg = 6;
                bg = 0;
                if (focused && n == selected_palette) {
                        fg = 0;
                        bg = 3;
                } else if (n == selected_palette) {
                        bg = 14;
                }
                draw_text_len(palettes[n].name, 21, 56, 28 + n, fg, bg);
        }
        max_palette = n;
}
예제 #2
0
static void load_instrument_draw_const(void)
{
	draw_fill_chars(6, 13, 67, 47, 0);
	draw_thin_inner_box(50, 12, 61, 48, 0,0);
	draw_box(5, 12, 68, 48, BOX_THICK | BOX_INNER | BOX_INSET);

}
예제 #3
0
static void _mp_draw(void)
{
	const char *name = NULL;
	int n, i;

	if (_mp_text[0] == '!') {
		/* inst */
		n = instrument_get_current();
		if (n)
			name = song_get_instrument(n)->name;
		else
			name = "(No Instrument)";
	} else if (_mp_text[0] == '@') {
		/* samp */
		n = sample_get_current();
		if (n > 0)
			name = song_get_sample(n)->name;
		else
			name = "(No Sample)";
	} else {
		name = _mp_text;
	}
	i = strlen(name);
	draw_fill_chars(_mp_text_x, _mp_text_y, _mp_text_x + 17, _mp_text_y, 2);
	draw_text_len( name, 17, _mp_text_x, _mp_text_y, 0, 2);
	if (i < 17 && name == _mp_text) {
		draw_char(':', _mp_text_x + i, _mp_text_y, 0, 2);
	}
	draw_box(_mp_text_x, _mp_text_y + 1, _mp_text_x + 14, _mp_text_y + 3,
		 BOX_THIN | BOX_INNER | BOX_INSET);
}
예제 #4
0
static void config_draw_const(void)
{
	int n;

	draw_text("Channel Limit",4,15, 0, 2);
	draw_text("Mixing Rate",6,16, 0, 2);
	draw_text("Sample Size",6,17, 0, 2);
	draw_text("Output Channels",2,18, 0, 2);

	draw_text("Visualization",4,20, 0, 2);
	draw_text("Classic Mode",5,21, 0, 2);
	draw_text("Accidentals",6,22, 0, 2);
	draw_text("Time Display",5,23, 0, 2);

	draw_text("MIDI mode", 8,25, 0, 2);

	draw_text("Video Driver:", 2, 28, 0, 2);
	draw_text("Full Screen:", 38, 28, 0, 2);

	draw_fill_chars(18, 15, 34, 25, 0);
	draw_box(17,14,35,26, BOX_THIN | BOX_INNER | BOX_INSET);

	for (n = 18; n < 35; n++) {
		draw_char(154, n, 19, 3, 0);
		draw_char(154, n, 24, 3, 0);
	}

}
예제 #5
0
static void palette_draw_const(void)
{
        int n;

        draw_text("Predefined Palettes", 57, 25, 0, 2);

        for (n = 0; n < 7; n++) {
                draw_box(2, 13 + (5 * n), 8, 17 + (5 * n), BOX_THICK | BOX_INNER | BOX_INSET);
                draw_box(9, 13 + (5 * n), 19, 17 + (5 * n), BOX_THICK | BOX_INNER | BOX_INSET);
                draw_box(29, 13 + (5 * n), 35, 17 + (5 * n), BOX_THICK | BOX_INNER | BOX_INSET);
                draw_box(36, 13 + (5 * n), 46, 17 + (5 * n), BOX_THICK | BOX_INNER | BOX_INSET);
                draw_fill_chars(3, 14 + (5 * n), 7, 16 + (5 * n), n);
                draw_fill_chars(30, 14 + (5 * n), 34, 16 + (5 * n), n + 7);
        }

        draw_box(56, 13, 62, 17, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_box(63, 13, 73, 17, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_box(56, 18, 62, 22, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_box(63, 18, 73, 22, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_box(55, 26, 77, 47, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_fill_chars(57, 14, 61, 16, 14);
        draw_fill_chars(57, 19, 61, 21, 15);
}
예제 #6
0
static void log_draw_const(void)
{
        draw_box(1, 12, 78, 48, BOX_THICK | BOX_INNER | BOX_INSET);
        draw_fill_chars(2, 13, 77, 47, 0);
}
예제 #7
0
static void message_draw(void)
{
        char *line, *prevline = current_song->message;
        int len = get_nth_line(current_song->message, top_line, &line);
        int n, cp, clipl, clipr;
        int skipc, cutc;

        draw_fill_chars(2, 13, 77, 47, 0);

        if (clippy_owner(CLIPPY_SELECT) == widgets_message) {
                clipl = widgets_message[0].clip_start;
                clipr = widgets_message[0].clip_end;
                if (clipl > clipr) {
                        cp = clipl;
                        clipl = clipr;
                        clipr = cp;
                }
        } else {
                clipl = clipr = -1;
        }

        for (n = 0; n < 35; n++) {
                if (len < 0) {
                        break;
                } else if (len > 0) {
                        /* FIXME | shouldn't need this check here,
                         * FIXME | because the line should already be
                         * FIXME | short enough to fit */
                        if (len > LINE_WRAP)
                                len = LINE_WRAP;
                        text(line, len, n);

                        if (clipl > -1) {
                                cp = line - current_song->message;
                                skipc = clipl - cp;
                                cutc = clipr - clipl;
                                if (skipc < 0) {
                                        cutc += skipc; /* ... -skipc */
                                        skipc = 0;
                                }
                                if (cutc < 0) cutc = 0;
                                if (cutc > (len-skipc)) cutc = (len-skipc);
                                if (cutc > 0 && skipc < len) {
                                        if (message_extfont)
                                                draw_text_bios_len(line+skipc, cutc, 2+skipc, 13 + n, 6, 8);
                                        else
                                                draw_text_len(line+skipc, cutc, 2+skipc, 13 + n, 6, 8);
                                }
                        }
                }
                if (edit_mode) {
                        draw_char(20, 2 + len, 13 + n, 1, 0);
                }
                prevline = line;
                len = get_nth_line(prevline, 1, &line);
        }

        if (edit_mode && len < 0) {
                /* end of the message */
                len = get_nth_line(prevline, 0, &line);
                /* FIXME: see above */
                if (len > LINE_WRAP)
                        len = LINE_WRAP;
                draw_char(20, 2 + len, 13 + n - 1, 2, 0);
        }

        if (edit_mode) {
                /* draw the cursor */
                len = get_nth_line(current_song->message, cursor_line, &line);

                /* FIXME: ... ugh */
                if (len > LINE_WRAP)
                        len = LINE_WRAP;
                if (cursor_char > LINE_WRAP + 1)
                        cursor_char = LINE_WRAP + 1;

                if (cursor_char >= len) {
                        (message_extfont ? draw_char_bios : draw_char)
                                (20, 2 + cursor_char, 13 + (cursor_line - top_line), 0, 3);
                } else {
                        (message_extfont ? draw_char_bios : draw_char)
                                (line[cursor_char], 2 + cursor_char, 13 + (cursor_line - top_line), 8, 3);
                }
        }
}
예제 #8
0
static void _draw_vis_box(void)
{
	draw_box(62, 5, 78, 8, BOX_THIN | BOX_INNER | BOX_INSET);
	draw_fill_chars(63, 6, 77, 7, 0);
}
예제 #9
0
static void _draw_full(void)
{
        draw_fill_chars(0,0,79,49,0);
}