📄 pantalla.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -