Changeset View
Changeset View
Standalone View
Standalone View
source/gui/Scripting/JSInterface_GUIProxy.cpp
Show All 16 Lines | |||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include "JSInterface_GUIProxy_impl.h" | #include "JSInterface_GUIProxy_impl.h" | ||||
#include "gui/ObjectBases/IGUIObject.h" | #include "gui/ObjectBases/IGUIObject.h" | ||||
#include "gui/ObjectTypes/CButton.h" | #include "gui/ObjectTypes/CButton.h" | ||||
#include "gui/ObjectTypes/CList.h" | #include "gui/ObjectTypes/CList.h" | ||||
#include "gui/ObjectTypes/CMiniMap.h" | |||||
#include "gui/ObjectTypes/CText.h" | #include "gui/ObjectTypes/CText.h" | ||||
// Called for every specialization - adds the common interface. | // Called for every specialization - adds the common interface. | ||||
template<> | template<> | ||||
void JSI_GUIProxy<IGUIObject>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache) | void JSI_GUIProxy<IGUIObject>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache) | ||||
{ | { | ||||
CreateFunction<&IGUIObject::GetName>(rq, cache, "toString"); | CreateFunction<&IGUIObject::GetName>(rq, cache, "toString"); | ||||
CreateFunction<&IGUIObject::GetName>(rq, cache, "toSource"); | CreateFunction<&IGUIObject::GetName>(rq, cache, "toSource"); | ||||
Show All 20 Lines | |||||
DECLARE_GUIPROXY(CText); | DECLARE_GUIPROXY(CText); | ||||
// CList | // CList | ||||
template<> void JSI_GUIProxy<CList>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache) | template<> void JSI_GUIProxy<CList>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache) | ||||
{ | { | ||||
CreateFunction<static_cast<void(CList::*)(const CGUIString&)>(&CList::AddItem)>(rq, cache, "addItem"); | CreateFunction<static_cast<void(CList::*)(const CGUIString&)>(&CList::AddItem)>(rq, cache, "addItem"); | ||||
} | } | ||||
DECLARE_GUIPROXY(CList); | DECLARE_GUIPROXY(CList); | ||||
// CMiniMap | |||||
template<> void JSI_GUIProxy<CMiniMap>::CreateFunctions(const ScriptRequest& rq, GUIProxyProps* cache) | |||||
{ | |||||
CreateFunction<&CMiniMap::Flare>(rq, cache, "flare"); | |||||
} | |||||
DECLARE_GUIPROXY(CMiniMap); |
Wildfire Games · Phabricator