feat: add support for Voxels collider (#823)
* feat: start adding voxels support and some additional testbed demo settings * feat: add support for parry’s new Voxels collider shape * fix voxels demos * feat: support rectangular voxels and additional voxels initialization * chore: switch to parry 0.20 * chore: fix cargo doc * Fix testbed build
This commit is contained in:
@@ -439,6 +439,9 @@ fn example_settings_ui(ui_context: &mut EguiContexts, state: &mut TestbedState)
|
||||
for (name, value) in state.example_settings.iter_mut() {
|
||||
let prev_value = value.clone();
|
||||
match value {
|
||||
SettingValue::Label(value) => {
|
||||
ui.label(format!("{}: {}", name, value));
|
||||
}
|
||||
SettingValue::F32 { value, range } => {
|
||||
ui.add(Slider::new(value, range.clone()).text(name));
|
||||
}
|
||||
@@ -454,6 +457,19 @@ fn example_settings_ui(ui_context: &mut EguiContexts, state: &mut TestbedState)
|
||||
ui.add(Slider::new(value, range.clone()).text(name));
|
||||
});
|
||||
}
|
||||
SettingValue::Bool { value } => {
|
||||
ui.checkbox(value, name);
|
||||
}
|
||||
SettingValue::String { value, range } => {
|
||||
ComboBox::from_label(name)
|
||||
.width(150.0)
|
||||
.selected_text(&range[*value])
|
||||
.show_ui(ui, |ui| {
|
||||
for (id, name) in range.iter().enumerate() {
|
||||
ui.selectable_value(value, id, name);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
any_changed = any_changed || *value != prev_value;
|
||||
|
||||
Reference in New Issue
Block a user