wgui: components base, anyhow event listener callbacks, 📦📎-fixes, typo fixes

This commit is contained in:
Aleksander
2025-08-13 17:10:00 +02:00
parent 93a3fee349
commit a79ed0839b
23 changed files with 104 additions and 72 deletions

View File

@@ -33,12 +33,13 @@ fn button_click_callback(
Translation::from_raw_text(text),
);
// FIXME: remove unwrap
button.try_cast::<ComponentButton>().unwrap().set_text(
button.try_cast::<ComponentButton>()?.set_text(
e.state,
e.alterables,
Translation::from_raw_text("this button has been clicked"),
);
Ok(())
})
}
@@ -70,6 +71,7 @@ impl TestbedGeneric {
e.alterables,
Translation::from_raw_text("congrats!"),
);
Ok(())
}));
let button_red = state.fetch_component_as::<ComponentButton>("button_red")?;