MCPcopy Create free account
hub / github.com/TurningWheel/Barony / closeRecipePanel

Method closeRecipePanel

src/interface/interface.cpp:20315–20351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20313 bOpen = true;
20314}
20315void GenericGUIMenu::AlchemyGUI_t::AlchemyRecipes_t::closeRecipePanel()
20316{
20317 if ( alchemy.recipesFrame )
20318 {
20319 alchemy.recipesFrame->setDisabled(true);
20320 }
20321 if ( alchemy.currentView == ALCHEMY_VIEW_RECIPES )
20322 {
20323 alchemy.currentView = ALCHEMY_VIEW_BREW;
20324 }
20325 else if ( alchemy.currentView == ALCHEMY_VIEW_RECIPES_COOK )
20326 {
20327 alchemy.currentView = ALCHEMY_VIEW_COOK;
20328 }
20329 animx = 0.0;
20330 isInteractable = false;
20331 currentScrollRow = 0;
20332 scrollPercent = 0.0;
20333 scrollInertia = 0.0;
20334 scrollAnimateX = scrollSetpoint;
20335 bool wasOpen = bOpen;
20336 bOpen = false;
20337 bFirstTimeSnapCursor = false;
20338 recipeList.clear();
20339 activateRecipeIndex = -1;
20340 alchemy.animRecipeAutoAddToSlot1Uid = 0;
20341 alchemy.animRecipeAutoAddToSlot2Uid = 0;
20342 panelJustifyInverted = false;
20343 if ( wasOpen && alchemy.getSelectedAlchemySlotX() >= 0 )
20344 {
20345 alchemy.selectAlchemySlot(alchemy.ALCH_SLOT_BASE_POTION_X, 0);
20346 if ( alchemy.bOpen )
20347 {
20348 alchemy.warpMouseToSelectedAlchemyItem(nullptr, (Inputs::SET_CONTROLLER));
20349 }
20350 }
20351}
20352
20353void buildRecipeList(const int player)
20354{

Callers 3

changeCurrentViewMethod · 0.80
closeAlchemyMenuMethod · 0.80
createAlchemyMenuMethod · 0.80

Calls 5

selectAlchemySlotMethod · 0.80
setDisabledMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected