mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-05 19:13:21 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4139112811 |
@@ -71,6 +71,26 @@ void HariMain(void)
|
||||
}
|
||||
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 32, 16, 32 + 15 * 8 - 1, 31);
|
||||
putfonts8_asc(binfo->vram, binfo->scrnx, 32, 16, COL8_FFFFFF, s);
|
||||
/* 鼠标指针的移动 */
|
||||
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, mx, my, mx + 15, my + 15); /* 隐藏鼠标 */
|
||||
mx += mdec.x;
|
||||
my += mdec.y;
|
||||
if (mx < 0) {
|
||||
mx = 0;
|
||||
}
|
||||
if (my < 0) {
|
||||
my = 0;
|
||||
}
|
||||
if (mx > binfo->scrnx - 16) {
|
||||
mx = binfo->scrnx - 16;
|
||||
}
|
||||
if (my > binfo->scrny - 16) {
|
||||
my = binfo->scrny - 16;
|
||||
}
|
||||
sprintf(s, "(%3d, %3d)", mx, my);
|
||||
boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 0, 79, 15); /* 隐藏坐标 */
|
||||
putfonts8_asc(binfo->vram, binfo->scrnx, 0, 0, COL8_FFFFFF, s); /* 显示坐标 */
|
||||
putblock8_8(binfo->vram, binfo->scrnx, 16, 16, mx, my, mcursor, 16); /* 描画鼠标 */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user