pantalla.h
来自「copied from the author.. simplex prog」· C头文件 代码 · 共 54 行
H
54 行
#include <string.h>
//Mis funciones para pantalla
void color(int text_c, int back_c) // Cambia el color de la pantalla
// y el del texto
{
textcolor(text_c);
textbackground(back_c);
}
void cls(int text_c, int back_c) // Cambia el color de la pantalla
// y el del texto y limpia pantalla
{
textcolor(text_c);
textbackground(back_c);
clrscr();
}
//Pone una etiqueta con fondo en color y con texto justificado al centro
void Label(int inicio, int y, int longitud, int bcolor, char *Text, int tcolor)
{
int i,xmid;
for(i=inicio;i<=longitud;i++)
{
textbackground(bcolor);
gotoxy(i,y);
cprintf("%c",' ');
}
xmid=inicio+longitud; //calculos para justificar al centro
xmid=(xmid/2)-(strlen(Text)/2);
textcolor(tcolor); textbackground(bcolor);
gotoxy(xmid,y);
cprintf("%s", Text);
}
//Pone un cuadro con una sombrita y toda la cosa
void text_win(int x1, int y1, int x2, int y2, int col)
{
int i,j;
for (j=y1; j<=y2; j++)
for (i=x1; i<=x2; i++)
{textcolor(col); gotoxy(i,j); cprintf("
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?