ezEngine  Release 25.03
ezMsgSetColor Struct Reference

A message to modify the main color of some thing. More...

#include <SetColorMessage.h>

Inheritance diagram for ezMsgSetColor:

Public Member Functions

 EZ_DECLARE_MESSAGE_TYPE (ezMsgSetColor, ezMessage)
 
void ModifyColor (ezColor &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
void ModifyColor (ezColorGammaUB &ref_color) const
 Applies m_Color using m_Mode to the given color.
 
virtual void Serialize (ezStreamWriter &inout_stream) const override
 Implement this for efficient transmission across process boundaries (e.g. network transfer etc.) More...
 
virtual void Deserialize (ezStreamReader &inout_stream, ezUInt8 uiTypeVersion) override
 
- Public Member Functions inherited from ezMessage
virtual ezInt32 GetSortingKey () const
 Derived message types can override this method to influence sorting order. Smaller keys are processed first.
 
EZ_ALWAYS_INLINE ezMessageId GetId () const
 Returns the id for this message type.
 
EZ_ALWAYS_INLINE ezUInt16 GetSize () const
 Returns the size in byte of this message.
 
EZ_ALWAYS_INLINE ezUInt64 GetHash () const
 Calculates a hash of the message.
 
- Public Member Functions inherited from ezReflectedClass
virtual const ezRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const ezRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T >
EZ_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

ezColor m_Color
 The color to apply to the target.
 
ezEnum< ezSetColorModem_Mode
 The mode with which to apply the color to the target.
 

Additional Inherited Members

- Static Public Member Functions inherited from ezMessage
static void PackageForTransfer (const ezMessage &msg, ezStreamWriter &inout_stream)
 Writes msg to stream in such a way that ReplicatePackedMessage() can restore it even in another process. More...
 
static ezUniquePtr< ezMessageReplicatePackedMessage (ezStreamReader &inout_stream)
 Restores a message that was written by PackageForTransfer() More...
 
- Static Public Member Functions inherited from ezNoBase
static const ezRTTIGetStaticRTTI ()
 
- Protected Member Functions inherited from ezMessage
 ezMessage (size_t messageSize)
 
- Static Protected Member Functions inherited from ezMessage
static EZ_ALWAYS_INLINE ezMessageId GetNextMsgId ()
 
- Protected Attributes inherited from ezMessage
ezMessageId m_Id
 
ezUInt16 m_uiSize
 
- Static Protected Attributes inherited from ezMessage
static ezMessageId s_NextMsgId = 0
 

Detailed Description

A message to modify the main color of some thing.

Components that handle this message use it to change their main color. For instance a light component may change its light color, a mesh component will change the main mesh color.

Member Function Documentation

◆ Deserialize()

void ezMsgSetColor::Deserialize ( ezStreamReader inout_stream,
ezUInt8  uiTypeVersion 
)
overridevirtual
See also
Serialize()

Reimplemented from ezMessage.

◆ Serialize()

void ezMsgSetColor::Serialize ( ezStreamWriter inout_stream) const
overridevirtual

Implement this for efficient transmission across process boundaries (e.g. network transfer etc.)

If the message is only ever sent within the same process between nodes of the same ezWorld, this does not need to be implemented.

Note that PackageForTransfer() will automatically include the ezRTTI type version into the stream and ReplicatePackedMessage() will pass this into Deserialize(). Use this if the serialization changes.

Reimplemented from ezMessage.


The documentation for this struct was generated from the following files: