pub struct ResourcePanel {Show 21 fields
pub resizable: [bool; 4],
pub background: BackgroundType,
pub min_size: [f32; 2],
pub max_size: Option<[f32; 2]>,
pub movable: [bool; 2],
pub scroll_length_method: [Option<ScrollLengthMethod>; 2],
pub scroll_sensitivity: f32,
pub use_smooth_scroll_delta: bool,
pub scroll_bar_display_method: ScrollBarDisplayMethod,
pub overall_layout: PanelLayout,
pub custom_layout: Vec<CustomPanelLayout>,
pub hidden: bool,
pub reverse_scroll_direction: [bool; 2],
pub inner_margin: [f32; 4],
pub scroll_length: [f32; 2],
pub scroll_progress: [f32; 2],
pub last_frame_mouse_status: Option<([f32; 2], ClickAim, [f32; 2])>,
pub scrolled: [bool; 2],
pub scroll_bar_alpha: [u8; 2],
pub resource_storage: Vec<PanelStorage>,
pub tags: Vec<[String; 2]>,
}Expand description
Resource panel for organizing and managing UI elements with scrolling capabilities.
资源板,用于组织和管理具有滚动能力的UI元素。
Fields§
§resizable: [bool; 4]Which edges can be resized: [top, bottom, left, right].
哪些边可以调整尺寸:[top, bottom, left, right]。
background: BackgroundTypeBackground display for the panel.
面板的背景显示。
min_size: [f32; 2]Minimum size constraints for the panel.
面板的最小尺寸限制。
max_size: Option<[f32; 2]>Optional maximum size constraints for the panel.
面板的可选最大尺寸限制。
movable: [bool; 2]Whether the panel can be moved: [horizontal, vertical].
面板是否可以移动:[horizontal, vertical]。
scroll_length_method: [Option<ScrollLengthMethod>; 2]Methods for calculating scroll length: [horizontal, vertical].
计算滚动长度的方法:[horizontal, vertical]。
scroll_sensitivity: f32Sensitivity of scrolling interactions.
滚动交互的敏感性。
use_smooth_scroll_delta: boolWhether to use smooth scrolling with delta values.
是否使用平滑滚动。
scroll_bar_display_method: ScrollBarDisplayMethodDisplay behavior of the scroll bar.
显示滚动条的方法。
overall_layout: PanelLayoutLayout config for resources within the panel.
面板内资源的布局配置。
custom_layout: Vec<CustomPanelLayout>Custom layout config of specific resources within the panel.
面板内特定资源的自定义布局配置。
Whether the panel is visible.
面板是否可见。
reverse_scroll_direction: [bool; 2]Reverse scroll direction: [horizontal, vertical].
反转滚动方向:[horizontal, vertical]。
inner_margin: [f32; 4]Inner margin of the panel.
面板内边距。
Use this field to ensure that functions such as resizing can be used normally.
使用此字段以保证缩放等功能可以正常使用。
scroll_length: [f32; 2]Current scroll length: [horizontal, vertical].
当前滚动长度:[horizontal, vertical]。
scroll_progress: [f32; 2]Current scroll progress: [horizontal, vertical].
当前滚动进度:[horizontal, vertical]。
last_frame_mouse_status: Option<([f32; 2], ClickAim, [f32; 2])>Mouse state from previous frame: (position, click_aim, scroll_delta).
上一帧的鼠标状态:(位置,点击目标,滚动增量)。
scrolled: [bool; 2]Whether scrolling occurred in this frame: [horizontal, vertical].
在这一帧中是否发生了滚动:[horizontal, vertical]。
scroll_bar_alpha: [u8; 2]Scroll bar transparency: [horizontal, vertical].
滚动条透明度:[horizontal, vertical]。
resource_storage: Vec<PanelStorage>Storage for resource metadata within the panel.
面板内资源元数据的存储。
Key-value pairs for categorization and metadata.
用于分类和元数据的键值对标签。
Implementations§
Source§impl ResourcePanel
impl ResourcePanel
pub fn resizable(self, top: bool, bottom: bool, left: bool, right: bool) -> Self
pub fn background(self, background: &BackgroundType) -> Self
pub fn min_size(self, width: f32, height: f32) -> Self
pub fn max_size(self, max_size: Option<[f32; 2]>) -> Self
pub fn movable(self, horizontal: bool, vertical: bool) -> Self
pub fn scroll_length_method( self, horizontal: Option<ScrollLengthMethod>, vertical: Option<ScrollLengthMethod>, ) -> Self
pub fn scroll_sensitivity(self, scroll_sensitivity: f32) -> Self
pub fn use_smooth_scroll_delta(self, use_smooth_scroll_delta: bool) -> Self
pub fn scroll_bar_display_method( self, scroll_bar_display_method: ScrollBarDisplayMethod, ) -> Self
pub fn overall_layout(self, overall_layout: PanelLayout) -> Self
pub fn push_custom_layout(self, custom_layout: CustomPanelLayout) -> Self
pub fn custom_layout(self, custom_layout: &[CustomPanelLayout]) -> Self
pub fn reverse_scroll_direction(self, horizontal: bool, vertical: bool) -> Self
pub fn inner_margin(self, top: f32, bottom: f32, left: f32, right: f32) -> Self
Trait Implementations§
Source§impl Clone for ResourcePanel
impl Clone for ResourcePanel
Source§fn clone(&self) -> ResourcePanel
fn clone(&self) -> ResourcePanel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourcePanel
impl Debug for ResourcePanel
Source§impl Default for ResourcePanel
impl Default for ResourcePanel
Source§impl PartialEq for ResourcePanel
impl PartialEq for ResourcePanel
Source§impl RustConstructorResource for ResourcePanel
impl RustConstructorResource for ResourcePanel
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Any for extract the specific type. Read moreSource§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Any for extract the specific type. Read moreSource§fn display_display_info(&self) -> Option<DisplayInfo>
fn display_display_info(&self) -> Option<DisplayInfo>
Source§fn modify_display_info(&mut self, _display_info: DisplayInfo)
fn modify_display_info(&mut self, _display_info: DisplayInfo)
impl StructuralPartialEq for ResourcePanel
Auto Trait Implementations§
impl Freeze for ResourcePanel
impl !RefUnwindSafe for ResourcePanel
impl Send for ResourcePanel
impl Sync for ResourcePanel
impl Unpin for ResourcePanel
impl UnsafeUnpin for ResourcePanel
impl !UnwindSafe for ResourcePanel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().