Added the ability for focus to set the current mod config option description

This commit is contained in:
thecozies
2025-05-01 09:29:03 -05:00
parent 43811282d6
commit b99ca1ca2a
8 changed files with 84 additions and 17 deletions
+11 -1
View File
@@ -16,6 +16,13 @@ namespace recompui {
break;
}
case EventType::Focus: {
const EventFocus &event = std::get<EventFocus>(e.variant);
if (focus_callback != nullptr) {
focus_callback(event.active);
}
break;
}
default:
break;
}
@@ -48,4 +55,7 @@ namespace recompui {
text_changed_callbacks.emplace_back(callback);
}
};
void TextInput::set_focus_callback(std::function<void(bool)> callback) {
focus_callback = callback;
}
};