mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Added: copy_to_clipboard action handler
--HG-- branch : develop
This commit is contained in:
parent
9d0a2556d0
commit
5b0b92710a
1 changed files with 12 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "nel/gui/db_manager.h"
|
||||
#include "nel/gui/interface_link.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/gui/view_renderer.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace NLMISC;
|
||||
|
@ -742,4 +743,14 @@ namespace NLGUI
|
|||
};
|
||||
REGISTER_ACTION_HANDLER (CAHUnlockAllContainer, "unlock_all_container");
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
class CAHCopyToClipboard : public IActionHandler
|
||||
{
|
||||
virtual void execute (CCtrlBase *pCaller, const std::string ¶ms)
|
||||
{
|
||||
if (!CViewRenderer::getInstance()->getDriver()->copyTextToClipboard(params))
|
||||
nlwarning("Copy to clipboard failed: '%s'", params.c_str());
|
||||
}
|
||||
};
|
||||
REGISTER_ACTION_HANDLER(CAHCopyToClipboard, "copy_to_clipboard");
|
||||
}
|
Loading…
Reference in a new issue