X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fbrushmodule.cpp;h=6a9565df8906a24823573a8ff180c288d3be49bb;hb=21c7bc268fd5f95bc1c7886d662e103e896fcb4a;hp=2ab573e514601c7d8b451eca7a8caa448b1e1ae3;hpb=70b21eafbe10c90172922d8a7af4f06b9a3b242d;p=xonotic%2Fnetradiant.git diff --git a/radiant/brushmodule.cpp b/radiant/brushmodule.cpp index 2ab573e5..6a9565df 100644 --- a/radiant/brushmodule.cpp +++ b/radiant/brushmodule.cpp @@ -100,6 +100,16 @@ int Brush_toggleFormatCount(){ return 1; } +void Brush_switchFormat( bool switch_format ){ + if ( switch_format ) + { + g_useAlternativeTextureProjection.m_latched = g_useAlternativeTextureProjection.m_value; + g_useAlternativeTextureProjection.m_value = !g_useAlternativeTextureProjection.m_value; + PreferencesDialog_restartRequired( g_useAlternativeTextureProjection.m_description ); + PreferencesDialog_restartIfRequired(); + } +} + void Brush_Construct( EBrushType type ){ if ( type == eBrushTypeQuake3 ) { g_showAlternativeTextureProjectionOption = true; @@ -113,6 +123,7 @@ void Brush_Construct( EBrushType type ){ "AlternativeTextureProjection", make_property_string( g_useAlternativeTextureProjection.m_latched ) ); + g_useAlternativeTextureProjection.useLatched(); if ( g_useAlternativeTextureProjection.m_value ) {