Skip to content

Commit

Permalink
Use only left mouse button
Browse files Browse the repository at this point in the history
  • Loading branch information
vberezkin committed Mar 13, 2019
1 parent 39a3674 commit 09e5807
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions Assets/Resources/Expload/OffscreenCEF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,14 @@ private IEnumerator MessagePump()
void Update()
{
var p = Input.mousePosition;
for (int i = 0; i < 3; ++i)
int i = 0; // use only left mouse button
if (Input.GetMouseButtonDown(i))
{
if (Input.GetMouseButtonDown(i))
{
cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, false);
}
if (Input.GetMouseButtonUp(i))
{
cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, true);
}
cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, false);
}
if (Input.GetMouseButtonUp(i))
{
cefClient.SendMouseClick((int)p.x, windowHeight - (int)p.y, i, true);
}
foreach (char code in Input.inputString)
{
Expand Down
4 changes: 2 additions & 2 deletions package/expload.unitypackage
Git LFS file not shown

0 comments on commit 09e5807

Please sign in to comment.