hedgewars/uInputHandler.pas
changeset 14850 6c51f74d80a8
parent 14837 769189675b6c
child 14899 5a6da39c5f2a
equal deleted inserted replaced
14849:9e8c201eae9d 14850:6c51f74d80a8
   287             ProcessKey(KeyNameToCode('mousel'), ButtonDown);
   287             ProcessKey(KeyNameToCode('mousel'), ButtonDown);
   288         SDL_BUTTON_MIDDLE:
   288         SDL_BUTTON_MIDDLE:
   289             ProcessKey(KeyNameToCode('mousem'), ButtonDown);
   289             ProcessKey(KeyNameToCode('mousem'), ButtonDown);
   290         SDL_BUTTON_RIGHT:
   290         SDL_BUTTON_RIGHT:
   291             ProcessKey(KeyNameToCode('mouser'), ButtonDown);
   291             ProcessKey(KeyNameToCode('mouser'), ButtonDown);
       
   292         SDL_BUTTON_X1:
       
   293             ProcessKey(KeyNameToCode('mousex1'), ButtonDown);
       
   294         SDL_BUTTON_X2:
       
   295             ProcessKey(KeyNameToCode('mousex2'), ButtonDown);
   292         end;
   296         end;
   293 end;
   297 end;
   294 
   298 
   295 procedure ProcessMouseMotion(xrel, yrel: LongInt);
   299 procedure ProcessMouseMotion(xrel, yrel: LongInt);
   296 begin
   300 begin
   450 begin
   454 begin
   451     // Mouse buttons and mouse wheel
   455     // Mouse buttons and mouse wheel
   452     KeyNames[cKeyMaxIndex    ]:= 'mousel';
   456     KeyNames[cKeyMaxIndex    ]:= 'mousel';
   453     KeyNames[cKeyMaxIndex - 1]:= 'mousem';
   457     KeyNames[cKeyMaxIndex - 1]:= 'mousem';
   454     KeyNames[cKeyMaxIndex - 2]:= 'mouser';
   458     KeyNames[cKeyMaxIndex - 2]:= 'mouser';
   455     mwheelupCode:= cKeyMaxIndex - 3;
   459     KeyNames[cKeyMaxIndex - 3]:= 'mousex1';
       
   460     KeyNames[cKeyMaxIndex - 4]:= 'mousex2';
       
   461     mwheelupCode:= cKeyMaxIndex - 5;
   456     KeyNames[mwheelupCode]:= 'wheelup';
   462     KeyNames[mwheelupCode]:= 'wheelup';
   457     mwheeldownCode:= cKeyMaxIndex - 4;
   463     mwheeldownCode:= cKeyMaxIndex - 6;
   458     KeyNames[mwheeldownCode]:= 'wheeldown';
   464     KeyNames[mwheeldownCode]:= 'wheeldown';
   459 
   465 
   460     // Keyboard keys
   466     // Keyboard keys
   461     uKeyNames.populateKeyNames(KeyNames);
   467     uKeyNames.populateKeyNames(KeyNames);
   462 
   468