| 155 | } |
| 156 | |
| 157 | void CraftingPane::displayed() { |
| 158 | Pane::displayed(); |
| 159 | |
| 160 | if (auto filterWidget = fetchChild<TextBoxWidget>("filter")) { |
| 161 | filterWidget->setText(""); |
| 162 | filterWidget->blur(); |
| 163 | } |
| 164 | |
| 165 | updateAvailableRecipes(); |
| 166 | |
| 167 | // unlock any recipes specified |
| 168 | if (auto recipeUnlocks = m_settings.opt("initialRecipeUnlocks")) { |
| 169 | for (String itemName : jsonToStringList(*recipeUnlocks)) |
| 170 | m_player->addBlueprint(ItemDescriptor(itemName)); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void CraftingPane::dismissed() { |
| 175 | stopCrafting(); |
nothing calls this directly
no test coverage detected