From: Thomas Debesse Date: Tue, 21 Jun 2022 03:59:45 +0000 (+0200) Subject: Merge commit '6a7a6b309311c16138981200f4539770755c243a' into master-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff327d248de9b70a1c280e87be3a621ec5ed03fe;p=xonotic%2Fnetradiant.git Merge commit '6a7a6b309311c16138981200f4539770755c243a' into master-merge --- ff327d248de9b70a1c280e87be3a621ec5ed03fe diff --cc radiant/texwindow.cpp index 7670d20c,23174f1c..4068f27b --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@@ -582,6 -581,11 +584,11 @@@ bool Texture_IsShown( IShader* shader, return false; } + if( hideNonShadersInCommon && shader->IsDefault() && !shader->IsInUse() //&& g_TextureBrowser_currentDirectory != "" - && shader_equal_prefix( shader_get_textureName( shader->getName() ), TextureBrowser_getComonShadersDir() ) ){ ++ && shader_equal_prefix( shader_get_textureName( shader->getName() ), TextureBrowser_getCommonShadersDir() ) ){ + return false; + } + if ( GlobalTextureBrowser().m_searchedTags ) { if ( !TextureSearch_IsShown( shader->getName() ) ) { return false; @@@ -3005,9 -2813,17 +3006,17 @@@ void TextureBrowser_constructPreference page.appendSpinner( "Thumbnails Min Size", GlobalTextureBrowser().m_uniformTextureMinSize, GlobalTextureBrowser().m_uniformTextureMinSize, 16, 8192 ); page.appendEntry( "Mousewheel Increment", GlobalTextureBrowser().m_mouseWheelScrollIncrement ); { - const char* startup_shaders[] = { "None", TextureBrowser_getComonShadersName() }; + const char* startup_shaders[] = { "None", TextureBrowser_getCommonShadersName() }; page.appendCombo( "Load Shaders at Startup", reinterpret_cast( GlobalTextureBrowser().m_startupShaders ), STRING_ARRAY_RANGE( startup_shaders ) ); } + { + StringOutputStream sstream( 256 ); - sstream << "Hide nonShaders in " << TextureBrowser_getComonShadersDir() << " folder"; ++ sstream << "Hide nonShaders in " << TextureBrowser_getCommonShadersDir() << " folder"; + page.appendCheckBox( + "", sstream.c_str(), + GlobalTextureBrowser().m_hideNonShadersInCommon + ); + } } void TextureBrowser_constructPage( PreferenceGroup& group ){ @@@ -3059,13 -2873,14 +3068,14 @@@ void TextureBrowser_Construct() GlobalPreferenceSystem().registerPreference( "FixedSize", make_property_string( g_TextureBrowser_fixedSize ) ); GlobalPreferenceSystem().registerPreference( "FilterMissing", make_property_string( g_TextureBrowser_filterMissing ) ); GlobalPreferenceSystem().registerPreference( "EnableAlpha", make_property_string( g_TextureBrowser_enableAlpha ) ); - GlobalPreferenceSystem().registerPreference( "LoadShaders", make_property_string( reinterpret_cast( GlobalTextureBrowser().m_startupShaders ) ) ); - GlobalPreferenceSystem().registerPreference( "WheelMouseInc", make_property_string( GlobalTextureBrowser().m_mouseWheelScrollIncrement ) ); - GlobalPreferenceSystem().registerPreference( "SI_Colors0", make_property_string( GlobalTextureBrowser().color_textureback ) ); + GlobalPreferenceSystem().registerPreference( "LoadShaders", make_property_string( reinterpret_cast( textureBrowser.m_startupShaders ) ) ); + GlobalPreferenceSystem().registerPreference( "WheelMouseInc", make_property_string( textureBrowser.m_mouseWheelScrollIncrement ) ); + GlobalPreferenceSystem().registerPreference( "SI_Colors0", make_property_string( textureBrowser.color_textureback ) ); + GlobalPreferenceSystem().registerPreference( "HideNonShadersInCommon", make_property_string( GlobalTextureBrowser().m_hideNonShadersInCommon ) ); - g_TextureBrowser.shader = texdef_name_default(); + textureBrowser.shader = texdef_name_default(); - Textures_setModeChangedNotify( ReferenceCaller( g_TextureBrowser ) ); + Textures_setModeChangedNotify( ReferenceCaller( textureBrowser ) ); TextureBrowser_registerPreferencesPage();