Renamed scroll_offset to scroll_position

This commit is contained in:
ickshonpe 2025-07-11 22:10:51 +01:00
parent 53854974c2
commit ce9d878b52
2 changed files with 4 additions and 4 deletions

View File

@ -333,7 +333,7 @@ with UI components as a child of an entity without UI components, your UI layout
let physical_scroll_position = clamped_scroll_position.floor(); let physical_scroll_position = clamped_scroll_position.floor();
node.bypass_change_detection().scroll_offset = physical_scroll_position; node.bypass_change_detection().scroll_position = physical_scroll_position;
for child_uinode in ui_children.iter_ui_children(entity) { for child_uinode in ui_children.iter_ui_children(entity) {
update_uinode_geometry_recursive( update_uinode_geometry_recursive(

View File

@ -46,10 +46,10 @@ pub struct ComputedNode {
/// ///
/// Automatically calculated by [`super::layout::ui_layout_system`]. /// Automatically calculated by [`super::layout::ui_layout_system`].
pub scrollbar_size: Vec2, pub scrollbar_size: Vec2,
/// Offset of scrolled content /// Resolved offset of scrolled content
/// ///
/// Automatically calculated by [`super::layout::ui_layout_system`]. /// Automatically calculated by [`super::layout::ui_layout_system`].
pub scroll_offset: Vec2, pub scroll_position: Vec2,
/// The width of this node's outline. /// The width of this node's outline.
/// If this value is `Auto`, negative or `0.` then no outline will be rendered. /// If this value is `Auto`, negative or `0.` then no outline will be rendered.
/// Outline updates bypass change detection. /// Outline updates bypass change detection.
@ -314,7 +314,7 @@ impl ComputedNode {
size: Vec2::ZERO, size: Vec2::ZERO,
content_size: Vec2::ZERO, content_size: Vec2::ZERO,
scrollbar_size: Vec2::ZERO, scrollbar_size: Vec2::ZERO,
scroll_offset: Vec2::ZERO, scroll_position: Vec2::ZERO,
outline_width: 0., outline_width: 0.,
outline_offset: 0., outline_offset: 0.,
unrounded_size: Vec2::ZERO, unrounded_size: Vec2::ZERO,