| 
    Planeshift
    
   | 
 
class psEntityLabels serves for creation and management of 2D sprites hanging above cel-entities that display entity names and possibly guilds More...
#include <entitylabels.h>
Classes | |
| struct | labelRow | 
| This describes one row of text displayed on entity label.  More... | |
Public Member Functions | |
| void | Configure (psEntityLabelVisib visCreatures, psEntityLabelVisib visItems, bool showGuild, int *colors) | 
| Sets options for label behaviour:  More... | |
| void | GetConfiguration (psEntityLabelVisib &visCreatures, psEntityLabelVisib &visItems, bool &showGuild, int *colors) | 
| Gets options for label behaviour:  More... | |
| bool | HandleEvent (iEvent &Event) | 
| This is called before the scene is painted on screen:  More... | |
| bool | Initialize (iObjectRegistry *object_reg, psCelClient *celClient) | 
| void | LoadAllEntityLabels () | 
| (re)loads all entity labels  More... | |
| bool | LoadFromFile () | 
| Reads options for label behaviour from file:  More... | |
| void | OnObjectArrived (GEMClientObject *object) | 
| This must be called when client receives cel entity from server:  More... | |
| psEntityLabels () | |
| virtual void | RemoveObject (GEMClientObject *object) | 
| This is called before some entity is deleted.  More... | |
| void | RepaintAllLabels () | 
| Used to repaint labels.  More... | |
| void | RepaintObjectLabel (GEMClientObject *object) | 
| bool | SaveToFile () | 
| Saves options for label behaviour to file:  More... | |
| virtual | ~psEntityLabels () | 
Protected Member Functions | |
| void | CreateLabelOfObject (GEMClientObject *object) | 
| Creates label and its texture.  More... | |
| DeclareGenericEventHandler (EventHandler, psEntityLabels,"planeshift.entityevent") | |
| Declare our event handler.  More... | |
| void | DeleteLabelOfObject (GEMClientObject *object) | 
| Deletes label from entity.  More... | |
| void | HideAllLabels () | 
| Hides all labels.  More... | |
| bool | MatchVisibility (GEMOBJECT_TYPE type, psEntityLabelVisib vis) | 
| void | RefreshGuildLabels () | 
| Refreshes just the actors with guild names (used on showGuild change)  More... | |
| void | SetObjectText (GEMClientObject *object) | 
| Determines what will be written in label.  More... | |
| void | ShowLabelOfObject (GEMClientObject *object, bool show) | 
| Shows or hides label of given entity (only sets visibility, doesn't create/destruct it) This is used when visibility mode is OnMouseOver - labels are created for all entities, but only one is set visible (or none at all).  More... | |
| void | UpdateMouseover () | 
| Updates label visibility for entities under the cursor.  More... | |
| void | UpdateTarget () | 
| Updates label visibility for targeted entities.  More... | |
| void | UpdateVisibility () | 
| Updates label visibility based on range.  More... | |
Protected Attributes | |
| psCelClient * | celClient | 
| int | entityColors [ENTITY_TYPES_AMOUNT] | 
| Entity labels colors.  More... | |
| csRef< EventHandler > | eventhandler | 
| csRef< iEventQueue > | eventQueue | 
| References to some system-wide objects that we use.  More... | |
| bool | showGuild | 
| GEMClientObject * | underMouse | 
| Entity that is under mouse cursor (or NULL)  More... | |
| GEMClientObject * | underTarget | 
| Entity which was targeted (or NULL)  More... | |
| iVFS * | vfs | 
| psEntityLabelVisib | visCreatures | 
| Configuration options.  More... | |
| psEntityLabelVisib | visItems | 
class psEntityLabels serves for creation and management of 2D sprites hanging above cel-entities that display entity names and possibly guilds
Definition at line 69 of file entitylabels.h.
| psEntityLabels::psEntityLabels | ( | ) | 
      
  | 
  virtual | 
| void psEntityLabels::Configure | ( | psEntityLabelVisib | visCreatures, | 
| psEntityLabelVisib | visItems, | ||
| bool | showGuild, | ||
| int * | colors | ||
| ) | 
Sets options for label behaviour:
      
  | 
  protected | 
Creates label and its texture.
      
  | 
  protected | 
Declare our event handler.
      
  | 
  protected | 
Deletes label from entity.
| void psEntityLabels::GetConfiguration | ( | psEntityLabelVisib & | visCreatures, | 
| psEntityLabelVisib & | visItems, | ||
| bool & | showGuild, | ||
| int * | colors | ||
| ) | 
Gets options for label behaviour:
| bool psEntityLabels::HandleEvent | ( | iEvent & | Event | ) | 
This is called before the scene is painted on screen:
      
  | 
  protected | 
Hides all labels.
| bool psEntityLabels::Initialize | ( | iObjectRegistry * | object_reg, | 
| psCelClient * | celClient | ||
| ) | 
| void psEntityLabels::LoadAllEntityLabels | ( | ) | 
(re)loads all entity labels
| bool psEntityLabels::LoadFromFile | ( | ) | 
Reads options for label behaviour from file:
      
  | 
  protected | 
| void psEntityLabels::OnObjectArrived | ( | GEMClientObject * | object | ) | 
This must be called when client receives cel entity from server:
      
  | 
  protected | 
Refreshes just the actors with guild names (used on showGuild change)
      
  | 
  virtual | 
This is called before some entity is deleted.
| void psEntityLabels::RepaintAllLabels | ( | ) | 
Used to repaint labels.
| void psEntityLabels::RepaintObjectLabel | ( | GEMClientObject * | object | ) | 
| bool psEntityLabels::SaveToFile | ( | ) | 
Saves options for label behaviour to file:
      
  | 
  protected | 
Determines what will be written in label.
      
  | 
  protected | 
Shows or hides label of given entity (only sets visibility, doesn't create/destruct it) This is used when visibility mode is OnMouseOver - labels are created for all entities, but only one is set visible (or none at all).
      
  | 
  protected | 
Updates label visibility for entities under the cursor.
      
  | 
  protected | 
Updates label visibility for targeted entities.
      
  | 
  protected | 
Updates label visibility based on range.
      
  | 
  protected | 
Definition at line 201 of file entitylabels.h.
      
  | 
  protected | 
Entity labels colors.
Definition at line 184 of file entitylabels.h.
      
  | 
  protected | 
Definition at line 205 of file entitylabels.h.
      
  | 
  protected | 
References to some system-wide objects that we use.
Definition at line 199 of file entitylabels.h.
      
  | 
  protected | 
Definition at line 181 of file entitylabels.h.
      
  | 
  protected | 
Entity that is under mouse cursor (or NULL)
Definition at line 189 of file entitylabels.h.
      
  | 
  protected | 
Entity which was targeted (or NULL)
Definition at line 194 of file entitylabels.h.
      
  | 
  protected | 
Definition at line 200 of file entitylabels.h.
      
  | 
  protected | 
Configuration options.
Definition at line 179 of file entitylabels.h.
      
  | 
  protected | 
Definition at line 180 of file entitylabels.h.