|
Pyrogenesis
13997
|
Public Member Functions | |
| CCmpSelectable () | |
| ~CCmpSelectable () | |
| virtual void | Init (const CParamNode ¶mNode) |
| virtual void | Deinit () |
| virtual void | Serialize (ISerializer &serialize) |
| virtual void | Deserialize (const CParamNode ¶mNode, IDeserializer &deserialize) |
| virtual void | HandleMessage (const CMessage &msg, bool global) |
| virtual void | SetSelectionHighlight (CColor color, bool selected) |
| Set the selection highlight state. More... | |
| virtual void | SetSelectionHighlightAlpha (float alpha) |
| Set the alpha of the selection highlight. More... | |
| virtual void | SetVisibility (bool visible) |
| Enables or disables rendering of an entity's selectable. More... | |
| virtual bool | IsEditorOnly () |
| Returns true if the entity is only selectable in Atlas editor, e.g. More... | |
| void | RenderSubmit (SceneCollector &collector) |
| void | UpdateStaticOverlay () |
| Called from RenderSubmit if using a static outline; responsible for ensuring that the static overlay is up-to-date before it is rendered. More... | |
| void | UpdateDynamicOverlay (float frameOffset) |
| Called from the interpolation handler; responsible for ensuring the dynamic overlay (provided we're using one) is up-to-date and ready to be submitted to the next rendering run. More... | |
| void | InvalidateStaticOverlay () |
| Explicitly invalidates the static overlay. More... | |
Public Member Functions inherited from IComponent | |
| virtual | ~IComponent () |
| CEntityHandle | GetEntityHandle () const |
| void | SetEntityHandle (CEntityHandle ent) |
| entity_id_t | GetEntityId () const |
| CEntityHandle | GetSystemEntity () const |
| const CSimContext & | GetSimContext () const |
| void | SetSimContext (const CSimContext &context) |
| virtual JSClass * | GetJSClass () const |
| virtual jsval | GetJSInstance () const |
Static Public Member Functions | |
| static void | ClassInit (CComponentManager &componentManager) |
| static IComponent * | Allocate (ScriptInterface &, jsval) |
| static void | Deallocate (IComponent *cmp) |
| static std::string | GetSchema () |
Static Public Member Functions inherited from IComponent | |
| static std::string | GetSchema () |
| static u8 | GetSerializationVersion () |
Private Attributes | |
| SOverlayDescriptor | m_OverlayDescriptor |
| SOverlayTexturedLine * | m_BuildingOverlay |
| SOverlayQuad * | m_UnitOverlay |
| SOverlayLine * | m_DebugBoundingBoxOverlay |
| SOverlayLine * | m_DebugSelectionBoxOverlay |
| bool | m_Visible |
| bool | m_EditorOnly |
| bool | m_AlwaysVisible |
| bool | m_Selected |
| Whether the parent entity is selected (caches GUI's selection state). More... | |
| CColor | m_Color |
| Current selection overlay color. Alpha component is subject to fading. More... | |
| bool | m_Cached |
| Whether the selectable's player colour has been cached for rendering. More... | |
| float | m_AlphaMin |
| Minimum value for current selection overlay alpha. More... | |
| float | m_FadeBaselineAlpha |
| Baseline alpha value to start fading from. Constant during a single fade. More... | |
| float | m_FadeDeltaAlpha |
| Delta between target and baseline alpha. Constant during a single fade. Can be positive or negative. More... | |
| float | m_FadeProgress |
| Linear time progress of the fade, between 0 and m_FadeDuration. More... | |
Static Private Attributes | |
| static const double | FADE_DURATION = 0.3 |
| Total duration of a single fade, in seconds. More... | |
Additional Inherited Members | |
Public Types inherited from ICmpSelectable | |
| enum | EOverlayType { DYNAMIC_QUAD, STATIC_OUTLINE } |
Static Public Attributes inherited from ICmpSelectable | |
| static bool | ms_EnableDebugOverlays = false |
Definition at line 51 of file CCmpSelectable.cpp.
|
inline |
Definition at line 66 of file CCmpSelectable.cpp.
|
inline |
Definition at line 75 of file CCmpSelectable.cpp.
|
inlinestatic |
Definition at line 64 of file CCmpSelectable.cpp.
|
inlinestatic |
Definition at line 54 of file CCmpSelectable.cpp.
|
inlinestatic |
Definition at line 64 of file CCmpSelectable.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 151 of file CCmpSelectable.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 159 of file CCmpSelectable.cpp.
|
inlinestatic |
Definition at line 83 of file CCmpSelectable.cpp.
|
virtual |
Reimplemented from IComponent.
Definition at line 267 of file CCmpSelectable.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 113 of file CCmpSelectable.cpp.
| void CCmpSelectable::InvalidateStaticOverlay | ( | ) |
Explicitly invalidates the static overlay.
Definition at line 338 of file CCmpSelectable.cpp.
|
inlinevirtual |
Returns true if the entity is only selectable in Atlas editor, e.g.
a decorative visual actor.
Implements ICmpSelectable.
Definition at line 208 of file CCmpSelectable.cpp.
| void CCmpSelectable::RenderSubmit | ( | SceneCollector & | collector | ) |
Definition at line 526 of file CCmpSelectable.cpp.
|
inlinevirtual |
Implements IComponent.
Definition at line 153 of file CCmpSelectable.cpp.
|
inlinevirtual |
Set the selection highlight state.
The highlight is typically a circle/square overlay around the unit.
| color | color and alpha of the selection highlight. Set color.a = 0 to hide the highlight. |
| selected | whether the entity is selected; affects desaturation for always visible highlights. |
Implements ICmpSelectable.
Definition at line 167 of file CCmpSelectable.cpp.
|
inlinevirtual |
Set the alpha of the selection highlight.
Set to 0 to hide the highlight.
Implements ICmpSelectable.
Definition at line 193 of file CCmpSelectable.cpp.
|
inlinevirtual |
Enables or disables rendering of an entity's selectable.
| visible | Whether the selectable should be visible. |
Implements ICmpSelectable.
Definition at line 203 of file CCmpSelectable.cpp.
| void CCmpSelectable::UpdateDynamicOverlay | ( | float | frameOffset | ) |
Called from the interpolation handler; responsible for ensuring the dynamic overlay (provided we're using one) is up-to-date and ready to be submitted to the next rendering run.
Definition at line 440 of file CCmpSelectable.cpp.
| void CCmpSelectable::UpdateStaticOverlay | ( | ) |
Called from RenderSubmit if using a static outline; responsible for ensuring that the static overlay is up-to-date before it is rendered.
Has no effect unless the static overlay is explicitly marked as invalid first (see InvalidateStaticOverlay).
Definition at line 343 of file CCmpSelectable.cpp.
|
staticprivate |
Total duration of a single fade, in seconds.
Assumed constant for now; feel free to change this into a member variable if you need to adjust it per component.
Definition at line 262 of file CCmpSelectable.cpp.
|
private |
Minimum value for current selection overlay alpha.
Definition at line 252 of file CCmpSelectable.cpp.
|
private |
Definition at line 244 of file CCmpSelectable.cpp.
|
private |
Definition at line 233 of file CCmpSelectable.cpp.
|
private |
Whether the selectable's player colour has been cached for rendering.
Definition at line 250 of file CCmpSelectable.cpp.
|
private |
Current selection overlay color. Alpha component is subject to fading.
Definition at line 248 of file CCmpSelectable.cpp.
|
private |
Definition at line 236 of file CCmpSelectable.cpp.
|
private |
Definition at line 237 of file CCmpSelectable.cpp.
|
private |
Definition at line 242 of file CCmpSelectable.cpp.
|
private |
Baseline alpha value to start fading from. Constant during a single fade.
Definition at line 254 of file CCmpSelectable.cpp.
|
private |
Delta between target and baseline alpha. Constant during a single fade. Can be positive or negative.
Definition at line 256 of file CCmpSelectable.cpp.
|
private |
Linear time progress of the fade, between 0 and m_FadeDuration.
Definition at line 258 of file CCmpSelectable.cpp.
|
private |
Definition at line 232 of file CCmpSelectable.cpp.
|
private |
Whether the parent entity is selected (caches GUI's selection state).
Definition at line 246 of file CCmpSelectable.cpp.
|
private |
Definition at line 234 of file CCmpSelectable.cpp.
|
private |
Definition at line 240 of file CCmpSelectable.cpp.
1.8.5