📄 login.c
字号:
while(1)
{
account_input:
while(1)
{
ch=GetString(account_input_box,0,0,id,14);
switch(ch)
{
case KEY_DOWN:
case '\n':
goto passwork_input;
break;
}
}
while(1)
{
passwork_input:
ch=GetString(account_input_box,0,0,id,14);
switch(ch)
{
case KEY_UP:
goto account_input;
break;
case KEY_DOWN:
case '\n'://转到ok_button下面
goto ok_button;
break;
}
}
while(1)
{
ok_button:
ch=GetChar(ok_button,0,0)
switch(tempchar)
{
case KEY_UP://转上面
goto passwork_input;
break;
case KEY_RIGHT:
case KEY_DOWN:
goto exit_button;
break;
case '\n':
DestroyWindow(login_win_top);
DestroyWindow(login_win_shadow);
DestroyWindow(login_win_mid);
DestroyWindow(account_input_box);
DestroyWindow(password_input_box);
DestroyWindow(ok_button);
DestroyWindow(ok_button_shadow);
DestroyWindow(exit_button);
DestroyWindow(exit_button_shadow);
DestroyWindow(login_win_bottom);
//清除一下stdscr这个标准虚窗口
wclear(stdscr);
return 0;
}
}
while(1)
{
exit_button:
ch=GetChar(exit_button);
switch(ch)
{
case KEY_UP:
case KEY_LEFT://转上面
goto ok_button;
break;
case '\n':
return 1;//返回1为退出
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -