mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
change right click button id to 4 for lua events, to match old tpt
This commit is contained in:
@@ -1653,6 +1653,8 @@ bool LuaScriptInterface::OnMouseMove(int x, int y, int dx, int dy)
|
||||
|
||||
bool LuaScriptInterface::OnMouseDown(int x, int y, unsigned button)
|
||||
{
|
||||
if (button == 3)
|
||||
button = 4;
|
||||
luacon_mousedown = true;
|
||||
luacon_mousebutton = button;
|
||||
return luacon_mouseevent(x, y, button, LUACON_MDOWN, 0);
|
||||
@@ -1660,6 +1662,8 @@ bool LuaScriptInterface::OnMouseDown(int x, int y, unsigned button)
|
||||
|
||||
bool LuaScriptInterface::OnMouseUp(int x, int y, unsigned button)
|
||||
{
|
||||
if (button == 3)
|
||||
button = 4;
|
||||
luacon_mousedown = false;
|
||||
return luacon_mouseevent(x, y, button, LUACON_MUP, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user