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

Method setSelected

source/frontend/StarQuestInterface.cpp:200–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void QuestLogInterface::setSelected(WidgetPtr selected) {
201 auto mainQuestList = fetchChild<ListWidget>("scrollArea.verticalLayout.mainQuestList");
202 auto mainQuestListPos = mainQuestList->itemPosition(selected);
203 if (mainQuestListPos != NPos) {
204 mainQuestList->setSelected(mainQuestListPos);
205 return;
206 }
207
208 auto sideQuestList = fetchChild<ListWidget>("scrollArea.verticalLayout.sideQuestList");
209 auto sideQuestListPos = sideQuestList->itemPosition(selected);
210 if (sideQuestListPos != NPos) {
211 sideQuestList->setSelected(sideQuestListPos);
212 return;
213 }
214}
215
216void QuestLogInterface::toggleTracking() {
217 if (auto selected = getSelected()) {

Callers 3

populateMissionsMethod · 0.45
populateCrewMethod · 0.45

Calls 1

itemPositionMethod · 0.80

Tested by

no test coverage detected