kolibrios/programs/develop/libraries/console/conscrl.inc
Evgeny Grechnikov (Diamond) fca4378433 console library: upload sources
git-svn-id: svn://kolibrios.org@836 a494cfbc-eb01-0410-851d-a64ba20cac60
2008-07-27 14:25:33 +00:00

46 lines
1.7 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

; ᯮ¬®£ â¥«ì­ë© ä ©« ¤«ï console.inc - ®¯¨á ­¨¥ scrollbar
; ¥à⨪ «ì­ ï ¯à®ªàã⪠
virtual at 0
file 'conscrlv.bmp', 36h
; sanity check
load a1 word from 0
load a2 dword from 0xE
if (a1 <> 'BM') | (a2 <> 0x28)
error 'conscrlv.bmp: not BMP file!'
end if
load con.vscroll_width dword from 0x12
load con.vscroll_height dword from 0x16
load a1 dword from 0x1A
if a1 <> 0x180001
error 'conscrlv.bmp: must be 24-bit bitmap!'
end if
end virtual
con.vscroll_btn_height = 21
con.vscroll_bgr_height = 2
con.vscroll_bar_height1 = 2
con.vscroll_bar_height2 = 1
con.vscroll_bar_height3 = 2
if con.vscroll_btn_height*4 + con.vscroll_bgr_height*2 \
+ con.vscroll_bar_height1 + con.vscroll_bar_height2 + con.vscroll_bar_height3 \
<> con.vscroll_height
error 'conscrlv.bmp: invalid dimensions!'
end if
;  £à㦠¥¬ ¤ ­­ë¥ BMP, ­  室㠯८¡à §ãï ¨å ¢ ¤ ­­ë¥ ¤«ï 7-© ä㭪樨
con.vscroll:
repeat con.vscroll_height
file 'conscrlv.bmp':36h + ((con.vscroll_width*3+3) and not 3)*(con.vscroll_height - %),\
con.vscroll_width*3
end repeat
con.vscroll_btn1 = con.vscroll
con.vscroll_btn2 = con.vscroll + con.vscroll_btn_height*con.vscroll_width*3
con.vscroll_btn3 = con.vscroll + 2*con.vscroll_btn_height*con.vscroll_width*3
con.vscroll_btn4 = con.vscroll + 3*con.vscroll_btn_height*con.vscroll_width*3
con.vscroll_bgr1 = con.vscroll + 4*con.vscroll_btn_height*con.vscroll_width*3
con.vscroll_bgr2 = con.vscroll_bgr1 + con.vscroll_bgr_height*con.vscroll_width*3
con.vscroll_bar1 = con.vscroll_bgr2 + con.vscroll_bgr_height*con.vscroll_width*3
con.vscroll_bar2 = con.vscroll_bar1 + con.vscroll_bar_height1*con.vscroll_width*3
con.vscroll_bar3 = con.vscroll_bar2 + con.vscroll_bar_height2*con.vscroll_width*3