MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / drawSelectionContextMenu

Function drawSelectionContextMenu

App/GUI/interface/interface.cpp:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 void drawSelectionContextMenu(UiState& uiState) {
72 constexpr const char* kPopupId = "##selection_context_menu";
73
74 if (uiState.openSelectionContextMenu) {
75 ImGui::SetNextWindowPos(ImVec2(uiState.selectionContextMenuX, uiState.selectionContextMenuY));
76 ImGui::OpenPopup(kPopupId);
77 uiState.openSelectionContextMenu = false;
78 }
79
80 if (ImGui::BeginPopup(kPopupId)) {
81 if (ImGui::MenuItem("Зафиксировать")) {
82 ToolsManager::setSelectedAtomsFixed(true);
83 }
84 if (ImGui::MenuItem("Отфиксировать")) {
85 ToolsManager::setSelectedAtomsFixed(false);
86 }
87 ImGui::EndPopup();
88 }
89 }
90}
91
92Interface::Interface(GLFWwindow* w, Lattice::Simulation& s, std::unique_ptr<BaseRenderer>& r, CaptureController& c)

Callers 1

updateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected