]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Menu: fix #1992 "Tooltips don't work in Game Settings tabs" terencehill/menu_gamesettings_fixes
authorterencehill <piuntn@gmail.com>
Sat, 31 Mar 2018 00:32:28 +0000 (02:32 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 31 Mar 2018 00:32:28 +0000 (02:32 +0200)
qcsrc/menu/xonotic/dialog_settings_game.qc
qcsrc/menu/xonotic/dialog_settings_game.qh

index f2864030a9db911de4a0341aca01d450a5a4fce6..0530271c04ec18f6bf947ed8c833c05a4e02c867 100644 (file)
@@ -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;
index c9617f582f55fa01e9caefeb624cdbc54e9ae180..665256a9258448d76e65263cba7c4d63f3f1a6c9 100644 (file)
@@ -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);