Skip to content

Commit

Permalink
Added option to disable right click context menu when in an outpost/e…
Browse files Browse the repository at this point in the history
…xplorable
  • Loading branch information
Jon committed Apr 8, 2021
1 parent ab04aeb commit a6869d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion GWToolboxdll/Modules/InventoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,12 @@ void InventoryManager::DrawSettingInternal() {
ImGui::Checkbox("Move whole stacks into trade by default", &trade_whole_stacks);
ImGui::ShowHelp("Shift drag to prompt for amount, drag without shift to move the whole stack into trade");
ImGui::Checkbox("Show 'Guild Wars Wiki' link on item context menu", &wiki_link_on_context_menu);
ImGui::ShowHelp("When right clicking an item in inventory");
ImGui::Text("Right click an item to open context menu in:");
ImGui::Indent();
ImGui::Checkbox("Exporable Area", &right_click_context_menu_in_explorable);
ImGui::SameLine();
ImGui::Checkbox("Outpost", &right_click_context_menu_in_outpost);
ImGui::Unindent();
ImGui::Text("Salvage All options:");
ImGui::SameLine();
ImGui::TextDisabled("Note: Salvage All will only salvage items that are identified.");
Expand Down Expand Up @@ -1614,6 +1619,10 @@ void InventoryManager::ItemClickCallback(GW::HookStatus* status, uint32_t type,
pending_item_move_for_trade = item->item_id;
return;
case 999: // Right click (via GWToolbox)
if (!Instance().right_click_context_menu_in_explorable && GW::Map::GetInstanceType() == GW::Constants::InstanceType::Explorable)
return;
if (!Instance().right_click_context_menu_in_outpost && GW::Map::GetInstanceType() == GW::Constants::InstanceType::Outpost)
return;
break;
default:
return;
Expand Down
3 changes: 2 additions & 1 deletion GWToolboxdll/Modules/InventoryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class InventoryManager : public ToolboxUIElement {
bool transaction_listeners_attached = false;

bool wiki_link_on_context_menu = false;

bool right_click_context_menu_in_explorable = true;
bool right_click_context_menu_in_outpost = true;

std::map<GW::Constants::Bag, bool> bags_to_salvage_from = {
{ GW::Constants::Bag::Backpack,true },
Expand Down

0 comments on commit a6869d0

Please sign in to comment.