pub struct ResourcePanel {Show 25 fields
pub discern_type: String,
pub name: String,
pub active: bool,
pub size: [f32; 2],
pub position: [f32; 2],
pub origin_position: [f32; 2],
pub origin_size: [f32; 2],
pub x_location_grid: [u32; 2],
pub y_location_grid: [u32; 2],
pub x_size_grid: [u32; 2],
pub y_size_grid: [u32; 2],
pub center_display: (HorizontalAlign, VerticalAlign),
pub offset: [f32; 2],
pub resizable: [bool; 4],
pub display_rect: Option<CustomRectConfig>,
pub last_frame_mouse_status: Option<([f32; 2], ClickAim, [f32; 2])>,
pub min_size: [f32; 2],
pub max_size: Option<[f32; 2]>,
pub movable: [bool; 2],
pub scroll_length_method: [Option<ScrollLengthMethod>; 2],
pub scroll_length: [f32; 2],
pub scroll_progress: [f32; 2],
pub scroll_sensitivity: f32,
pub use_smooth_scroll_delta: bool,
pub last_frame_scroll_progress: [f32; 2],
}Expand description
RC的资源板。
Fields§
§discern_type: String§name: String§active: bool§size: [f32; 2]尺寸。
position: [f32; 2]位置。
origin_position: [f32; 2]原始位置。
origin_size: [f32; 2]原始尺寸。
x_location_grid: [u32; 2]x轴的网格式定位。
y_location_grid: [u32; 2]y轴的网格式定位。
x_size_grid: [u32; 2]x轴的网格式缩放。
y_size_grid: [u32; 2]y轴的网格式缩放。
center_display: (HorizontalAlign, VerticalAlign)居中显示方法。
offset: [f32; 2]偏移量。
resizable: [bool; 4]是否可通过拖拽更改尺寸。
display_rect: Option<CustomRectConfig>是否在资源底部显示方框。
last_frame_mouse_status: Option<([f32; 2], ClickAim, [f32; 2])>是否按下鼠标与按下后鼠标状态。
min_size: [f32; 2]最小尺寸。
max_size: Option<[f32; 2]>最大尺寸(可选)。
movable: [bool; 2]允许拖动资源板。
scroll_length_method: [Option<ScrollLengthMethod>; 2]滚动长度计算方法(不需要滚动留空即可)。
scroll_length: [f32; 2]滚动长度。
scroll_progress: [f32; 2]滚动进度。
scroll_sensitivity: f32滚动敏感度。
use_smooth_scroll_delta: bool是否使用平滑滚动。
last_frame_scroll_progress: [f32; 2]上一帧的滚动进度。
Implementations§
Source§impl ResourcePanel
impl ResourcePanel
pub fn from_position_config(self, position_config: PositionConfig) -> Self
pub fn name(self, name: &str) -> Self
pub fn origin_position(self, x: f32, y: f32) -> Self
pub fn origin_size(self, width: f32, height: f32) -> Self
pub fn x_location_grid(self, fetch: u32, total: u32) -> Self
pub fn y_location_grid(self, fetch: u32, total: u32) -> Self
pub fn x_size_grid(self, fetch: u32, total: u32) -> Self
pub fn y_size_grid(self, fetch: u32, total: u32) -> Self
pub fn center_display( self, horizontal_align: HorizontalAlign, vertical_align: VerticalAlign, ) -> Self
pub fn offset(self, x: f32, y: f32) -> Self
pub fn resizable(self, top: bool, bottom: bool, left: bool, right: bool) -> Self
pub fn display_rect(self, display_rect: Option<CustomRectConfig>) -> 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
Trait Implementations§
Source§impl Clone for ResourcePanel
impl Clone for ResourcePanel
Source§fn clone(&self) -> ResourcePanel
fn clone(&self) -> ResourcePanel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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 PartialOrd for ResourcePanel
impl PartialOrd for ResourcePanel
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 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
Mutably borrows from an owned value. Read more
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>
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 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>
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 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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().