Bind {un,}lockVisibleFloor to lua

This commit is contained in:
Ahmed Samy 2013-12-09 20:15:39 +02:00
parent 2498129ff3
commit ed24a0735a
2 changed files with 4 additions and 0 deletions

View File

@ -610,6 +610,8 @@ void Client::registerLuaFunctions()
g_lua.bindClassMemberFunction<UIMap>("setMaxZoomIn", &UIMap::setMaxZoomIn);
g_lua.bindClassMemberFunction<UIMap>("setMaxZoomOut", &UIMap::setMaxZoomOut);
g_lua.bindClassMemberFunction<UIMap>("setMultifloor", &UIMap::setMultifloor);
g_lua.bindClassMemberFunction<UIMap>("lockVisibleFloor", &UIMap::lockVisibleFloor);
g_lua.bindClassMemberFunction<UIMap>("unlockVisibleFloor", &UIMap::unlockVisibleFloor);
g_lua.bindClassMemberFunction<UIMap>("setVisibleDimension", &UIMap::setVisibleDimension);
g_lua.bindClassMemberFunction<UIMap>("setViewMode", &UIMap::setViewMode);
g_lua.bindClassMemberFunction<UIMap>("setAutoViewMode", &UIMap::setAutoViewMode);

View File

@ -47,6 +47,8 @@ public:
void setMaxZoomIn(int maxZoomIn) { m_maxZoomIn = maxZoomIn; }
void setMaxZoomOut(int maxZoomOut) { m_maxZoomOut = maxZoomOut; }
void setMultifloor(bool enable) { m_mapView->setMultifloor(enable); }
void lockVisibleFloor(int floor) { m_mapView->lockFirstVisibleFloor(floor); }
void unlockVisibleFloor() { m_mapView->unlockFirstVisibleFloor(); }
void setVisibleDimension(const Size& visibleDimension);
void setViewMode(MapView::ViewMode viewMode) { m_mapView->setViewMode(viewMode); }
void setAutoViewMode(bool enable) { m_mapView->setAutoViewMode(enable); }