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

Method setupPageText

source/frontend/StarCodexInterface.cpp:125–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void CodexInterface::setupPageText() {
126 if (m_currentCodex) {
127 m_pageContent->setText(m_currentCodex->page(m_currentPage));
128 m_pageLabelWidget->show();
129 m_pageNumberWidget->setText(strf("{} of {}", m_currentPage + 1, m_currentCodex->pageCount()));
130 m_titleLabel->setText(m_currentCodex->title());
131 m_nextPageButton->setEnabled(m_currentPage < m_currentCodex->pageCount() - 1);
132 m_prevPageButton->setEnabled(m_currentPage > 0);
133 } else {
134 m_pageContent->setText("");
135 m_pageLabelWidget->hide();
136 m_pageNumberWidget->setText("");
137 m_titleLabel->setText("");
138 m_nextPageButton->disable();
139 m_prevPageButton->disable();
140 }
141}
142
143void CodexInterface::updateCodexList() {
144 auto newCodexList = m_player->codexes()->codexes();

Callers

nothing calls this directly

Calls 9

strfFunction · 0.85
pageMethod · 0.80
pageCountMethod · 0.80
setTextMethod · 0.45
showMethod · 0.45
titleMethod · 0.45
setEnabledMethod · 0.45
hideMethod · 0.45
disableMethod · 0.45

Tested by

no test coverage detected