(
ctx: &mut ScriptContext<'_, API>,
prefix: &str,
labels: &[&str],
values: &[String],
visible: bool,
)
| 809 | .unwrap_or("-"), |
| 810 | ); |
| 811 | let bitmask_row = row.is_some_and(|item| item.kind == "BitMask"); |
| 812 | let matrix_row = row.is_some_and(|item| item.kind.starts_with("Matrix(")); |
| 813 | let component_row = row.is_some_and(|item| { |
| 814 | (!item.components.is_empty() && !item.kind.starts_with("Matrix(")) |
| 815 | || item.kind == "Color" |
| 816 | }); |
| 817 | let section_row = row.is_some_and(|item| item.source == "section"); |
| 818 | let empty_row = |
| 819 | row.is_some_and(|item| item.kind == "EmptyArrayAdd" || item.kind == "EmptyObject"); |
| 820 | set_label( |
| 821 | ctx, |
| 822 | &format!("inspector_var_{idx}_type"), |
| 823 | row.map(|item| item.kind.as_str()).unwrap_or("-"), |
| 824 | ); |
| 825 | set_ui_display(ctx, &format!("inspector_var_{idx}_type"), false); |
| 826 | set_text_box( |
| 827 | ctx, |
| 828 | &format!("inspector_var_{idx}_value"), |
| 829 | row.map(|item| item.value.as_str()).unwrap_or(""), |
| 830 | ); |
| 831 | set_text_box_input_type( |
| 832 | ctx, |
| 833 | &format!("inspector_var_{idx}_value"), |
| 834 | row.map(inspector_row_input_type) |
| 835 | .unwrap_or(UiTextInputType::Any), |
| 836 | ); |
| 837 | for component in 0..4 { |
| 838 | let box_name = format!("inspector_var_{idx}_{component}_box"); |
no test coverage detected