Game launcher (wip), wgui refactor

[skip ci]
This commit is contained in:
Aleksander
2025-12-26 23:22:17 +01:00
parent e0c51492b8
commit d70b51184c
16 changed files with 379 additions and 93 deletions

View File

@@ -51,7 +51,7 @@ fn button_click_callback(
) -> ButtonClickCallback {
Box::new(move |common, _e| {
label
.get_as_mut::<WidgetLabel>()
.get_as::<WidgetLabel>()
.unwrap()
.set_text(common, Translation::from_raw_text(text));
@@ -161,7 +161,7 @@ impl TestbedGeneric {
let cb_first = state.fetch_component_as::<ComponentCheckbox>("cb_first")?;
let label = label_cur_option.widget.clone();
cb_first.on_toggle(Box::new(move |common, e| {
let mut widget = label.get_as_mut::<WidgetLabel>().unwrap();
let mut widget = label.get_as::<WidgetLabel>().unwrap();
let text = format!("checkbox toggle: {}", e.checked);
widget.set_text(common, Translation::from_raw_text(&text));
Ok(())