Skip to main content

ResourcePanel

Struct ResourcePanel 

Source
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: BackgroundType

Background 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: f32

Sensitivity of scrolling interactions.

滚动交互的敏感性。

§use_smooth_scroll_delta: bool

Whether to use smooth scrolling with delta values.

是否使用平滑滚动。

§scroll_bar_display_method: ScrollBarDisplayMethod

Display behavior of the scroll bar.

显示滚动条的方法。

§overall_layout: PanelLayout

Layout config for resources within the panel.

面板内资源的布局配置。

§custom_layout: Vec<CustomPanelLayout>

Custom layout config of specific resources within the panel.

面板内特定资源的自定义布局配置。

§hidden: bool

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.

面板内资源元数据的存储。

§tags: Vec<[String; 2]>

Key-value pairs for categorization and metadata.

用于分类和元数据的键值对标签。

Implementations§

Source§

impl ResourcePanel

Source

pub fn resizable(self, top: bool, bottom: bool, left: bool, right: bool) -> Self

Source

pub fn background(self, background: &BackgroundType) -> Self

Source

pub fn min_size(self, width: f32, height: f32) -> Self

Source

pub fn max_size(self, max_size: Option<[f32; 2]>) -> Self

Source

pub fn movable(self, horizontal: bool, vertical: bool) -> Self

Source

pub fn scroll_length_method( self, horizontal: Option<ScrollLengthMethod>, vertical: Option<ScrollLengthMethod>, ) -> Self

Source

pub fn scroll_sensitivity(self, scroll_sensitivity: f32) -> Self

Source

pub fn use_smooth_scroll_delta(self, use_smooth_scroll_delta: bool) -> Self

Source

pub fn scroll_bar_display_method( self, scroll_bar_display_method: ScrollBarDisplayMethod, ) -> Self

Source

pub fn overall_layout(self, overall_layout: PanelLayout) -> Self

Source

pub fn push_custom_layout(self, custom_layout: CustomPanelLayout) -> Self

Source

pub fn custom_layout(self, custom_layout: &[CustomPanelLayout]) -> Self

Source

pub fn hidden(self, hidden: bool) -> Self

Source

pub fn reverse_scroll_direction(self, horizontal: bool, vertical: bool) -> Self

Source

pub fn inner_margin(self, top: f32, bottom: f32, left: f32, right: f32) -> Self

Source

pub fn tags(self, tags: &[[String; 2]], replace: bool) -> Self

Trait Implementations§

Source§

impl Clone for ResourcePanel

Source§

fn clone(&self) -> ResourcePanel

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResourcePanel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ResourcePanel

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ResourcePanel

Source§

fn eq(&self, other: &ResourcePanel) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl RustConstructorResource for ResourcePanel

Source§

fn as_any(&self) -> &dyn Any

Returns a reference to the resource as Any for extract the specific type. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Returns a mutable reference to the resource as Any for extract the specific type. Read more
Source§

fn display_display_info(&self) -> Option<DisplayInfo>

Retrieves the display info field for this resource. Read more
Source§

fn modify_display_info(&mut self, _display_info: DisplayInfo)

Updates the display info field for this resource. Read more
Source§

fn display_tags(&self) -> Vec<[String; 2]>

Returns all tags associated with this resource. Read more
Source§

fn modify_tags(&mut self, tags: &[[String; 2]], replace: bool)

Updates the tags for this resource. Read more
Source§

impl StructuralPartialEq for ResourcePanel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,