Subversion Repositories Kolibri OS

Rev

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

  1. ;---------------------------------------------------------
  2. ;------print mouse position on panel----------------------
  3. ;---------------------------------------------------------
  4. PrintMousePos:
  5.         pushad
  6.         mov     eax,[Window_SizeX]
  7.         sub     eax,75+ci_offs_skin_w
  8.         mov     ebx,ci_panel_y_pos+6
  9.         mov     ecx,52
  10.         mov     edx,18
  11.         mov     esi,4
  12.         call draw_volume_rectangle ; border for mouse x pos
  13.  
  14.         mov     eax,[Window_SizeX]
  15.         sub     eax,75+ci_offs_skin_w
  16.         mov     ebx,ci_panel_y_pos+6+18+4
  17.         mov     ecx,52
  18.         mov     edx,18
  19.         mov     esi,4
  20.         call draw_volume_rectangle ; border for mouse y pos
  21.  
  22.         mov     eax,[Window_SizeX]
  23.         sub     eax,70+ci_offs_skin_w
  24.         mov     ebx,ci_panel_y_pos+6+6
  25.         and     ecx,0
  26.         mov     edx,mouse_pos_x
  27.         mov     esi,2
  28.         call print_text
  29.  
  30.         mov     eax,[Window_SizeX]
  31.         sub     eax,70+ci_offs_skin_w
  32.         mov     ebx,ci_panel_y_pos+6+6+18+4
  33.         and     ecx,0
  34.         mov     edx,mouse_pos_y
  35.         mov     esi,2
  36.         call print_text
  37.  
  38.         mov     ecx,[ScreenX]
  39.         add     ecx,[PosX]
  40.         mov     edx,[Window_SizeX]
  41.         sub     edx,55+ci_offs_skin_w
  42.         shl     edx,16
  43.         add     edx,ci_panel_y_pos+6+6
  44.         and     esi,0
  45.         mcall SF_DRAW_NUMBER,<4,0>
  46.  
  47.         mov     ecx,[ScreenY]
  48.         add     ecx,[PosY]
  49.         mov     edx,[Window_SizeX]
  50.         sub     edx,55+ci_offs_skin_w
  51.         shl     edx,16
  52.         add     edx,ci_panel_y_pos+6+18+4+6
  53.         mcall
  54.  
  55.         popad
  56.         ret
  57.  
  58. ;----------------------------------------------------------
  59. ;------------draw lines of scoll---------------------------
  60. ;----------------------------------------------------------
  61. draw_scrollers:
  62.         mov     edi,[CounterX]
  63.         mov     eax,[Scroll1CoordinatX]
  64.         mov     ebx,[Window_SizeY]
  65.         sub     ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
  66.         mov     ecx,[Window_SizeX]
  67.         sub     ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
  68.         mov     edx,ci_scroll_dim-6
  69.         mov     esi,1
  70.         mov     [Scroll1CoordinatY],ebx
  71.         mov     [Scroll1MaxSizeY],edx
  72.         mov     [Scroll1MaxSizeX],ecx
  73.         imul    ecx,edi
  74.         push    eax     ebx     edx
  75.         mov     eax,ecx
  76.         mov     ebx,[Picture_SizeX]
  77.         cdq
  78.         idiv    ebx
  79.         mov     ecx,eax
  80.         pop     edx     ebx     eax
  81.         mov     [Scroll1SizeX],ecx
  82.         mov     edi,[Scroll1MaxSizeX]
  83.         sub     edi,ecx
  84.         mov     [Scroll1FreeX],edi
  85.         call draw_volume_rectangle ; horizontal scrollbar polzunok
  86.  
  87.         mov     eax,[Window_SizeX]
  88.         sub     eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
  89.         mov     ebx,[Scroll2CoordinatY]
  90.         mov     ecx,ci_scroll_dim-6
  91.         mov     edx,[Window_SizeY]
  92.         sub     edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
  93.         mov     esi,1
  94.         mov     [Scroll2CoordinatX],eax
  95.         mov     [Scroll2MaxSizeX],ecx
  96.         mov     [Scroll2MaxSizeY],edx
  97.  
  98.         imul    edx,[CounterY]
  99.         push    eax     ebx
  100.         mov     eax,edx
  101.         mov     ebx,[Picture_SizeY]
  102.         cdq
  103.         idiv    ebx
  104.         mov     edx,eax
  105.         pop     ebx     eax
  106.         mov     [Scroll2SizeY],edx
  107.         mov     edi,[Scroll2MaxSizeY]
  108.         sub     edi,edx
  109.         mov     [Scroll2FreeY],edi
  110.         call draw_volume_rectangle ; vertical scrollbar polzunok
  111.  
  112.         ret
  113.  
  114. button_menu_size_x      dd 0
  115. button_menu_size_y      dd 0