RepeatedGridTrack

RepeatedGridTrack

  • repetition : bevy_ui::ui_node::GridTrackRepetition
  • tracks : smallvec::SmallVec<[bevy_ui::ui_node::GridTrack; 1]>

Description

Represents a possibly repeated [GridTrack].

The repetition parameter can either be:

  • The integer 1, in which case the track is non-repeated.
  • a u16 count to repeat the track N times.
  • A GridTrackRepetition::AutoFit or GridTrackRepetition::AutoFill.

Note: that in the common case you want a non-repeating track (repetition count 1), you may use the constructor methods on [GridTrack] to create a RepeatedGridTrack. i.e. GridTrack::px(10.0) is equivalent to RepeatedGridTrack::px(1, 10.0).

You may only use one auto-repetition per track list. And if your track list contains an auto repetition then all tracks (in and outside of the repetition) must be fixed size (px or percent). Integer repetitions are just shorthand for writing out N tracks longhand and are not subject to the same limitations.

Functions