Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cocos/base/CCIMEDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ const std::string& IMEDispatcher::getContentText()
return STD_STRING_EMPTY;
}

bool IMEDispatcher::isAnyDelegateAttachedWithIME() const
{
if (!_impl)
return false;
return _impl->_delegateWithIme != nullptr;
}

//////////////////////////////////////////////////////////////////////////
// dispatch keyboard message
//////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions cocos/base/CCIMEDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ class CC_DLL IMEDispatcher
* @lua NA
*/
const std::string& getContentText();

/**
*@brief Returns if any delegate is attached with IME.
*/
bool isAnyDelegateAttachedWithIME() const;

//////////////////////////////////////////////////////////////////////////
// dispatch keyboard notification
Expand Down