mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-01-02 10:46:32 +00:00
41 lines
853 B
HolyC
41 lines
853 B
HolyC
|
|
|||
|
$SP,"<1>",BI=1$
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
I64 x=0;
|
|||
|
|
|||
|
U0 DrawIt(CTask *,CDC *dc)
|
|||
|
{
|
|||
|
Sprite3(dc,x%100,100,0,$IB,"<1>",BI=1$);
|
|||
|
}
|
|||
|
|
|||
|
U0 KeyDownBitMapDemo()
|
|||
|
{
|
|||
|
//This conversion routine is slow.
|
|||
|
I64 i_sc=Char2ScanCode('i');
|
|||
|
|
|||
|
"Press and hold $$GREEN$$'i'$$FG$$.\n";
|
|||
|
while (!Bt(kbd.down_bitmap,i_sc))
|
|||
|
Yield;
|
|||
|
|
|||
|
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
|||
|
Fs->draw_it=&DrawIt;
|
|||
|
|
|||
|
//$LK,"kbd.down_bitmap",A="MN:CKbdStateGlbls"$ is indexed with the
|
|||
|
//merged scan code.(left shift and
|
|||
|
//right shift combined for example.)
|
|||
|
//$LK,"kbd.down_bitmap2",A="MN:CKbdStateGlbls"$ is indexed with the
|
|||
|
//distinct scan code.See $LK,"Char",A="HI:Char"$ and $LK,"Scan Codes",A="MN:SC_INS"$.
|
|||
|
|
|||
|
while (Bt(kbd.down_bitmap,i_sc)) {
|
|||
|
x++;
|
|||
|
Sleep(10);
|
|||
|
}
|
|||
|
SettingsPop;
|
|||
|
FlushMsgs;
|
|||
|
}
|
|||
|
|
|||
|
KeyDownBitMapDemo;
|
|||
|
|