Changeset View
Changeset View
Standalone View
Standalone View
source/gui/MiniMap.cpp
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
JSContext* cx = g_GUI->GetActiveGUI()->GetScriptInterface()->GetContext(); | JSContext* cx = g_GUI->GetActiveGUI()->GetScriptInterface()->GetContext(); | ||||
JSAutoRequest rq(cx); | JSAutoRequest rq(cx); | ||||
float x, z; | float x, z; | ||||
GetMouseWorldCoordinates(x, z); | GetMouseWorldCoordinates(x, z); | ||||
JS::RootedValue coords(cx); | JS::RootedValue coords(cx); | ||||
g_GUI->GetActiveGUI()->GetScriptInterface()->CreateObject(&coords, "x", x, "z", z); | ScriptInterface::CreateObject(cx, &coords, "x", x, "z", z); | ||||
JS::AutoValueVector paramData(cx); | JS::AutoValueVector paramData(cx); | ||||
paramData.append(coords); | paramData.append(coords); | ||||
ScriptEvent("worldclick", paramData); | ScriptEvent("worldclick", paramData); | ||||
} | } | ||||
// This sets up and draws the rectangle on the minimap | // This sets up and draws the rectangle on the minimap | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator