mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-26 03:11:30 +00:00
Merge pull request #280 from bigjilm/master
Option to color detail brushes in 2d views
This commit is contained in:
commit
3d3418e77f
4 changed files with 21 additions and 1 deletions
|
@ -68,7 +68,9 @@ typedef bool qboolean;
|
||||||
#define COLOR_GRIDMINOR_ALT 13
|
#define COLOR_GRIDMINOR_ALT 13
|
||||||
#define COLOR_GRIDMAJOR_ALT 14
|
#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_SELECTEDBRUSH3D: g_pParentWnd->OnColorsSelectedbrush3D(); break;
|
||||||
case ID_COLORS_CLIPPER: g_pParentWnd->OnColorsClipper(); break;
|
case ID_COLORS_CLIPPER: g_pParentWnd->OnColorsClipper(); break;
|
||||||
case ID_COLORS_VIEWNAME: g_pParentWnd->OnColorsViewname(); 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_GAMMA: g_pParentWnd->OnMiscGamma(); break;
|
||||||
case ID_MISC_FINDBRUSH: g_pParentWnd->OnMiscFindbrush(); break;
|
case ID_MISC_FINDBRUSH: g_pParentWnd->OnMiscFindbrush(); break;
|
||||||
case ID_MISC_NEXTLEAKSPOT: g_pParentWnd->OnMiscNextleakspot(); 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 );
|
GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_CLIPPER );
|
||||||
create_menu_item_with_mnemonic( menu_in_menu, _( "Active View name..." ),
|
create_menu_item_with_mnemonic( menu_in_menu, _( "Active View name..." ),
|
||||||
GTK_SIGNAL_FUNC( HandleCommand ), ID_COLORS_VIEWNAME );
|
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..." ),
|
create_menu_item_with_mnemonic( menu, _( "_Gamma..." ),
|
||||||
GTK_SIGNAL_FUNC( HandleCommand ), ID_MISC_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][1] = 0.0f;
|
||||||
g_qeglobals.d_savedinfo.colors[COLOR_SELBRUSHES3D][2] = 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();
|
g_PrefsDlg.SavePrefs();
|
||||||
Sys_UpdateWindows( W_ALL );
|
Sys_UpdateWindows( W_ALL );
|
||||||
}
|
}
|
||||||
|
@ -6088,6 +6095,11 @@ void MainFrame::OnColorsViewname(){
|
||||||
Sys_UpdateWindows( W_ALL );
|
Sys_UpdateWindows( W_ALL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainFrame::OnColorsDetail(){
|
||||||
|
DoColor( COLOR_DETAIL );
|
||||||
|
Sys_UpdateWindows( W_ALL );
|
||||||
|
}
|
||||||
|
|
||||||
void MainFrame::OnMiscGamma(){
|
void MainFrame::OnMiscGamma(){
|
||||||
float fSave = g_qeglobals.d_savedinfo.fGamma;
|
float fSave = g_qeglobals.d_savedinfo.fGamma;
|
||||||
DoGamma();
|
DoGamma();
|
||||||
|
|
|
@ -105,6 +105,7 @@ struct SKeyInfo
|
||||||
#define ID_COLORS_CLIPPER 32836
|
#define ID_COLORS_CLIPPER 32836
|
||||||
#define ID_COLORS_GRIDBLOCK 32837
|
#define ID_COLORS_GRIDBLOCK 32837
|
||||||
#define ID_COLORS_VIEWNAME 32838
|
#define ID_COLORS_VIEWNAME 32838
|
||||||
|
#define ID_COLORS_DETAIL 37002
|
||||||
#define ID_COLOR_SETORIGINAL 32839
|
#define ID_COLOR_SETORIGINAL 32839
|
||||||
#define ID_COLOR_SETQER 32840
|
#define ID_COLOR_SETQER 32840
|
||||||
#define ID_COLOR_SETBLACK 32841
|
#define ID_COLOR_SETBLACK 32841
|
||||||
|
@ -735,6 +736,7 @@ void OnColorsSelectedbrush3D();
|
||||||
void OnColorsCameraBack();
|
void OnColorsCameraBack();
|
||||||
void OnColorsGridblock();
|
void OnColorsGridblock();
|
||||||
void OnColorsViewname();
|
void OnColorsViewname();
|
||||||
|
void OnColorsDetail();
|
||||||
void OnColorSetoriginal();
|
void OnColorSetoriginal();
|
||||||
void OnColorSetqer();
|
void OnColorSetqer();
|
||||||
void OnColorSetblack();
|
void OnColorSetblack();
|
||||||
|
|
|
@ -2851,6 +2851,10 @@ void XYWnd::XY_Draw(){
|
||||||
if ( brush->owner != e && brush->owner ) {
|
if ( brush->owner != e && brush->owner ) {
|
||||||
qglColor3fv( brush->owner->eclass->color );
|
qglColor3fv( brush->owner->eclass->color );
|
||||||
}
|
}
|
||||||
|
else if ( brush->brush_faces->texdef.contents & CONTENTS_DETAIL )
|
||||||
|
{
|
||||||
|
qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_DETAIL] );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES] );
|
qglColor3fv( g_qeglobals.d_savedinfo.colors[COLOR_BRUSHES] );
|
||||||
|
|
Loading…
Reference in a new issue