mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[feat] add space automaticlly for remote id input box
This commit is contained in:
@@ -5,9 +5,14 @@
|
|||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
static int InputTextCallback(ImGuiInputTextCallbackData *data) {
|
static int InputTextCallback(ImGuiInputTextCallbackData *data) {
|
||||||
if (data->CursorPos == 3 || data->CursorPos == 7) {
|
if (data->BufTextLen > 3 && data->Buf[3] != ' ') {
|
||||||
data->InsertChars(data->CursorPos, " ");
|
data->InsertChars(3, " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data->BufTextLen > 7 && data->Buf[7] != ' ') {
|
||||||
|
data->InsertChars(7, " ");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user