Subversion Repositories Kolibri OS

Rev

Rev 6359 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;---------------------------------------------------------
  2. ;-----draw panel menu(main engin of panel)----------------
  3. ;---------------------------------------------------------
  4. print_panel_menu:
  5. ;delit main buttons(some time)
  6.         mov     [counter],10
  7.  
  8. next_icon_delit1:
  9.         mov     edx,[counter]
  10.         add     edx,11100000000000000000000000000000b
  11.         mcall SF_DEFINE_BUTTON
  12.         inc     [counter]
  13.         cmp     [counter],30
  14.         jl      next_icon_delit1
  15.  
  16.         ;delit buttons of brushes
  17.         mov     [counter],40
  18.  
  19. next_icon_delit2:
  20.         mov     edx,[counter]
  21.         add     edx,11100000000000000000000000000000b
  22.         mcall SF_DEFINE_BUTTON
  23.         inc     [counter]
  24.         cmp     [counter],45
  25.         jl      next_icon_delit2
  26.  
  27.         ;delit buttons of zoom
  28.         mov     [counter],45
  29.  
  30. next_icon_delit3:
  31.         mov     edx,[counter]
  32.         add     edx,11100000000000000000000000000000b
  33.         mcall SF_DEFINE_BUTTON
  34.         inc     [counter]
  35.         cmp     [counter],50
  36.         jl      next_icon_delit3
  37.  
  38. ;delit buttons of palette
  39.         mov     edx,51
  40.         add     edx,11100000000000000000000000000000b
  41.         mcall SF_DEFINE_BUTTON
  42.  
  43. ;delit buttons of color
  44.         mov     edx,52
  45.         add     edx,11100000000000000000000000000000b
  46.         mcall SF_DEFINE_BUTTON
  47.  
  48.         call GetMouseCoordinats
  49.  
  50.         and     [menu_counter],0
  51.         and     [counter_11],0
  52.  
  53.         mcall SF_SLEEP,15
  54.  
  55.         pusha
  56.         call    drawwin
  57.         popa
  58.  
  59.         mov     [number_panel],0
  60.  
  61.         jmp     TakeInstruments
  62.  
  63. ;---------------------------------------------------------
  64. ;------print mouse position on panel----------------------
  65. ;---------------------------------------------------------
  66. PrintMousePos:
  67.         pushad
  68.         mov     eax,[Window_SizeX]
  69.         sub     eax,75+ci_offs_skin_w
  70.         mov     ebx,ci_panel_y_pos+6
  71.         mov     ecx,52
  72.         mov     edx,18
  73.         mov     esi,4
  74.         call draw_volume_rectangle ; border for mouse x pos
  75.  
  76.         mov     eax,[Window_SizeX]
  77.         sub     eax,75+ci_offs_skin_w
  78.         mov     ebx,ci_panel_y_pos+6+18+4
  79.         mov     ecx,52
  80.         mov     edx,18
  81.         mov     esi,4
  82.         call draw_volume_rectangle ; border for mouse y pos
  83.  
  84.         mov     eax,[Window_SizeX]
  85.         sub     eax,70+ci_offs_skin_w
  86.         mov     ebx,ci_panel_y_pos+6+6
  87.         and     ecx,0
  88.         mov     edx,mouse_pos_x
  89.         mov     esi,2
  90.         call print_text
  91.  
  92.         mov     eax,[Window_SizeX]
  93.         sub     eax,70+ci_offs_skin_w
  94.         mov     ebx,ci_panel_y_pos+6+6+18+4
  95.         and     ecx,0
  96.         mov     edx,mouse_pos_y
  97.         mov     esi,2
  98.         call print_text
  99.  
  100.         mov     ecx,[ScreenX]
  101.         add     ecx,[PosX]
  102.         mov     edx,[Window_SizeX]
  103.         sub     edx,55+ci_offs_skin_w
  104.         shl     edx,16
  105.         add     edx,ci_panel_y_pos+6+6
  106.         and     esi,0
  107.         mcall SF_DRAW_NUMBER,<4,0>
  108.  
  109.         mov     ecx,[ScreenY]
  110.         add     ecx,[PosY]
  111.         mov     edx,[Window_SizeX]
  112.         sub     edx,55+ci_offs_skin_w
  113.         shl     edx,16
  114.         add     edx,ci_panel_y_pos+6+18+4+6
  115.         mcall
  116.  
  117.         popad
  118.         ret
  119.  
  120. ;----------------------------------------------------------
  121. ;------------draw lines of scoll---------------------------
  122. ;----------------------------------------------------------
  123. draw_scrollers:
  124.         mov     edi,[CounterX]
  125.         mov     eax,[Scroll1CoordinatX]
  126.         mov     ebx,[Window_SizeY]
  127.         sub     ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
  128.         mov     ecx,[Window_SizeX]
  129.         sub     ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
  130.         mov     edx,ci_scroll_dim-6
  131.         mov     esi,1
  132.         mov     [Scroll1CoordinatY],ebx
  133.         mov     [Scroll1MaxSizeY],edx
  134.         mov     [Scroll1MaxSizeX],ecx
  135.         imul    ecx,edi
  136.         push    eax     ebx     edx
  137.         mov     eax,ecx
  138.         mov     ebx,[Picture_SizeX]
  139.         cdq
  140.         idiv    ebx
  141.         mov     ecx,eax
  142.         pop     edx     ebx     eax
  143.         mov     [Scroll1SizeX],ecx
  144.         mov     edi,[Scroll1MaxSizeX]
  145.         sub     edi,ecx
  146.         mov     [Scroll1FreeX],edi
  147.         call draw_volume_rectangle ; horizontal scrollbar polzunok
  148.  
  149.         mov     eax,[Window_SizeX]
  150.         sub     eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
  151.         mov     ebx,[Scroll2CoordinatY]
  152.         mov     ecx,ci_scroll_dim-6
  153.         mov     edx,[Window_SizeY]
  154.         sub     edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
  155.         mov     esi,1
  156.         mov     [Scroll2CoordinatX],eax
  157.         mov     [Scroll2MaxSizeX],ecx
  158.         mov     [Scroll2MaxSizeY],edx
  159.  
  160.         imul    edx,[CounterY]
  161.         push    eax     ebx
  162.         mov     eax,edx
  163.         mov     ebx,[Picture_SizeY]
  164.         cdq
  165.         idiv    ebx
  166.         mov     edx,eax
  167.         pop     ebx     eax
  168.         mov     [Scroll2SizeY],edx
  169.         mov     edi,[Scroll2MaxSizeY]
  170.         sub     edi,edx
  171.         mov     [Scroll2FreeY],edi
  172.         call draw_volume_rectangle ; vertical scrollbar polzunok
  173.  
  174.         ret
  175.  
  176. button_menu_size_x      dd 0
  177. button_menu_size_y      dd 0