Added font picker to text edit gui

This commit is contained in:
Yousef Khadadeh 2025-11-08 20:50:23 +03:00
parent 644655544c
commit d4492807fe
10 changed files with 243 additions and 25 deletions

View file

@ -32,7 +32,7 @@ template <typename T> class TextBox : public Element {
if(data && selection.selected) {
io.richTextBoxEdit(textbox, cur);
textbox->process_mouse_left_button(*cur, io.mouse.pos - bb.min, io.mouse.leftClick, io.mouse.leftHeld, io.key.leftShift);
if(updateEveryEdit || io.key.enter) {
if((updateEveryEdit && textbox->inputChangedTextBox) || io.key.enter) {
update_on_edit();
isUpdating = true;
}
@ -48,6 +48,9 @@ template <typename T> class TextBox : public Element {
elemUpdate(selection);
}
if(textbox)
textbox->inputChangedTextBox = false;
return isUpdating;
}