Subversion Repositories Kolibri OS

Rev

Rev 836 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ; ‚ᯮ¬®£ â¥«ì­ë© ä ©« ¤«ï console.inc - ®¯¨á ­¨¥ scrollbar
  2. ; ‚¥à⨪ «ì­ ï ¯à®ªàã⪠
  3. virtual at 0
  4. file 'conscrlv.bmp', 36h
  5. ; sanity check
  6. load a1 word from 0
  7. load a2 dword from 0xE
  8. if (a1 <> 'BM') | (a2 <> 0x28)
  9. error 'conscrlv.bmp: not BMP file!'
  10. end if
  11. load con.vscroll_width dword from 0x12
  12. load con.vscroll_height dword from 0x16
  13. load a1 dword from 0x1A
  14. if a1 <> 0x180001
  15. error 'conscrlv.bmp: must be 24-bit bitmap!'
  16. end if
  17. end virtual
  18.  
  19. con.vscroll_btn_height = 21
  20. con.vscroll_bgr_height = 2
  21. con.vscroll_bar_height1 = 2
  22. con.vscroll_bar_height2 = 1
  23. con.vscroll_bar_height3 = 2
  24.  
  25. if con.vscroll_btn_height*4 + con.vscroll_bgr_height*2 \
  26.         + con.vscroll_bar_height1 + con.vscroll_bar_height2 + con.vscroll_bar_height3 \
  27.         <> con.vscroll_height
  28. error 'conscrlv.bmp: invalid dimensions!'
  29. end if
  30.  
  31. ; ‡ £à㦠¥¬ ¤ ­­ë¥ BMP, ­  室㠯८¡à §ãï ¨å ¢ ¤ ­­ë¥ ¤«ï 7-© ä㭪樨
  32. con.vscroll:
  33. repeat con.vscroll_height
  34.         file 'conscrlv.bmp':36h + ((con.vscroll_width*3+3) and not 3)*(con.vscroll_height - %),\
  35.                 con.vscroll_width*3
  36. end repeat
  37. con.vscroll_btn1 = con.vscroll
  38. con.vscroll_btn2 = con.vscroll + con.vscroll_btn_height*con.vscroll_width*3
  39. con.vscroll_btn3 = con.vscroll + 2*con.vscroll_btn_height*con.vscroll_width*3
  40. con.vscroll_btn4 = con.vscroll + 3*con.vscroll_btn_height*con.vscroll_width*3
  41. con.vscroll_bgr1 = con.vscroll + 4*con.vscroll_btn_height*con.vscroll_width*3
  42. con.vscroll_bgr2 = con.vscroll_bgr1 + con.vscroll_bgr_height*con.vscroll_width*3
  43. con.vscroll_bar1 = con.vscroll_bgr2 + con.vscroll_bgr_height*con.vscroll_width*3
  44. con.vscroll_bar2 = con.vscroll_bar1 + con.vscroll_bar_height1*con.vscroll_width*3
  45. con.vscroll_bar3 = con.vscroll_bar2 + con.vscroll_bar_height2*con.vscroll_width*3
  46.