mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Implement ctrl-u in lineinput to clear
This commit is contained in:
parent
3252261b68
commit
bd3656f6ad
|
@ -264,6 +264,23 @@ int CMenus::DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrS
|
|||
Input()->SetClipboardText(pStr);
|
||||
}
|
||||
|
||||
/* TODO: Doesn't work, SetClipboardText doesn't retain the string quickly enough?
|
||||
if(Input()->KeyIsPressed(KEY_LCTRL) && Input()->KeyPress(KEY_X))
|
||||
{
|
||||
Input()->SetClipboardText(pStr);
|
||||
pStr[0] = '\0';
|
||||
s_AtIndex = 0;
|
||||
ReturnValue = true;
|
||||
}
|
||||
*/
|
||||
|
||||
if(Input()->KeyIsPressed(KEY_LCTRL) && Input()->KeyPress(KEY_U))
|
||||
{
|
||||
pStr[0] = '\0';
|
||||
s_AtIndex = 0;
|
||||
ReturnValue = true;
|
||||
}
|
||||
|
||||
if(Inside && UI()->MouseButton(0))
|
||||
{
|
||||
s_DoScroll = true;
|
||||
|
|
Loading…
Reference in a new issue