From: namespace Date: Fri, 6 Oct 2006 20:55:44 +0000 (+0000) Subject: - Changed ETB not to show any texture if a tag search doesn't match anything (Shaderman) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0bf698e6c1affc21086a288ff050786432f9d88;p=xonotic%2Fnetradiant.git - Changed ETB not to show any texture if a tag search doesn't match anything (Shaderman) - Added View -> Filter -> Invert filters/Reset filters function (Shaderman) - Fixed (TODO) Textures: remove shaders only option for doom3 (Shaderman) - Fixed show shaders / shader only / shader info for doom3 and .wad file games (Shaderman) git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@112 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/CHANGES b/CHANGES index 234ecd98..f54a80ec 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ This is the changelog for developers, != changelog for the end user that we distribute with the binaries. (see changelog) +06/10/2006 +namespace +- Changed ETB not to show any texture if a tag search doesn't match anything (Shaderman) +- Added View -> Filter -> "Invert filters/Reset filters" function (Shaderman) +- Fixed (TODO) Textures: remove "shaders only" option for doom3 (Shaderman) +- Fixed show shaders / shader only / shader info for doom3 and .wad file games (Shaderman) 03/10/2006 namespace diff --git a/TODO b/TODO index 4ebb4f43..d91876ac 100644 --- a/TODO +++ b/TODO @@ -87,7 +87,6 @@ Editing: add option to choose the default startup tool mode. Renderer: lighting for doom3 materials without bumpmaps (e.g. mcity/mchangar2) Renderer: realtime doom3 materials preview Renderer: realtime doom3 shadows preview -Renderer: add shortcut to toggle between lighting/textured modes. Linux: Provide .tar.gz of example-map data for et/wolf. Textures Window: add inner dark outline to distinguish 'is-shader' outline from white textures. HalfLife2: add HL2 map load/save. @@ -109,7 +108,6 @@ Model: support doom3 ragdolls VFS: add ability to browse VFS from file-open dialogs. Installer: enable q3 brush-primitives map support. Installer: add editor manual to linux installer -Textures: remove "shaders only" option for doom3 Map: add conversion between map formats Map: add conversion between entity definition formats Build: add build-menu dmap support (doom3) diff --git a/radiant/filters.cpp b/radiant/filters.cpp index e0f157da..74e7774a 100644 --- a/radiant/filters.cpp +++ b/radiant/filters.cpp @@ -150,6 +150,12 @@ public: m_item.update(); PerformFiltering(); } + void reset() + { + g_filters_globals.exclude = 0; + m_item.update(); + PerformFiltering(); + } typedef MemberCaller ToggleCaller; }; @@ -163,6 +169,26 @@ void add_filter_command(unsigned int flag, const char* command, const Accelerato GlobalToggles_insert(command, ToggleFilterFlag::ToggleCaller(g_filter_items.back()), ToggleItem::AddCallbackCaller(g_filter_items.back().m_item), accelerator); } +void InvertFilters() +{ + std::list::iterator iter; + + for(iter = g_filter_items.begin(); iter != g_filter_items.end(); ++iter) + { + iter->toggle(); + } +} + +void ResetFilters() +{ + std::list::iterator iter; + + for(iter = g_filter_items.begin(); iter != g_filter_items.end(); ++iter) + { + iter->reset(); + } +} + void Filters_constructMenu(GtkMenu* menu_in_menu) { create_check_menu_item_with_mnemonic(menu_in_menu, "World", "FilterWorldBrushes"); @@ -202,6 +228,10 @@ void Filters_constructMenu(GtkMenu* menu_in_menu) { create_check_menu_item_with_mnemonic(menu_in_menu, "Botclips", "FilterBotClips"); } + // filter manipulation + menu_separator(menu_in_menu); + create_menu_item_with_mnemonic(menu_in_menu, "Invert filters", "InvertFilters"); + create_menu_item_with_mnemonic(menu_in_menu, "Reset filters", "ResetFilters"); } @@ -212,6 +242,9 @@ void ConstructFilters() { GlobalPreferenceSystem().registerPreference("SI_Exclude", SizeImportStringCaller(g_filters_globals.exclude), SizeExportStringCaller(g_filters_globals.exclude)); + GlobalCommands_insert("InvertFilters", FreeCaller()); + GlobalCommands_insert("ResetFilters", FreeCaller()); + add_filter_command(EXCLUDE_WORLD, "FilterWorldBrushes", Accelerator('1', (GdkModifierType)GDK_MOD1_MASK)); add_filter_command(EXCLUDE_ENT, "FilterEntities", Accelerator('2', (GdkModifierType)GDK_MOD1_MASK)); if(g_pGameDescription->mGameType == "doom3") diff --git a/radiant/texwindow.cpp b/radiant/texwindow.cpp index 254a7214..cc5ef130 100644 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@ -1595,7 +1595,6 @@ void TextureBrowser_createTreeViewTags() GtkMenuItem* TextureBrowser_constructViewMenu(GtkMenu* menu) { GtkMenuItem* textures_menu_item = new_sub_menu_item_with_mnemonic("_View"); - GtkWidget* separator = gtk_separator_menu_item_new(); if(g_Layout_enableDetachableMenus.m_value) menu_tearoff (menu); @@ -1603,8 +1602,8 @@ GtkMenuItem* TextureBrowser_constructViewMenu(GtkMenu* menu) create_check_menu_item_with_mnemonic(menu, "Hide _Unused", "ShowInUse"); create_menu_item_with_mnemonic(menu, "Show All", "ShowAllTextures"); - // we always want to show shaders but don't want a "Show Shaders" menu for doom3 games - if(string_equal(g_pGameDescription->getRequiredKeyValue("shaders"), "doom3")) + // we always want to show shaders but don't want a "Show Shaders" menu for doom3 and .wad file games + if(g_pGameDescription->mGameType == "doom3" || !string_empty(g_pGameDescription->getKeyValue("show_wads"))) { g_TextureBrowser.m_showShaders = true; } @@ -1613,16 +1612,21 @@ GtkMenuItem* TextureBrowser_constructViewMenu(GtkMenu* menu) create_check_menu_item_with_mnemonic(menu, "Show shaders", "ToggleShowShaders"); } - create_check_menu_item_with_mnemonic (menu, "Shaders Only", "ToggleShowShaderlistOnly"); + if(g_pGameDescription->mGameType != "doom3" && string_empty(g_pGameDescription->getKeyValue("show_wads"))) + { + create_check_menu_item_with_mnemonic (menu, "Shaders Only", "ToggleShowShaderlistOnly"); + } if(g_TextureBrowser.m_tags) { create_menu_item_with_mnemonic(menu, "Show Untagged", "ShowUntagged"); } - gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator); - gtk_widget_show(separator); - g_TextureBrowser.m_shader_info_item = GTK_WIDGET(create_menu_item_with_mnemonic(menu, "Shader Info", "ShaderInfo")); - gtk_widget_set_sensitive(g_TextureBrowser.m_shader_info_item, FALSE); + if(string_empty(g_pGameDescription->getKeyValue("show_wads"))) + { + menu_separator(menu); + g_TextureBrowser.m_shader_info_item = GTK_WIDGET(create_menu_item_with_mnemonic(menu, "Shader Info", "ShaderInfo")); + gtk_widget_set_sensitive(g_TextureBrowser.m_shader_info_item, FALSE); + } return textures_menu_item; } @@ -1643,7 +1647,6 @@ GtkMenuItem* TextureBrowser_constructToolsMenu(GtkMenu* menu) GtkMenuItem* TextureBrowser_constructTagsMenu(GtkMenu* menu) { GtkMenuItem* textures_menu_item = new_sub_menu_item_with_mnemonic("T_ags"); - GtkWidget* separator = gtk_separator_menu_item_new(); if (g_Layout_enableDetachableMenus.m_value) menu_tearoff (menu); @@ -1651,8 +1654,7 @@ GtkMenuItem* TextureBrowser_constructTagsMenu(GtkMenu* menu) create_menu_item_with_mnemonic(menu, "Add tag", "AddTag"); create_menu_item_with_mnemonic(menu, "Rename tag", "RenameTag"); create_menu_item_with_mnemonic(menu, "Delete tag", "DeleteTag"); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator); - gtk_widget_show(separator); + menu_separator(menu); create_menu_item_with_mnemonic(menu, "Copy tags from selected", "CopyTag"); create_menu_item_with_mnemonic(menu, "Paste tags to selected", "PasteTag"); @@ -1843,15 +1845,14 @@ void TextureBrowser_searchTags() path = path.substr(0, pos + 1); TextureDirectory_loadTexture(path.c_str(), name.c_str()); } - - g_TextureBrowser.m_searchedTags = true; - g_TextureBrowser_currentDirectory = tags_searched; - - g_TextureBrowser.m_nTotalHeight = 0; - TextureBrowser_setOriginY(g_TextureBrowser, 0); - TextureBrowser_heightChanged(g_TextureBrowser); - TextureBrowser_updateTitle(); } + g_TextureBrowser.m_searchedTags = true; + g_TextureBrowser_currentDirectory = tags_searched; + + g_TextureBrowser.m_nTotalHeight = 0; + TextureBrowser_setOriginY(g_TextureBrowser, 0); + TextureBrowser_heightChanged(g_TextureBrowser); + TextureBrowser_updateTitle(); } g_slist_free(selected); }