本文整理汇总了C++中idEditField::ClearAutoComplete方法的典型用法代码示例。如果您正苦于以下问题:C++ idEditField::ClearAutoComplete方法的具体用法?C++ idEditField::ClearAutoComplete怎么用?C++ idEditField::ClearAutoComplete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idEditField
的用法示例。
在下文中一共展示了idEditField::ClearAutoComplete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*
==============
ProcessEvent
==============
*/
bool idConsoleLocal::ProcessEvent( const sysEvent_t* event, bool forceAccept )
{
const bool consoleKey = event->evType == SE_KEY && event->evValue == K_GRAVE && com_allowConsole.GetBool();
// we always catch the console key event
if( !forceAccept && consoleKey )
{
// ignore up events
if( event->evValue2 == 0 )
{
return true;
}
consoleField.ClearAutoComplete();
// a down event will toggle the destination lines
if( keyCatching )
{
Close();
Sys_GrabMouseCursor( true );
}
else
{
consoleField.Clear();
keyCatching = true;
if( idKeyInput::IsDown( K_LSHIFT ) || idKeyInput::IsDown( K_RSHIFT ) )
{
// if the shift key is down, don't open the console as much
SetDisplayFraction( 0.2f );
}
else
{
SetDisplayFraction( 0.5f );
}
}
return true;
}
// if we aren't key catching, dump all the other events
if( !forceAccept && !keyCatching )
{
return false;
}
// handle key and character events
if( event->evType == SE_CHAR )
{
// never send the console key as a character
if( event->evValue != '`' && event->evValue != '~' )
{
consoleField.CharEvent( event->evValue );
}
return true;
}
if( event->evType == SE_KEY )
{
// ignore up key events
if( event->evValue2 == 0 )
{
return true;
}
KeyDownEvent( event->evValue );
return true;
}
// we don't handle things like mouse, joystick, and network packets
return false;
}