* statusbar: del "R:" info (rotate increment from SI)
+current map format info (F:AP/BP/220) +explanatory tooltip, describing shown infos
This commit is contained in:
parent
fd7429d45f
commit
aeaeb2a3e6
|
|
@ -44,6 +44,10 @@ bool getTextureLockEnabled(){
|
||||||
return g_brush_texturelock_enabled;
|
return g_brush_texturelock_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* getTexdefTypeIdLabel(){
|
||||||
|
return g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_QUAKE ? "AP" : g_bp_globals.m_texdefTypeId == TEXDEFTYPEID_BRUSHPRIMITIVES ? "BP" : "220";
|
||||||
|
}
|
||||||
|
|
||||||
const char* BrushType_getName( EBrushType type ){
|
const char* BrushType_getName( EBrushType type ){
|
||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
|
|
@ -172,7 +176,8 @@ void Brush_Construct( EBrushType type ){
|
||||||
GlobalPreferenceSystem().registerPreference( "TexdefDefaultScale", FloatImportStringCaller( g_texdef_default_scale ), FloatExportStringCaller( g_texdef_default_scale ) );
|
GlobalPreferenceSystem().registerPreference( "TexdefDefaultScale", FloatImportStringCaller( g_texdef_default_scale ), FloatExportStringCaller( g_texdef_default_scale ) );
|
||||||
|
|
||||||
GridStatus_getTextureLockEnabled = getTextureLockEnabled;
|
GridStatus_getTextureLockEnabled = getTextureLockEnabled;
|
||||||
g_texture_lock_status_changed = FreeCaller<GridStatus_onTextureLockEnabledChanged>();
|
GridStatus_getTexdefTypeIdLabel = getTexdefTypeIdLabel;
|
||||||
|
g_texture_lock_status_changed = FreeCaller<GridStatus_changed>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Brush_Destroy(){
|
void Brush_Destroy(){
|
||||||
|
|
|
||||||
|
|
@ -1948,7 +1948,7 @@ void Camera_CubeIn(){
|
||||||
}
|
}
|
||||||
Camera_updateProjection( camwnd.getCamera() );
|
Camera_updateProjection( camwnd.getCamera() );
|
||||||
CamWnd_Update( camwnd );
|
CamWnd_Update( camwnd );
|
||||||
g_pParentWnd->SetGridStatus();
|
GridStatus_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera_CubeOut(){
|
void Camera_CubeOut(){
|
||||||
|
|
@ -1959,7 +1959,7 @@ void Camera_CubeOut(){
|
||||||
}
|
}
|
||||||
Camera_updateProjection( camwnd.getCamera() );
|
Camera_updateProjection( camwnd.getCamera() );
|
||||||
CamWnd_Update( camwnd );
|
CamWnd_Update( camwnd );
|
||||||
g_pParentWnd->SetGridStatus();
|
GridStatus_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Camera_GetFarClip(){
|
bool Camera_GetFarClip(){
|
||||||
|
|
|
||||||
|
|
@ -2551,6 +2551,9 @@ GtkWidget* create_main_statusbar( GtkWidget *pStatusLabel[c_count_status] ){
|
||||||
gtk_table_attach_defaults( table, GTK_WIDGET( frame ), i, i + 1, 0, 1 );
|
gtk_table_attach_defaults( table, GTK_WIDGET( frame ), i, i + 1, 0, 1 );
|
||||||
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
|
gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN );
|
||||||
|
|
||||||
|
if( i == c_grid_status )
|
||||||
|
gtk_widget_set_tooltip_text( GTK_WIDGET( frame ), "G: Grid size\nF: map Format\nC: camera Clip scale\nL: texture Lock " );
|
||||||
|
|
||||||
GtkLabel* label = GTK_LABEL( gtk_label_new( "Label" ) );
|
GtkLabel* label = GTK_LABEL( gtk_label_new( "Label" ) );
|
||||||
if( i == c_texture_status )
|
if( i == c_texture_status )
|
||||||
gtk_label_set_ellipsize( label, PANGO_ELLIPSIZE_START );
|
gtk_label_set_ellipsize( label, PANGO_ELLIPSIZE_START );
|
||||||
|
|
@ -3293,30 +3296,31 @@ void Sys_Status( const char* status ){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int getRotateIncrement(){
|
//int getRotateIncrement(){
|
||||||
return static_cast<int>( g_si_globals.rotate );
|
// return static_cast<int>( g_si_globals.rotate );
|
||||||
}
|
//}
|
||||||
|
|
||||||
int getFarClipDistance(){
|
int getFarClipDistance(){
|
||||||
return g_camwindow_globals.m_nCubicScale;
|
return g_camwindow_globals.m_nCubicScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
float ( *GridStatus_getGridSize )() = GetGridSize;
|
float ( *GridStatus_getGridSize )() = GetGridSize;
|
||||||
int ( *GridStatus_getRotateIncrement )() = getRotateIncrement;
|
//int ( *GridStatus_getRotateIncrement )() = getRotateIncrement;
|
||||||
int ( *GridStatus_getFarClipDistance )() = getFarClipDistance;
|
int ( *GridStatus_getFarClipDistance )() = getFarClipDistance;
|
||||||
bool ( *GridStatus_getTextureLockEnabled )();
|
bool ( *GridStatus_getTextureLockEnabled )();
|
||||||
|
const char* ( *GridStatus_getTexdefTypeIdLabel )();
|
||||||
|
|
||||||
void MainFrame::SetGridStatus(){
|
void MainFrame::SetGridStatus(){
|
||||||
StringOutputStream status( 64 );
|
StringOutputStream status( 64 );
|
||||||
const char* lock = ( GridStatus_getTextureLockEnabled() ) ? "ON" : "OFF";
|
const char* lock = ( GridStatus_getTextureLockEnabled() ) ? "ON" : "OFF";
|
||||||
status << ( GetSnapGridSize() > 0 ? "G:" : "g:" ) << GridStatus_getGridSize()
|
status << ( GetSnapGridSize() > 0 ? "G:" : "g:" ) << GridStatus_getGridSize()
|
||||||
<< " R:" << GridStatus_getRotateIncrement()
|
<< " F:" << GridStatus_getTexdefTypeIdLabel()
|
||||||
<< " C:" << GridStatus_getFarClipDistance()
|
<< " C:" << GridStatus_getFarClipDistance()
|
||||||
<< " L:" << lock;
|
<< " L:" << lock;
|
||||||
SetStatusText( m_grid_status, status.c_str() );
|
SetStatusText( m_grid_status, status.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GridStatus_onTextureLockEnabledChanged(){
|
void GridStatus_changed(){
|
||||||
if ( g_pParentWnd != 0 ) {
|
if ( g_pParentWnd != 0 ) {
|
||||||
g_pParentWnd->SetGridStatus();
|
g_pParentWnd->SetGridStatus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -255,10 +255,11 @@ void MainFrame_Destroy();
|
||||||
|
|
||||||
|
|
||||||
extern float ( *GridStatus_getGridSize )();
|
extern float ( *GridStatus_getGridSize )();
|
||||||
extern int ( *GridStatus_getRotateIncrement )();
|
//extern int ( *GridStatus_getRotateIncrement )();
|
||||||
extern int ( *GridStatus_getFarClipDistance )();
|
extern int ( *GridStatus_getFarClipDistance )();
|
||||||
extern bool ( *GridStatus_getTextureLockEnabled )();
|
extern bool ( *GridStatus_getTextureLockEnabled )();
|
||||||
void GridStatus_onTextureLockEnabledChanged();
|
extern const char* ( *GridStatus_getTexdefTypeIdLabel )();
|
||||||
|
void GridStatus_changed();
|
||||||
|
|
||||||
SignalHandlerId XYWindowDestroyed_connect( const SignalHandler& handler );
|
SignalHandlerId XYWindowDestroyed_connect( const SignalHandler& handler );
|
||||||
void XYWindowDestroyed_disconnect( SignalHandlerId id );
|
void XYWindowDestroyed_disconnect( SignalHandlerId id );
|
||||||
|
|
|
||||||
|
|
@ -1178,6 +1178,8 @@ void Map_LoadFile( const char *filename ){
|
||||||
Map_StartPosition();
|
Map_StartPosition();
|
||||||
|
|
||||||
g_currentMap = &g_map;
|
g_currentMap = &g_map;
|
||||||
|
|
||||||
|
GridStatus_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
class Excluder
|
class Excluder
|
||||||
|
|
@ -1433,6 +1435,8 @@ void Map_New(){
|
||||||
FocusViews( g_vector3_identity, 0 );
|
FocusViews( g_vector3_identity, 0 );
|
||||||
|
|
||||||
g_currentMap = &g_map;
|
g_currentMap = &g_map;
|
||||||
|
|
||||||
|
GridStatus_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void ConstructRegionBrushes( scene::Node * brushes[6], const Vector3 ®ion_mins, const Vector3 ®ion_maxs );
|
extern void ConstructRegionBrushes( scene::Node * brushes[6], const Vector3 ®ion_mins, const Vector3 ®ion_maxs );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user