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

Method closeGUI

src/interface/interface.cpp:7373–7430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7371}
7372
7373void GenericGUIMenu::closeGUI()
7374{
7375 bool wasOpen = guiActive;
7376 tinkeringFreeLists();
7377 scribingFreeLists();
7378 guiActive = false;
7379 auto prevGUI = guiType;
7380 guiType = GUI_TYPE_NONE;
7381 basePotion = nullptr;
7382 secondaryPotion = nullptr;
7383 alembicItem = nullptr;
7384 itemEffectUsingSpell = false;
7385 itemEffectUsingSpellbook = false;
7386 itemEffectScrollItem = nullptr;
7387 itemEffectItemType = 0;
7388 itemEffectItemBeatitude = 0;
7389 transmuteItemTarget = nullptr;
7390 transmuteItemScroll = 0;
7391 if ( prevGUI == GUI_TYPE_ITEMFX && itemfxGUI.currentMode == ItemEffectGUI_t::ITEMFX_MODE_SCEPTER_CHARGE )
7392 {
7393 if ( players[gui_player]->inventory_mode == INVENTORY_MODE_SPELL )
7394 {
7395 players[gui_player]->inventory_mode = INVENTORY_MODE_ITEM;
7396 }
7397 }
7398 itemfxGUI.currentMode = ItemEffectGUI_t::ITEMFX_MODE_NONE;
7399 if ( tinkerGUI.bOpen )
7400 {
7401 tinkerGUI.closeTinkerMenu();
7402 }
7403 if ( alchemyGUI.bOpen )
7404 {
7405 alchemyGUI.closeAlchemyMenu();
7406 }
7407 if ( mailboxGUI.bOpen )
7408 {
7409 mailboxGUI.closeMailMenu();
7410 }
7411 if ( featherGUI.bOpen )
7412 {
7413 featherGUI.closeFeatherMenu();
7414 }
7415 if ( itemfxGUI.bOpen )
7416 {
7417 itemfxGUI.closeItemEffectMenu();
7418 }
7419 if ( assistShrineGUI.bOpen )
7420 {
7421 assistShrineGUI.closeAssistShrine();
7422 }
7423 if ( wasOpen )
7424 {
7425 players[gui_player]->inventoryUI.tooltipDelayTick = ticks + TICKS_PER_SECOND / 10;
7426 }
7427 alembicEntityUid = 0;
7428 workstationEntityUid = 0;
7429 mailboxEntityUid = 0;
7430}

Callers 15

openGUIMethod · 0.95
ingameHudFunction · 0.80
net.cppFile · 0.80
useItemFunction · 0.80
openStatusScreenMethod · 0.80
closeAllGUIsMethod · 0.80
updateTinkerMenuMethod · 0.80
createTinkerMenuMethod · 0.80
updateAlchemyMenuMethod · 0.80
createAlchemyMenuMethod · 0.80
updateFeatherMenuMethod · 0.80
createFeatherMenuMethod · 0.80

Calls 6

closeTinkerMenuMethod · 0.80
closeAlchemyMenuMethod · 0.80
closeMailMenuMethod · 0.80
closeFeatherMenuMethod · 0.80
closeItemEffectMenuMethod · 0.80
closeAssistShrineMethod · 0.80

Tested by

no test coverage detected