]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Open serverinfo dialog with proper coordinats
authorSamual Lenks <samual@xonotic.org>
Sat, 28 Dec 2013 19:41:14 +0000 (14:41 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 28 Dec 2013 19:41:14 +0000 (14:41 -0500)
qcsrc/menu/xonotic/serverlist.c

index e2a0e6c1249f401847c51e27b40ebef94bd935cd..aa4132274fc76ccce8e8670b10d70018467bf94f 100644 (file)
@@ -956,7 +956,10 @@ void ServerList_Info_Click(entity btn, entity me)
 {
        if (me.nItems != 0)
                main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
-       DialogOpenButton_Click(me, main.serverInfoDialog);
+
+       vector org = boxToGlobal(eY * (me.selectedItem * me.itemHeight - me.scrollPos), me.origin, me.size);
+       vector sz = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), me.size);
+       DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
 }
 void XonoticServerList_clickListBoxItem(entity me, float i, vector where)
 {