[glass] Save input after clicking away (#6657)

This commit is contained in:
Wispy
2024-05-25 11:19:52 -05:00
committed by GitHub
parent 4252a36668
commit e2545231b8
2 changed files with 5 additions and 3 deletions

View File

@@ -257,8 +257,9 @@ bool InputExpr(const char* label, V* v, const char* format,
#endif
}
bool changed = ImGui::InputText(label, inputBuffer, kBufferSize, flags);
ImGui::InputText(label, inputBuffer, kBufferSize, flags);
bool active = ImGui::IsItemActive();
bool changed = ImGui::IsItemDeactivatedAfterEdit();
if (active || changed) {
InputExprState& state = exprStates[id];