From: terencehill Date: Sat, 23 Apr 2016 17:22:03 +0000 (+0200) Subject: Do not show any tooltip when the cursor is in a empty area in Settings - Game - Model... X-Git-Tag: xonotic-v0.8.2~932^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4708fd1e3e6a714ed6fba998eefae6555c4392a6;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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)