Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectBases/IGUIObject.cpp
Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | float IGUIObject::GetBufferedZ() const | ||||
// but we'll accept it so that absolute can be used as default without a complaint. | // but we'll accept it so that absolute can be used as default without a complaint. | ||||
// Also, you could consider those objects children to the screen resolution. | // Also, you could consider those objects children to the screen resolution. | ||||
return m_Z; | return m_Z; | ||||
} | } | ||||
void IGUIObject::RegisterScriptHandler(const CStr& eventName, const CStr& Code, CGUI& pGUI) | void IGUIObject::RegisterScriptHandler(const CStr& eventName, const CStr& Code, CGUI& pGUI) | ||||
{ | { | ||||
ScriptInterface::Request rq(pGUI.GetScriptInterface()); | ScriptInterface::Request rq(pGUI.GetScriptInterface()); | ||||
JS::RootedValue globalVal(rq.cx, pGUI.GetGlobalObject()); | |||||
JS::RootedObject globalObj(rq.cx, &globalVal.toObject()); | |||||
const int paramCount = 1; | const int paramCount = 1; | ||||
const char* paramNames[paramCount] = { "mouse" }; | const char* paramNames[paramCount] = { "mouse" }; | ||||
// Location to report errors from | // Location to report errors from | ||||
CStr CodeName = GetName() + " " + eventName; | CStr CodeName = GetName() + " " + eventName; | ||||
// Generate a unique name | // Generate a unique name | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator