Pyrogenesis  trunk
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
ICmpSelectable Class Referenceabstract

#include <ICmpSelectable.h>

Inheritance diagram for ICmpSelectable:
Inheritance graph
[legend]
Collaboration diagram for ICmpSelectable:
Collaboration graph
[legend]

Classes

struct  SOverlayDescriptor
 

Public Types

enum  EOverlayType { DYNAMIC_QUAD, STATIC_OUTLINE }
 

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
 Set the selection highlight state. More...
 
virtual void SetVisibility (bool visible)=0
 Enables or disables rendering of an entity's selectable. More...
 
virtual void SetSelectionHighlightAlpha (float alpha)=0
 Set 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 (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 u8 GetSerializationVersion ()
 

Static Public Attributes

static bool ms_EnableDebugOverlays = false
 

Static Protected Attributes

static bool m_OverrideVisible = true
 

Member Enumeration Documentation

Enumerator
DYNAMIC_QUAD 

A single textured quad overlay, intended for entities that move around much, like units (e.g. foot soldiers, etc).

STATIC_OUTLINE 

A more complex textured line overlay, composed of several textured line segments.

Intended for entities that do not move often, such as buildings (structures).

Member Function Documentation

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.

static void ICmpSelectable::SetOverrideVisibility ( bool  visible)
inlinestatic

Enables or disables rendering of all entities selectable.

Parameters
visibleWhether the selectable should be visible.
virtual void ICmpSelectable::SetSelectionHighlight ( const CColor color,
bool  selected 
)
pure virtual

Set 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.

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

Set the alpha of the selection highlight.

Set to 0 to hide the highlight.

Implemented in CCmpSelectable.

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.

Member Data Documentation

bool ICmpSelectable::m_OverrideVisible = true
staticprotected
bool ICmpSelectable::ms_EnableDebugOverlays = false
static

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