mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Added option to change detail brush color in 2d view
This commit is contained in:
parent
73b5b0dca7
commit
19bd95b0a2
4 changed files with 22 additions and 1 deletions
|
@ -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
|
||||
|
||||
// ----------------------------
|
||||
|
||||
|
|
|
@ -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 brushes..." ),
|
||||
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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -2856,6 +2856,11 @@ void XYWnd::XY_Draw(){
|
|||
qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES] );
|
||||
}
|
||||
|
||||
//Color detail brushes differently
|
||||
if ( brush->brush_faces->texdef.contents & CONTENTS_DETAIL ) {
|
||||
qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_DETAIL] );
|
||||
}
|
||||
|
||||
#ifdef DBG_SCENEDUMP
|
||||
if ( bDump ) {
|
||||
Sys_FPrintf( SYS_WRN, "Active brush: %p ", brush );
|
||||
|
|
Loading…
Reference in a new issue