MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getSelectedServer

Method getSelectedServer

src/bzflag/HUDuiServerList.cpp:392–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392ServerItem* HUDuiServerList::getSelectedServer() {
393 if (items.size() <= 0) {
394 return NULL;
395 }
396
397 std::list<HUDuiControl*>::iterator it;
398 it = items.begin();
399 std::advance(it, getSelected());
400
401 HUDuiServerListItem* selected = (HUDuiServerListItem*) *it;
402 return dataList.lookupServer(selected->getServerKey());
403}
404
405HUDuiServerListItem* HUDuiServerList::get(size_t _index) {
406 if (_index >= getSize()) {

Callers 3

keyPressMethod · 0.80
executeMethod · 0.80
updateStatusMethod · 0.80

Calls 4

lookupServerMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
getServerKeyMethod · 0.45

Tested by

no test coverage detected