Subversion Repositories Kolibri OS

Rev

Rev 6342 | Rev 6360 | 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 ebx,[Icon_X]
  37.          mov ecx,[Icon_Y]
  38.          dec ebx
  39.          dec ecx
  40.          shl ebx,16
  41.          shl ecx,16
  42.          add ebx,18
  43.          add ecx,19
  44.          mov edx,[counter]
  45.          add edx,10
  46.          add edx,1000000000000000000000000000000b
  47.          mcall SF_DEFINE_BUTTON
  48.  
  49.  
  50.          add [Icon_X],22
  51.  
  52.          inc [counter]
  53.          cmp [counter],19
  54.          jne main_buttons
  55.  
  56.  
  57.          ;buttons of brushes(and lines width)
  58.          and [counter],0
  59.  
  60.          mov [Icon_X],8+1
  61.          mov [Icon_Y],20+15+4+25+1
  62.  
  63.          next_button_brush:
  64.  
  65.          mov ebx,[Icon_X]
  66.          mov ecx,[Icon_Y]
  67.          dec ebx
  68.          dec ecx
  69.          shl ebx,16
  70.          shl ecx,16
  71.          add ebx,18
  72.          add ecx,19
  73.          mov edx,[counter]
  74.          add edx,40
  75.          add edx,1000000000000000000000000000000b
  76.          mcall SF_DEFINE_BUTTON
  77.  
  78.          add [Icon_X],19
  79.  
  80.          inc [counter]
  81.          cmp [counter],5
  82.          jne next_button_brush
  83.  
  84.  
  85.          ;buttons of zoom
  86.          and [counter],0
  87.  
  88.          mov [Icon_X],8+155+1
  89.          mov [Icon_Y],20+15+4+25+1
  90.  
  91.          next_button_zoom:
  92.  
  93.          mov ebx,[Icon_X]
  94.          mov ecx,[Icon_Y]
  95.          dec ebx
  96.          dec ecx
  97.          shl ebx,16
  98.          shl ecx,16
  99.          add ebx,18
  100.          add ecx,19
  101.          mov edx,[counter]
  102.          add edx,45
  103.          add edx,1000000000000000000000000000000b
  104.          mcall SF_DEFINE_BUTTON
  105.  
  106.          add [Icon_X],19
  107.  
  108.          inc [counter]
  109.          cmp [counter],6
  110.          jne next_button_zoom
  111.  
  112.  
  113.          ; button of palette
  114.          mov [Icon_X],7+105+1
  115.          mov [Icon_Y],19+15+4+25+1
  116.  
  117.          mov ebx,[Icon_X]
  118.          mov ecx,[Icon_Y]
  119.          dec ebx
  120.          dec ecx
  121.          shl ebx,16
  122.          shl ecx,16
  123.          add ebx,20
  124.          add ecx,21
  125.          mov edx,51
  126.          add edx,1000000000000000000000000000000b
  127.          mcall SF_DEFINE_BUTTON
  128.  
  129.          ; button of color
  130.          mov [Icon_X],7+128+1
  131.          mov [Icon_Y],19+15+4+25+1
  132.  
  133.          mov ebx,[Icon_X]
  134.          mov ecx,[Icon_Y]
  135.          dec ebx
  136.          dec ecx
  137.          shl ebx,16
  138.          shl ecx,16
  139.          add ebx,20
  140.          add ecx,20
  141.          mov edx,52
  142.          add edx,1000000000000000000000000000000b
  143.          mcall SF_DEFINE_BUTTON
  144.  
  145.          mcall SF_DRAW_RECT, 136*65536+19,64*65536+19,[Color]
  146.  
  147.          ret
  148.