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

Method showNewCodex

source/frontend/StarCodexInterface.cpp:97–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97bool CodexInterface::showNewCodex() {
98 if (auto newCodex = m_player->codexes()->firstNewCodex()) {
99 for (auto button : m_speciesTabs->buttons()) {
100 if (button->data().getString("species") == newCodex->species()) {
101 m_speciesTabs->select(m_speciesTabs->id(button));
102 break;
103 }
104 }
105 showContents(newCodex);
106 return true;
107 }
108
109 return false;
110}
111
112void CodexInterface::updateSpecies() {
113 String newSpecies = "other";

Callers 1

updateMethod · 0.80

Calls 8

firstNewCodexMethod · 0.80
buttonsMethod · 0.80
getStringMethod · 0.80
codexesMethod · 0.45
dataMethod · 0.45
speciesMethod · 0.45
selectMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected