MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / populateServerList

Method populateServerList

source/frontend/StarTitleScreen.cpp:346–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344
345
346void TitleScreen::populateServerList(ListWidgetPtr list){
347 if (!m_serverList.isNull()) {
348 list->clear();
349 for (auto const& server : m_serverList.iterateArray()) {
350 auto listItem = list->addItem();
351 listItem->fetchChild<LabelWidget>("address")->setText(server.getString("address"));
352 listItem->fetchChild<LabelWidget>("account")->setText(server.get("account", "").toString());
353 listItem->setData(server);
354 }
355 }
356};
357
358void TitleScreen::initMultiPlayerMenu() {
359 m_multiPlayerMenu = make_shared<Pane>();

Callers

nothing calls this directly

Calls 9

iterateArrayMethod · 0.80
addItemMethod · 0.80
getStringMethod · 0.80
isNullMethod · 0.45
clearMethod · 0.45
setTextMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45
setDataMethod · 0.45

Tested by

no test coverage detected