From 2607db5b51174f3c5ffab1c90ef7f2b009c9281b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Thu, 27 Dec 2018 09:02:07 +0200 Subject: [PATCH] Added: CGroupHTML::clearUndoRedo() lua function --HG-- branch : develop --- code/nel/include/nel/gui/group_html.h | 2 ++ code/nel/src/gui/group_html.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/code/nel/include/nel/gui/group_html.h b/code/nel/include/nel/gui/group_html.h index 62d8fb1a0..dfd80dba9 100644 --- a/code/nel/include/nel/gui/group_html.h +++ b/code/nel/include/nel/gui/group_html.h @@ -270,6 +270,7 @@ namespace NLGUI void setURL(const std::string &url); + int luaClearUndoRedo(CLuaState &ls); int luaBrowse(CLuaState &ls); int luaRefresh(CLuaState &ls); int luaRemoveContent(CLuaState &ls); @@ -285,6 +286,7 @@ namespace NLGUI REFLECT_EXPORT_START(CGroupHTML, CGroupScrollText) REFLECT_LUA_METHOD("browse", luaBrowse) REFLECT_LUA_METHOD("refresh", luaRefresh) + REFLECT_LUA_METHOD("clearUndoRedo", luaClearUndoRedo) REFLECT_LUA_METHOD("removeContent", luaRemoveContent) REFLECT_LUA_METHOD("insertText", luaInsertText) REFLECT_LUA_METHOD("addString", luaAddString) diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index ce9a8489d..032ffb666 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -5912,6 +5912,15 @@ namespace NLGUI return true; } + int CGroupHTML::luaClearUndoRedo(CLuaState &ls) + { + const char *funcName = "clearUndoRedo"; + CLuaIHM::checkArgCount(ls, funcName, 0); + + clearUndoRedo(); + return 0; + } + // *************************************************************************** int CGroupHTML::luaBrowse(CLuaState &ls) {