dispcurs.c
来自「BC3.1编译,小交换机计费系统.使用Dos做出如此好的界面,少有.」· C语言 代码 · 共 41 行
C
41 行
#include <graphics.h>
#include <DEF.INC>
#include <KEY.INC>
#include <FUNC.INC>
#define BASE_DATA 5000
/* --------------------------------------------------------------------
FUNCTION: Display a flash cursor at (start_x, start_y);
the cursor color is specified by bk_color and cursor_color.
the cursor size is 2 lines thick and 8 dots long.
CALLS:
CALLED BY: This is an general-purposed routine.
INPUT: (start_x, start_y) -- the position where the cursor displayed.
bk_color -- the background color.
cursor_color -- the cursor_color.
OUTPUT: None.
RETURN: None.
--------------------------------------------------------------------- */
void disp_cursor(UI start_x, UI start_y, UC bk_color, UC cursor_color)
{
UC color;
static UI count = 0;
static UC dark = 0;
count = ++count%BASE_DATA;
if (count==0)
{
if (dark)
color = cursor_color;
else
color = bk_color;
setcolor(color);
line(start_x, start_y, start_x+7, start_y);
line(start_x, start_y+1, start_x+7, start_y+1);
dark = !dark;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?