using std to handle u32s

This commit is contained in:
Jack Spira 2021-09-07 15:28:44 -07:00
parent f011d9e337
commit e17dc259c1

View File

@ -404,7 +404,7 @@ extern "C" fn callback(data: *mut sys::ImGuiInputTextCallbackData) -> c_int {
}
}
InputTextFlags::CALLBACK_CHAR_FILTER => {
let chr = unsafe { char::from_u32((*data).EventChar).unwrap() };
let chr = unsafe { std::char::from_u32((*data).EventChar).unwrap() };
let new_data = match callback_data.user_data.cback_handler.char_filter(chr) {
Some(value) => u32::from(value),
// 0 means "do not use this char" in imgui docs