re_component_ui 0.31.1

Provides ui editors for Rerun component data for registration with the Rerun Viewer component ui registry.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use re_ui::UiLayout;
use re_ui::syntax_highlighting::SyntaxHighlightedBuilder;
use re_viewer_context::{MaybeMutRef, StoreViewContext};

pub fn edit_or_view_image_format(
    _ctx: &StoreViewContext<'_>,
    ui: &mut egui::Ui,
    format: &mut MaybeMutRef<'_, re_sdk_types::components::ImageFormat>,
) -> egui::Response {
    // TODO(#7100): need a ui for editing this!
    UiLayout::List.data_label(
        ui,
        SyntaxHighlightedBuilder::new().with_identifier(&format.as_ref().to_string()),
    )
}