Skip to content
Snippets Groups Projects
Commit adb0706a authored by callum_linden's avatar callum_linden
Browse files

plugin and llceflib code for improved mouse support

parent 16e75058
No related branches found
No related tags found
No related merge requests found
...@@ -1536,11 +1536,11 @@ ...@@ -1536,11 +1536,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>706fa86b0fd7621456d4b8a6747a8c3f</string> <string>15f7db04113c492d32918ff518cddca7</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/303093/arch/Darwin/installer/llceflib-1.0.0.(CEF-OSX-3.2171.2069-32).303093-darwin-303093.tar.bz2</string> <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/303194/arch/Darwin/installer/llceflib-1.0.0.CEF-OSX-3.2171.2069-32.303194-darwin-303194.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>darwin</string> <string>darwin</string>
...@@ -1550,18 +1550,18 @@ ...@@ -1550,18 +1550,18 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>0867f50bc1292bc0f1a66f2008feab51</string> <string>c0c6e8d79001145c90a7136a1f5a3c18</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/303093/arch/CYGWIN/installer/llceflib-1.0.0.(CEF-WIN-3.2272.gbda8dc7-32).303093-windows-303093.tar.bz2</string> <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/llceflib_3p-llceflib/rev/303194/arch/CYGWIN/installer/llceflib-1.0.0.CEF-WIN-3.2272.gbda8dc7-32.303194-windows-303194.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>1.0.0.(CEF-WIN-3.2272.gbda8dc7-32).303093</string> <string>1.0.0.CEF-OSX-3.2171.2069-32.303194</string>
</map> </map>
<key>llphysicsextensions_source</key> <key>llphysicsextensions_source</key>
<map> <map>
......
...@@ -339,26 +339,35 @@ void MediaPluginCEF::receiveMessage(const char* message_string) ...@@ -339,26 +339,35 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
else if (message_name == "mouse_event") else if (message_name == "mouse_event")
{ {
std::string event = message_in.getValue("event"); std::string event = message_in.getValue("event");
//S32 button = message_in.getValueS32("button");
S32 x = message_in.getValueS32("x"); S32 x = message_in.getValueS32("x");
S32 y = message_in.getValueS32("y"); S32 y = message_in.getValueS32("y");
//std::string modifiers = message_in.getValue("modifiers"); //std::string modifiers = message_in.getValue("modifiers");
S32 button = message_in.getValueS32("button");
EMouseButton btn = MB_MOUSE_BUTTON_LEFT;
if (button == 0) btn = MB_MOUSE_BUTTON_LEFT;
if (button == 1) btn = MB_MOUSE_BUTTON_RIGHT;
if (button == 2) btn = MB_MOUSE_BUTTON_MIDDLE;
if (event == "down") if (event == "down")
{ {
mLLCEFLib->mouseButton(0, true, x, y); mLLCEFLib->mouseButton(btn, ME_MOUSE_DOWN, x, y);
mLLCEFLib->setFocus(true);
std::stringstream str; std::stringstream str;
str << "Mouse down at = " << x << ", " << y; str << "Mouse down at = " << x << ", " << y;
postDebugMessage(str.str()); postDebugMessage(str.str());
} }
else if (event == "up") else if (event == "up")
{ {
mLLCEFLib->mouseButton(0, false, x, y); mLLCEFLib->mouseButton(btn, ME_MOUSE_UP, x, y);
std::stringstream str;
str << "Mouse up at = " << x << ", " << y;
postDebugMessage(str.str());
} }
else if (event == "double_click") else if (event == "double_click")
{ {
// TODO: do we need this ?
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment