From: terencehill Date: Sat, 31 Mar 2018 00:32:28 +0000 (+0200) Subject: Menu: fix #1992 "Tooltips don't work in Game Settings tabs" X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fterencehill%2Fmenu_gamesettings_fixes;p=xonotic%2Fxonotic-data.pk3dir.git Menu: fix #1992 "Tooltips don't work in Game Settings tabs" --- diff --git a/qcsrc/menu/xonotic/dialog_settings_game.qc b/qcsrc/menu/xonotic/dialog_settings_game.qc index f2864030a..0530271c0 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game.qc @@ -92,6 +92,14 @@ CONSTRUCTOR(XonoticRegisteredSettingsList, DataSource _source) { this.refilter(this); } +METHOD(XonoticGameSettingsTab, itemFromPoint, entity(entity this, vector pos)) +{ + entity it = SUPER(XonoticGameSettingsTab).itemFromPoint(this, pos); + if (it == this.currentPanel) + return it.currentPanel; // skip XonoticScrollPanel and XonoticTab, return XonoticGameXxxSettingsTab + return it; +} + METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this)) { entity s = this.currentPanel; diff --git a/qcsrc/menu/xonotic/dialog_settings_game.qh b/qcsrc/menu/xonotic/dialog_settings_game.qh index c9617f582..665256a92 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game.qh +++ b/qcsrc/menu/xonotic/dialog_settings_game.qh @@ -43,6 +43,7 @@ CLASS(XonoticGameSettingsTab, XonoticTab) ATTRIB(XonoticGameSettingsTab, currentItem, entity); METHOD(XonoticGameSettingsTab, topicChangeNotify, void(entity, entity this)); METHOD(XonoticGameSettingsTab, fill, void(entity this)); + METHOD(XonoticGameSettingsTab, itemFromPoint, entity(entity this, vector pos)); INIT(XonoticGameSettingsTab) { this.configureDialog(this);