Subversion Repositories Kolibri OS

Rev

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

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