menus...
* view->show: +Entity Names = Targetnames (option to draw targetnames, not classnames; def = no)
This commit is contained in:
@@ -111,6 +111,7 @@ EntityCreator::KeyValueChangedFunc KeyValue::m_entityKeyValueChanged = 0;
|
||||
Counter* EntityKeyValues::m_counter = 0;
|
||||
|
||||
bool g_showNames = true;
|
||||
bool g_showTargetNames = false;
|
||||
bool g_showAngles = true;
|
||||
bool g_newLightDraw = true;
|
||||
bool g_lightRadii = true;
|
||||
@@ -264,6 +265,12 @@ void setShowNames( bool showNames ){
|
||||
bool getShowNames(){
|
||||
return g_showNames;
|
||||
}
|
||||
void setShowTargetNames( bool showNames ){
|
||||
g_showTargetNames = showNames;
|
||||
}
|
||||
bool getShowTargetNames(){
|
||||
return g_showTargetNames;
|
||||
}
|
||||
void setShowAngles( bool showAngles ){
|
||||
g_showAngles = showAngles;
|
||||
}
|
||||
@@ -368,6 +375,7 @@ void Entity_Construct( EGameType gameType ){
|
||||
}
|
||||
|
||||
GlobalPreferenceSystem().registerPreference( "SI_ShowNames", BoolImportStringCaller( g_showNames ), BoolExportStringCaller( g_showNames ) );
|
||||
GlobalPreferenceSystem().registerPreference( "SI_ShowTargetNames", BoolImportStringCaller( g_showTargetNames ), BoolExportStringCaller( g_showTargetNames ) );
|
||||
GlobalPreferenceSystem().registerPreference( "SI_ShowAngles", BoolImportStringCaller( g_showAngles ), BoolExportStringCaller( g_showAngles ) );
|
||||
GlobalPreferenceSystem().registerPreference( "NewLightStyle", BoolImportStringCaller( g_newLightDraw ), BoolExportStringCaller( g_newLightDraw ) );
|
||||
GlobalPreferenceSystem().registerPreference( "LightRadiuses", BoolImportStringCaller( g_lightRadii ), BoolExportStringCaller( g_lightRadii ) );
|
||||
|
||||
@@ -39,6 +39,7 @@ void Entity_Construct( EGameType gameType = eGameTypeQuake3 );
|
||||
void Entity_Destroy();
|
||||
|
||||
extern bool g_showNames;
|
||||
extern bool g_showTargetNames;
|
||||
extern bool g_showAngles;
|
||||
extern bool g_newLightDraw;
|
||||
extern bool g_lightRadii;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "eclasslib.h"
|
||||
#include "generic/callback.h"
|
||||
#include "nameable.h"
|
||||
#include "entity.h" //g_showTargetNames
|
||||
|
||||
#include <set>
|
||||
|
||||
@@ -62,6 +63,9 @@ const char* name() const {
|
||||
}
|
||||
return m_name.c_str();
|
||||
}
|
||||
const char* classname() const {
|
||||
return m_entity.getEntityClass().name();
|
||||
}
|
||||
void attach( const NameCallback& callback ){
|
||||
m_changed.insert( callback );
|
||||
}
|
||||
@@ -92,7 +96,7 @@ RenderableNamedEntity( const NamedEntity& named, const Vector3& position )
|
||||
}
|
||||
void render( RenderStateFlags state ) const {
|
||||
glRasterPos3fv( vector3_to_array( m_position ) );
|
||||
GlobalOpenGL().drawString( m_named.name() );
|
||||
GlobalOpenGL().drawString( g_showTargetNames ? m_named.name() : m_named.classname() );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user