Struct ExtraTextDisplayData

Source
#[repr(C)]
pub struct ExtraTextDisplayData { pub __base: BSExtraData, pub display_name: BSFixedString, pub display_name_text: *mut BGSMessage, pub owner_quest: *mut TESQuest, pub owner_instance: DisplayDataType, pub temper_factor: f32, pub custom_name_length: u16, pub pad32: u16, pub pad34: u32, }

Fields§

§__base: BSExtraData

Base class BSExtraData.

§display_name: BSFixedString

Display name string. Offset: 0x10

§display_name_text: *mut BGSMessage

Pointer to a BGSMessage. Offset: 0x18

§owner_quest: *mut TESQuest

Pointer to the owner quest. Offset: 0x20

§owner_instance: DisplayDataType

Display data type. Offset: 0x28

§temper_factor: f32

Temper factor. Offset: 0x2C

§custom_name_length: u16

Length of the custom name. Offset: 0x30

§pad32: u16

Padding for alignment. Offset: 0x32

§pad34: u32

Padding for alignment. Offset: 0x34

Implementations§

Source§

impl ExtraTextDisplayData

Source

pub const RTTI: VariantID = RTTI_ExtraTextDisplayData

Address & offset of the runtime type information (RTTI) identifier.

Source

pub const VTABLE: [VariantID; 1] = VTABLE_ExtraTextDisplayData

Address & offset of the virtual function table.

Source

pub const EXTRA_DATA_TYPE: ExtraDataType = ExtraDataType::TextDisplayData

The ExtraDataType value for text display data.

Source

pub const fn new() -> Self

Creates a new ExtraTextDisplayData instance with default values.

Source

pub fn from_name(name: &CStr) -> Self

Creates a new ExtraTextDisplayData instance with a specified name.

Source

pub unsafe fn from_form(form: *mut TESBoundObject, temper_factor: f32) -> Self

Creates a new ExtraTextDisplayData with a form and temper factor.

§Safety

form is a valid ptr.

Source

pub const fn get_type(&self) -> ExtraDataType

Gets the extra data type, always returning ExtraDataType::TextDisplayData.

Source

pub unsafe fn get_display_name( &mut self, form: *const TESBoundObject, temper_factor: c_float, ) -> *const c_char

Gets the display name based on the form and temper factor.

  • lifetime: 'a form -> 'a c_char
Source

pub fn is_player_set(&self) -> bool

Checks if the display data is player-set.

Source

pub fn set_name(&mut self, name: &CStr)

Sets the display name.

Trait Implementations§

Source§

impl Debug for ExtraTextDisplayData

Source§

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

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

impl Default for ExtraTextDisplayData

Source§

fn default() -> Self

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

impl DerivedBSExtraData for ExtraTextDisplayData

Source§

fn get_extra_data(&self) -> &BSExtraData

Type used for downcast-ing availability and linked list search.
Source§

fn get_extra_data_type() -> ExtraDataType

Function for testing whether BSExtraData is really inherited. It will not be called in practice.
Source§

impl PartialEq for ExtraTextDisplayData

Source§

fn eq(&self, other: &ExtraTextDisplayData) -> 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 StructuralPartialEq for ExtraTextDisplayData

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> 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> Same for T

Source§

type Output = T

Should always be Self
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