diff --git a/src/client/luafunctions.cpp b/src/client/luafunctions.cpp index 67ad7dfb..a3418eea 100644 --- a/src/client/luafunctions.cpp +++ b/src/client/luafunctions.cpp @@ -610,6 +610,8 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("setMaxZoomIn", &UIMap::setMaxZoomIn); g_lua.bindClassMemberFunction("setMaxZoomOut", &UIMap::setMaxZoomOut); g_lua.bindClassMemberFunction("setMultifloor", &UIMap::setMultifloor); + g_lua.bindClassMemberFunction("lockVisibleFloor", &UIMap::lockVisibleFloor); + g_lua.bindClassMemberFunction("unlockVisibleFloor", &UIMap::unlockVisibleFloor); g_lua.bindClassMemberFunction("setVisibleDimension", &UIMap::setVisibleDimension); g_lua.bindClassMemberFunction("setViewMode", &UIMap::setViewMode); g_lua.bindClassMemberFunction("setAutoViewMode", &UIMap::setAutoViewMode); diff --git a/src/client/uimap.h b/src/client/uimap.h index 244a711b..cfce5191 100644 --- a/src/client/uimap.h +++ b/src/client/uimap.h @@ -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); }