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
16
use re_sdk_types::components::ViewCoordinates;
use re_ui::syntax_highlighting::SyntaxHighlightedBuilder;
use re_viewer_context::{MaybeMutRef, StoreViewContext, UiLayout};

pub fn edit_or_view_view_coordinates(
    _ctx: &StoreViewContext<'_>,
    ui: &mut egui::Ui,
    value: &mut MaybeMutRef<'_, ViewCoordinates>,
) -> egui::Response {
    // TODO(#6743): Don't allow editing view coordinates for now.
    // Its overrides are likely not always correctly queried.
    UiLayout::List.data_label(
        ui,
        SyntaxHighlightedBuilder::new().with_body(&value.as_ref().describe()),
    )
}