Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ICmpSelectable Class Referenceabstract

#include <ICmpSelectable.h>

Inheritance diagram for ICmpSelectable:
Collaboration diagram for ICmpSelectable:

Public Member Functions

virtual bool IsEditorOnly () const =0
 Returns true if the entity is only selectable in Atlas editor, e.g. More...
 
virtual void SetSelectionHighlight (const CColor &color, bool selected)=0
 Sets the selection highlight state. More...
 
virtual void SetVisibility (bool visible)=0
 Enables or disables rendering of an entity's selectable. More...
 
virtual void UpdateColor ()=0
 Updates the selection color to match the current owner. More...
 
virtual void SetSelectionHighlightAlpha (float alpha)=0
 Sets the alpha of the selection highlight. More...
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual bool NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const
 Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More...
 
virtual JS::Value GetJSInstance () const
 
virtual int GetComponentTypeId () const =0
 

Static Public Member Functions

static void SetOverrideVisibility (bool visible)
 Enables or disables rendering of all entities selectable. More...
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static u8 GetSerializationVersion ()
 

Static Public Attributes

static bool ms_EnableDebugOverlays = false
 

Static Protected Attributes

static bool m_OverrideVisible = true
 

Additional Inherited Members

- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 

Member Function Documentation

◆ IsEditorOnly()

virtual bool ICmpSelectable::IsEditorOnly ( ) const
pure virtual

Returns true if the entity is only selectable in Atlas editor, e.g.

a decorative visual actor.

Implemented in CCmpSelectable.

◆ SetOverrideVisibility()

static void ICmpSelectable::SetOverrideVisibility ( bool  visible)
inlinestatic

Enables or disables rendering of all entities selectable.

Parameters
visibleWhether the selectable should be visible.

◆ SetSelectionHighlight()

virtual void ICmpSelectable::SetSelectionHighlight ( const CColor color,
bool  selected 
)
pure virtual

Sets the selection highlight state.

The highlight is typically a circle/square overlay around the unit.

Parameters
colorcolor and alpha of the selection highlight. Set color.a = 0 to hide the highlight.
selectedwhether the entity is selected; affects desaturation for always visible highlights.

Implemented in CCmpSelectable.

◆ SetSelectionHighlightAlpha()

virtual void ICmpSelectable::SetSelectionHighlightAlpha ( float  alpha)
pure virtual

Sets the alpha of the selection highlight.

Set to 0 to hide the highlight.

Implemented in CCmpSelectable.

◆ SetVisibility()

virtual void ICmpSelectable::SetVisibility ( bool  visible)
pure virtual

Enables or disables rendering of an entity's selectable.

Parameters
visibleWhether the selectable should be visible.

Implemented in CCmpSelectable.

◆ UpdateColor()

virtual void ICmpSelectable::UpdateColor ( )
pure virtual

Updates the selection color to match the current owner.

Implemented in CCmpSelectable.

Member Data Documentation

◆ m_OverrideVisible

bool ICmpSelectable::m_OverrideVisible = true
staticprotected

◆ ms_EnableDebugOverlays

bool ICmpSelectable::ms_EnableDebugOverlays = false
static

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