ATTRIB(XonoticServerList, rowsPerItem, float, 1)
METHOD(XonoticServerList, draw, void(entity))
METHOD(XonoticServerList, drawListBoxItem, void(entity, float, vector, float))
ATTRIB(XonoticServerList, rowsPerItem, float, 1)
METHOD(XonoticServerList, draw, void(entity))
METHOD(XonoticServerList, drawListBoxItem, void(entity, float, vector, float))
- METHOD(XonoticServerList, clickListBoxItem, void(entity, float, vector))
+ METHOD(XonoticServerList, doubleClickListBoxItem, void(entity, float, vector))
METHOD(XonoticServerList, resizeNotify, void(entity, vector, vector, vector, vector))
METHOD(XonoticServerList, keyDown, float(entity, float, float, float))
METHOD(XonoticServerList, toggleFavorite, void(entity, string))
METHOD(XonoticServerList, resizeNotify, void(entity, vector, vector, vector, vector))
METHOD(XonoticServerList, keyDown, float(entity, float, float, float))
METHOD(XonoticServerList, toggleFavorite, void(entity, string))
ATTRIB(XonoticServerList, infoButton, entity, NULL)
ATTRIB(XonoticServerList, currentSortOrder, float, 0)
ATTRIB(XonoticServerList, currentSortField, float, -1)
ATTRIB(XonoticServerList, infoButton, entity, NULL)
ATTRIB(XonoticServerList, currentSortOrder, float, 0)
ATTRIB(XonoticServerList, currentSortField, float, -1)
- ATTRIB(XonoticServerList, lastClickedServer, float, -1)
- ATTRIB(XonoticServerList, lastClickedTime, float, 0)
ATTRIB(XonoticServerList, ipAddressBoxFocused, float, -1)
ATTRIB(XonoticServerList, ipAddressBoxFocused, float, -1)
SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", ZCTX(_("SLCAT^Competitive Mode"))) \
SLIST_CATEGORY(CAT_MODIFIED, "", "CAT_SERVERS", ZCTX(_("SLCAT^Modified Servers"))) \
SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", ZCTX(_("SLCAT^Overkill Mode"))) \
SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", ZCTX(_("SLCAT^Competitive Mode"))) \
SLIST_CATEGORY(CAT_MODIFIED, "", "CAT_SERVERS", ZCTX(_("SLCAT^Modified Servers"))) \
SLIST_CATEGORY(CAT_OVERKILL, "", "CAT_SERVERS", ZCTX(_("SLCAT^Overkill Mode"))) \
- SLIST_CATEGORY(CAT_MINSTAGIB, "", "CAT_SERVERS", ZCTX(_("SLCAT^MinstaGib Mode"))) \
+ SLIST_CATEGORY(CAT_INSTAGIB, "", "CAT_SERVERS", ZCTX(_("SLCAT^InstaGib Mode"))) \
SLIST_CATEGORY(CAT_DEFRAG, "", "CAT_SERVERS", ZCTX(_("SLCAT^Defrag Mode")))
#define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override
SLIST_CATEGORY(CAT_DEFRAG, "", "CAT_SERVERS", ZCTX(_("SLCAT^Defrag Mode")))
#define SLIST_CATEGORY_AUTOCVAR(name) autocvar_menu_slist_categories_##name##_override
// old servers which don't report their mod name are considered modified now
case "": { return CAT_MODIFIED; }
// old servers which don't report their mod name are considered modified now
case "": { return CAT_MODIFIED; }
case "overkill": { return CAT_OVERKILL; }
//case "nix": { return CAT_NIX; }
//case "newtoys": { return CAT_NEWTOYS; }
case "overkill": { return CAT_OVERKILL; }
//case "nix": { return CAT_NIX; }
//case "newtoys": { return CAT_NEWTOYS; }
if(time < me.nextRefreshTime)
{
//print("sorry, no refresh yet\n");
if(time < me.nextRefreshTime)
{
//print("sorry, no refresh yet\n");
me.toggleFavorite(me, me.ipAddressBox.text);
me.ipAddressBoxFocused = -1;
}
me.toggleFavorite(me, me.ipAddressBox.text);
me.ipAddressBoxFocused = -1;
}
- 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);
- if(i == me.lastClickedServer)
- if(time < me.lastClickedTime + 0.3)
- {
- // DOUBLE CLICK!
- ServerList_Connect_Click(NULL, me);
- }
- me.lastClickedServer = i;
- me.lastClickedTime = time;
+ ServerList_Connect_Click(NULL, me);
}
void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
{
}
void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
{
float m, pure, freeslots, j, sflags;
string s, typestr, versionstr, k, v, modname;
float m, pure, freeslots, j, sflags;
string s, typestr, versionstr, k, v, modname;
- //print(sprintf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems));
+ //printf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems);
main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
return 1;
main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
return 1;