diff --git a/include/qertypes.h b/include/qertypes.h index b3631d88..e63f9c2f 100644 --- a/include/qertypes.h +++ b/include/qertypes.h @@ -68,7 +68,9 @@ typedef bool qboolean; #define COLOR_GRIDMINOR_ALT 13 #define COLOR_GRIDMAJOR_ALT 14 -#define COLOR_LAST 15 +#define COLOR_DETAIL 15 + +#define COLOR_LAST 16 // ---------------------------- diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 72c9e028..55ca61be 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -549,6 +549,7 @@ gint HandleCommand( GtkWidget *widget, gpointer data ){ case ID_COLORS_SELECTEDBRUSH3D: g_pParentWnd->OnColorsSelectedbrush3D(); break; case ID_COLORS_CLIPPER: g_pParentWnd->OnColorsClipper(); break; case ID_COLORS_VIEWNAME: g_pParentWnd->OnColorsViewname(); break; + case ID_COLORS_DETAIL: g_pParentWnd->OnColorsDetail(); break; case ID_MISC_GAMMA: g_pParentWnd->OnMiscGamma(); break; case ID_MISC_FINDBRUSH: g_pParentWnd->OnMiscFindbrush(); break; case ID_MISC_NEXTLEAKSPOT: g_pParentWnd->OnMiscNextleakspot(); break; @@ -1418,6 +1419,8 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){ GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_CLIPPER ); create_menu_item_with_mnemonic( menu_in_menu, _( "Active View name..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_VIEWNAME ); + create_menu_item_with_mnemonic( menu_in_menu, _( "Detail Brush..." ), + GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_DETAIL ); create_menu_item_with_mnemonic( menu, _( "_Gamma..." ), GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_GAMMA ); @@ -5884,6 +5887,10 @@ void MainFrame::OnColorSetoriginal(){ g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][1] = 0.0f; g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 0.0f; + g_qeglobals.d_savedinfo.colors[COLOR_DETAIL][0] = 0.0f; + g_qeglobals.d_savedinfo.colors[COLOR_DETAIL][1] = 0.0f; + g_qeglobals.d_savedinfo.colors[COLOR_DETAIL][2] = 0.0f; + g_PrefsDlg.SavePrefs(); Sys_UpdateWindows( W_ALL ); } @@ -6088,6 +6095,11 @@ void MainFrame::OnColorsViewname(){ Sys_UpdateWindows( W_ALL ); } +void MainFrame::OnColorsDetail(){ + DoColor( COLOR_DETAIL ); + Sys_UpdateWindows( W_ALL ); +} + void MainFrame::OnMiscGamma(){ float fSave = g_qeglobals.d_savedinfo.fGamma; DoGamma(); diff --git a/radiant/mainframe.h b/radiant/mainframe.h index 73f8ccee..5c3b65bd 100644 --- a/radiant/mainframe.h +++ b/radiant/mainframe.h @@ -105,6 +105,7 @@ struct SKeyInfo #define ID_COLORS_CLIPPER 32836 #define ID_COLORS_GRIDBLOCK 32837 #define ID_COLORS_VIEWNAME 32838 +#define ID_COLORS_DETAIL 37002 #define ID_COLOR_SETORIGINAL 32839 #define ID_COLOR_SETQER 32840 #define ID_COLOR_SETBLACK 32841 @@ -735,6 +736,7 @@ void OnColorsSelectedbrush3D(); void OnColorsCameraBack(); void OnColorsGridblock(); void OnColorsViewname(); +void OnColorsDetail(); void OnColorSetoriginal(); void OnColorSetqer(); void OnColorSetblack(); diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index 560eb8fe..e4f0b27e 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -2851,6 +2851,10 @@ void XYWnd::XY_Draw(){ if ( brush->owner != e && brush->owner ) { qglColor3fv( brush->owner->eclass->color ); } + else if ( brush->brush_faces->texdef.contents & CONTENTS_DETAIL ) + { + qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_DETAIL] ); + } else { qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES] );