Subversion Repositories Kolibri OS

Rev

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

  1. ;-----------------------------------------------------------
  2. ;---load icons  in memory and draw icons on panel-----------
  3. ;-----------------------------------------------------------
  4. load_icons:
  5.         stdcall [img_decode], panel_picture, panel_picture.end-panel_picture, 0
  6.         mov ebx,eax
  7.         mov edi,[ScreenPointer]
  8.         add edi,mem_screen
  9.         stdcall [img_to_rgb2], ebx,edi ;преобразуем изображение к формату rgb
  10.         stdcall [img_destroy], ebx ;удаляем временный буфер с параметрами изображения
  11.         ret
  12.  
  13. draw_icons:
  14.  
  15.          mov [Icon_X],7
  16.          mov [Icon_Y],20+15+4
  17.  
  18.          ;draw panel picture
  19.          mov edx,[Icon_X]
  20.          shl edx,16
  21.          add edx,[Icon_Y]
  22.          mov ebx,[ScreenPointer]
  23.          add ebx,mem_screen
  24.          mov ecx,417*65536+46
  25.          mcall SF_PUT_IMAGE
  26.  
  27.  
  28.          ;main buttons of instrumnts
  29.  
  30.          and [counter],0
  31.          mov [Icon_X],9
  32.          mov [Icon_Y],21+15+4+1
  33.  
  34.    main_buttons:
  35.  
  36.          mov eax,8
  37.          mov ebx,[Icon_X]
  38.          mov ecx,[Icon_Y]
  39.          dec ebx
  40.          dec ecx
  41.          shl ebx,16
  42.          shl ecx,16
  43.          add ebx,18
  44.          add ecx,19
  45.          mov edx,[counter]
  46.          add edx,10
  47.          add edx,1000000000000000000000000000000b
  48.          mcall
  49.  
  50.  
  51.          add [Icon_X],22
  52.  
  53.          inc [counter]
  54.          cmp [counter],19
  55.          jne main_buttons
  56.  
  57.  
  58.          ;buttons of brushes(and lines width)
  59.          and [counter],0
  60.  
  61.          mov [Icon_X],8+1
  62.          mov [Icon_Y],20+15+4+25+1
  63.  
  64.          next_button_brush:
  65.  
  66.          mov eax,8
  67.          mov ebx,[Icon_X]
  68.          mov ecx,[Icon_Y]
  69.          dec ebx
  70.          dec ecx
  71.          shl ebx,16
  72.          shl ecx,16
  73.          add ebx,18
  74.          add ecx,19
  75.          mov edx,[counter]
  76.          add edx,40
  77.          add edx,1000000000000000000000000000000b
  78.          mcall
  79.  
  80.          add [Icon_X],19
  81.  
  82.          inc [counter]
  83.          cmp [counter],5
  84.          jne next_button_brush
  85.  
  86.  
  87.          ;buttons of zoom
  88.          and [counter],0
  89.  
  90.          mov [Icon_X],8+155+1
  91.          mov [Icon_Y],20+15+4+25+1
  92.  
  93.          next_button_zoom:
  94.  
  95.          mov eax,8
  96.          mov ebx,[Icon_X]
  97.          mov ecx,[Icon_Y]
  98.          dec ebx
  99.          dec ecx
  100.          shl ebx,16
  101.          shl ecx,16
  102.          add ebx,18
  103.          add ecx,19
  104.          mov edx,[counter]
  105.          add edx,45
  106.          add edx,1000000000000000000000000000000b
  107.          mcall
  108.  
  109.          add [Icon_X],19
  110.  
  111.          inc [counter]
  112.          cmp [counter],6
  113.          jne next_button_zoom
  114.  
  115.  
  116.          ; button of palette
  117.          mov [Icon_X],7+105+1
  118.          mov [Icon_Y],19+15+4+25+1
  119.  
  120.          mov eax,8
  121.          mov ebx,[Icon_X]
  122.          mov ecx,[Icon_Y]
  123.          dec ebx
  124.          dec ecx
  125.          shl ebx,16
  126.          shl ecx,16
  127.          add ebx,20
  128.          add ecx,21
  129.          mov edx,51
  130.          add edx,1000000000000000000000000000000b
  131.          mcall
  132.  
  133.          ; button of color
  134.          mov [Icon_X],7+128+1
  135.          mov [Icon_Y],19+15+4+25+1
  136.  
  137.          mov eax,8
  138.          mov ebx,[Icon_X]
  139.          mov ecx,[Icon_Y]
  140.          dec ebx
  141.          dec ecx
  142.          shl ebx,16
  143.          shl ecx,16
  144.          add ebx,20
  145.          add ecx,20
  146.          mov edx,52
  147.          add edx,1000000000000000000000000000000b
  148.          mcall
  149.  
  150.          mov eax,13
  151.          mov ebx,136*65536+19
  152.          mov ecx,64*65536+19
  153.          mov edx,[Color]
  154.          mcall
  155.  
  156.          ret
  157.