From 4708fd1e3e6a714ed6fba998eefae6555c4392a6 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 23 Apr 2016 19:22:03 +0200 Subject: [PATCH] Do not show any tooltip when the cursor is in a empty area in Settings - Game - Models tab, it should be shown only in the tab title --- qcsrc/menu/xonotic/dialog_settings_game.qc | 2 +- qcsrc/menu/xonotic/dialog_settings_game_model.qh | 2 +- qcsrc/menu/xonotic/tab.qh | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/qcsrc/menu/xonotic/dialog_settings_game.qc b/qcsrc/menu/xonotic/dialog_settings_game.qc index 32d29d7dc..d2ce368d1 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game.qc @@ -13,7 +13,7 @@ METHOD(SettingSource, getEntryTooltip, entity(entity this, int i, void(string th { Lazy l = Settings_from(i); entity it = l.m_get(); - if (returns) returns(it.tooltip); + if (returns) returns(it.titleTooltip); return it; } METHOD(SettingSource, reload, int(entity this, string filter)) { return Settings_COUNT; } diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.qh b/qcsrc/menu/xonotic/dialog_settings_game_model.qh index 8ca179d36..8dd6eaecb 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.qh +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.qh @@ -5,7 +5,7 @@ CLASS(XonoticGameModelSettingsTab, XonoticTab) METHOD(XonoticGameModelSettingsTab, fill, void(entity)); METHOD(XonoticGameModelSettingsTab, showNotify, void(entity)); ATTRIB(XonoticGameModelSettingsTab, title, string, _("Models")) - ATTRIB(XonoticGameModelSettingsTab, tooltip, string, _("Customize how players and items are displayed in game")) + ATTRIB(XonoticGameModelSettingsTab, titleTooltip, string, _("Customize how players and items are displayed in game")) ATTRIB(XonoticGameModelSettingsTab, intendedWidth, float, 0.9) ATTRIB(XonoticGameModelSettingsTab, rows, float, 15.5) ATTRIB(XonoticGameModelSettingsTab, columns, float, 5) diff --git a/qcsrc/menu/xonotic/tab.qh b/qcsrc/menu/xonotic/tab.qh index 26fe898bb..b296d2491 100644 --- a/qcsrc/menu/xonotic/tab.qh +++ b/qcsrc/menu/xonotic/tab.qh @@ -19,4 +19,9 @@ CLASS(XonoticTab, Tab) ATTRIB(XonoticTab, rowHeight, float, SKINFONTSIZE_NORMAL * SKINHEIGHT_NORMAL) // pixels ATTRIB(XonoticTab, backgroundImage, string, string_null) + + // using "titleTooltip" instead of "tooltip" so that + // the tooltip search function doesn't find it + // .tooltip should be set only in the item displaying the tab title + ATTRIB(XonoticTab, titleTooltip, string, string_null) ENDCLASS(XonoticTab) -- 2.39.2