update util/luigi.h

This commit is contained in:
nakst 2021-08-13 22:34:56 +01:00
parent f9ebd743cc
commit 7a9b3da442
1 changed files with 6 additions and 0 deletions

View File

@ -353,6 +353,10 @@ typedef struct UIWindow {
int cursorX, cursorY;
int cursorStyle;
// Set when a textbox is modified.
// Useful for tracking whether changes to the loaded document have been saved.
bool textboxModifiedFlag;
bool ctrl, shift, alt;
UIRectangle updateRegion;
@ -2681,6 +2685,8 @@ void UITextboxReplace(UITextbox *textbox, const char *text, ptrdiff_t bytes, boo
if (sendChangedMessage) {
UIElementMessage(&textbox->e, UI_MSG_VALUE_CHANGED, 0, 0);
}
textbox->e.window->textboxModifiedFlag = true;
}
void UITextboxClear(UITextbox *textbox, bool sendChangedMessage) {