示例#1
0
/**
 * @brief Called when the node lost the focus
 */
static void UI_TextEntryFocusLost (uiNode_t *node)
{
    /* already aborted/changed with the keyboard */
    if (editedCvar == NULL)
        return;

    /* release the keyboard */
    if (isAborted || EXTRADATA(node).clickOutAbort) {
        UI_TextEntryNodeAbortEdition(node);
    } else {
        UI_TextEntryNodeValidateEdition(node);
    }
}
示例#2
0
/**
 * @brief Called when the node lost the focus
 */
void uiTextEntryNode::onFocusLost (uiNode_t* node)
{
	/* already aborted/changed with the keyboard */
	if (editedCvar == nullptr)
		return;

	/* release the keyboard */
	if (isAborted || EXTRADATA(node).clickOutAbort) {
		UI_TextEntryNodeAbortEdition(node);
	} else {
		UI_TextEntryNodeValidateEdition(node);
	}
#if SDL_VERSION_ATLEAST(2,0,0)
	SDL_StopTextInput();
#endif
}