parent
251d7b146a
commit
8c8995dbf0
@ -1378,7 +1378,7 @@ static bool doEditing(int key)
|
|||||||
if (key == '.' && !is_editing)
|
if (key == '.' && !is_editing)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((key >= '0' && key <= '9') || key == '.' || key == '-')
|
if ((key >= '0' && key <= '9') || key == '.' || key == '-' || key == EMGUI_KEY_BACKSPACE)
|
||||||
{
|
{
|
||||||
if (!is_editing)
|
if (!is_editing)
|
||||||
{
|
{
|
||||||
@ -1386,7 +1386,11 @@ static bool doEditing(int key)
|
|||||||
is_editing = true;
|
is_editing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (key == EMGUI_KEY_BACKSPACE)
|
||||||
|
s_editBuffer[emaxi(strlen(s_editBuffer) - 1, 0)] = 0;
|
||||||
|
else
|
||||||
s_editBuffer[strlen(s_editBuffer)] = (char)key;
|
s_editBuffer[strlen(s_editBuffer)] = (char)key;
|
||||||
|
|
||||||
s_editorData.trackData.editText = s_editBuffer;
|
s_editorData.trackData.editText = s_editBuffer;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user