Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. select_menu:
  2.         call    check_alt
  3. .1:
  4.         xor     eax,eax
  5.         mov     [menu_data_1.ret_key],eax
  6.  
  7.         push    dword menu_data_1
  8.         call    [menu_bar_activate]
  9.  
  10.         call    clear_control_key_flag
  11.  
  12.         mov     eax,[menu_data_1.ret_key]
  13.         mov     [menu_data_1.ret_key],dword 0
  14.         cmp     eax,1
  15.         je      .6
  16.  
  17.         cmp     eax,2
  18.         je      .2
  19.  
  20.         cmp     [menu_data_1.click],dword 1
  21.         jne     still
  22.  
  23.         cmp     [menu_data_1.cursor_out],dword 0
  24.         jne     analyse_out_menu_1
  25.         jmp     still
  26. ;---------------------------------------------------------------------
  27. .2:
  28.         xor     eax,eax
  29.         mov     [menu_data_2.ret_key],eax
  30.  
  31.         push    dword menu_data_2
  32.         call    [menu_bar_activate]
  33.  
  34.         call    clear_control_key_flag
  35.  
  36.         mov     eax,[menu_data_2.ret_key]
  37.         mov     [menu_data_2.ret_key],dword 0
  38.         cmp     eax,1
  39.         je      .1
  40.  
  41.         cmp     eax,2
  42.         je      .3
  43.  
  44.  
  45.         cmp     [menu_data_2.click],dword 1
  46.         jne     still
  47.  
  48.         cmp     [menu_data_2.cursor_out],dword 0
  49.         jne     analyse_out_menu_2
  50.         jmp     still
  51. ;---------------------------------------------------------------------
  52. .3:
  53.         xor     eax,eax
  54.         mov     [menu_data_3.ret_key],eax
  55.  
  56.         push    dword menu_data_3
  57.         call    [menu_bar_activate]
  58.  
  59.         call    clear_control_key_flag
  60.  
  61.         mov     eax,[menu_data_3.ret_key]
  62.         mov     [menu_data_3.ret_key],dword 0
  63.         cmp     eax,1
  64.         je      .2
  65.  
  66.         cmp     eax,2
  67.         je      .4
  68.  
  69.  
  70.         cmp     [menu_data_3.click],dword 1
  71.         jne     still
  72.  
  73.         cmp     [menu_data_3.cursor_out],dword 0
  74.         jne     analyse_out_menu_3
  75.         jmp     still
  76. ;---------------------------------------------------------------------
  77. .4:
  78.         xor     eax,eax
  79.         mov     [menu_data_4.ret_key],eax
  80.  
  81.         push    dword menu_data_4
  82.         call    [menu_bar_activate]
  83.  
  84.         call    clear_control_key_flag
  85.  
  86.         mov     eax,[menu_data_4.ret_key]
  87.         mov     [menu_data_4.ret_key],dword 0
  88.         cmp     eax,1
  89.         je      .3
  90.  
  91.         cmp     eax,2
  92.         je      .5
  93.  
  94.  
  95.         cmp     [menu_data_4.click],dword 1
  96.         jne     still
  97.  
  98.         cmp     [menu_data_4.cursor_out],dword 0
  99.         jne     analyse_out_menu_4
  100.         jmp     still
  101. ;---------------------------------------------------------------------
  102. .5:
  103.         xor     eax,eax
  104.         mov     [menu_data_5.ret_key],eax
  105.  
  106.         push    dword menu_data_5
  107.         call    [menu_bar_activate]
  108.  
  109.         call    clear_control_key_flag
  110.  
  111.         mov     eax,[menu_data_5.ret_key]
  112.         mov     [menu_data_5.ret_key],dword 0
  113.         cmp     eax,1
  114.         je      .4
  115.  
  116.         cmp     eax,2
  117.         je      .6
  118.  
  119.  
  120.         cmp     [menu_data_5.click],dword 1
  121.         jne     still
  122.  
  123.         cmp     [menu_data_5.cursor_out],dword 0
  124.         jne     analyse_out_menu_5
  125.         jmp     still
  126. ;---------------------------------------------------------------------
  127. .6:
  128.         xor     eax,eax
  129.         mov     [menu_data_6.ret_key],eax
  130.  
  131.         push    dword menu_data_6
  132.         call    [menu_bar_activate]
  133.  
  134.         call    clear_control_key_flag
  135.  
  136.         mov     eax,[menu_data_6.ret_key]
  137.         mov     [menu_data_6.ret_key],dword 0
  138.         cmp     eax,1
  139.         je      .5
  140.  
  141.         cmp     eax,2
  142.         je      .1
  143.  
  144.  
  145.         cmp     [menu_data_6.click],dword 1
  146.         jne     still
  147.  
  148.         cmp     [menu_data_6.cursor_out],dword 0
  149.         jne     analyse_out_menu_6
  150.         jmp     still
  151. ;---------------------------------------------------------------------
  152. clear_control_key_flag:
  153.         push    eax
  154.         xor     eax,eax
  155.         mov     [shift_flag],al
  156.         mov     [ctrl_flag],al
  157.         mov     [alt_flag],al
  158.         pop     eax
  159.         ret
  160. ;---------------------------------------------------------------------
  161. check_alt:
  162.         xor     eax,eax
  163.         mov     al,[alt_flag]
  164.         test    eax,eax
  165.         jz      @f
  166.         xor     ebx,ebx
  167.         ret
  168. @@:
  169.         add     esp,4
  170.         jmp     still
  171. ;---------------------------------------------------------------------