mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
* Fix bad mouse controls on desktop.
This commit is contained in:
@@ -359,16 +359,23 @@ void Minecraft::handleMouseClick(int type)
|
||||
{
|
||||
if (!isTouchscreen())
|
||||
{
|
||||
if (type == 1)
|
||||
eBuildActionIntent intent;
|
||||
switch (type)
|
||||
{
|
||||
BuildActionIntention bai(INTENT_HELD);
|
||||
handleBuildAction(&bai);
|
||||
}
|
||||
if (type == 2)
|
||||
{
|
||||
BuildActionIntention bai(INTENT_CLICKED);
|
||||
handleBuildAction(&bai);
|
||||
case BUTTON_LEFT:
|
||||
intent = INTENT_MOUSE_LEFTCLICK;
|
||||
break;
|
||||
case BUTTON_RIGHT:
|
||||
intent = INTENT_MOUSE_RIGHTCLICK;
|
||||
break;
|
||||
case BUTTON_MIDDLE:
|
||||
intent = INTENT_MOUSE_MIDDLECLICK;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
BuildActionIntention bai(intent);
|
||||
handleBuildAction(&bai);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user