mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
Removed Ctrl-Left Click treating as a Right Click
svn-id: r44633
This commit is contained in:
parent
43a9f9c2ef
commit
c8f002ae43
@ -235,28 +235,6 @@ void DraciEngine::handleEvents() {
|
||||
_game->inventoryInit();
|
||||
}
|
||||
break;
|
||||
case Common::KEYCODE_LCTRL:
|
||||
debugC(6, kDraciGeneralDebugLevel, "Left Ctrl down");
|
||||
_mouse->downModifier(0);
|
||||
break;
|
||||
case Common::KEYCODE_RCTRL:
|
||||
debugC(6, kDraciGeneralDebugLevel, "Right Ctrl down");
|
||||
_mouse->downModifier(1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Common::EVENT_KEYUP:
|
||||
switch (event.kbd.keycode) {
|
||||
case Common::KEYCODE_LCTRL:
|
||||
debugC(6, kDraciGeneralDebugLevel, "Left Ctrl up");
|
||||
_mouse->upModifier(0);
|
||||
break;
|
||||
case Common::KEYCODE_RCTRL:
|
||||
debugC(6, kDraciGeneralDebugLevel, "Right Ctrl up");
|
||||
_mouse->upModifier(1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ Mouse::Mouse(DraciEngine *vm) {
|
||||
_y = 0;
|
||||
_lButton = false;
|
||||
_rButton = false;
|
||||
_modifierState = 0;
|
||||
_cursorType = kNormalCursor;
|
||||
_vm = vm;
|
||||
}
|
||||
@ -42,14 +41,8 @@ Mouse::Mouse(DraciEngine *vm) {
|
||||
void Mouse::handleEvent(Common::Event event) {
|
||||
switch (event.type) {
|
||||
case Common::EVENT_LBUTTONDOWN:
|
||||
// TODO: remove _modifierState, since right click can be achieved via Cmd
|
||||
if (!(_modifierState & 3)) {
|
||||
debugC(6, kDraciGeneralDebugLevel, "Left button down (x: %u y: %u)", _x, _y);
|
||||
_lButton = true;
|
||||
} else { // any Ctrl pressed
|
||||
debugC(6, kDraciGeneralDebugLevel, "Ctrl-Left button down (x: %u y: %u)", _x, _y);
|
||||
_rButton = true;
|
||||
}
|
||||
debugC(6, kDraciGeneralDebugLevel, "Left button down (x: %u y: %u)", _x, _y);
|
||||
_lButton = true;
|
||||
break;
|
||||
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
|
@ -62,17 +62,12 @@ public:
|
||||
void lButtonSet(bool state) { _lButton = state; }
|
||||
void rButtonSet(bool state) { _rButton = state; }
|
||||
|
||||
// Updates the current state of modifiers. The indexes are: 0=left Ctrl, 1=right Ctrl.
|
||||
void downModifier(int index) { _modifierState |= 1 << index; }
|
||||
void upModifier(int index) { _modifierState &= ~(1 << index); }
|
||||
|
||||
uint16 getPosX() const { return _x; }
|
||||
uint16 getPosY() const { return _y; }
|
||||
|
||||
private:
|
||||
uint16 _x, _y;
|
||||
bool _lButton, _rButton;
|
||||
int _modifierState;
|
||||
CursorType _cursorType;
|
||||
DraciEngine *_vm;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user