From: Samual Lenks Date: Sat, 28 Dec 2013 19:41:14 +0000 (-0500) Subject: Open serverinfo dialog with proper coordinats X-Git-Tag: xonotic-v0.8.0~139^2~1^2~42 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8bd68838f6d478c8aa6a4aef95499ffc404c2e7d;p=xonotic%2Fxonotic-data.pk3dir.git Open serverinfo dialog with proper coordinats --- diff --git a/qcsrc/menu/xonotic/serverlist.c b/qcsrc/menu/xonotic/serverlist.c index e2a0e6c12..aa4132274 100644 --- a/qcsrc/menu/xonotic/serverlist.c +++ b/qcsrc/menu/xonotic/serverlist.c @@ -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) {