mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-02 23:18:07 +02:00
Added option to lock the menu order
This commit is contained in:
@ -88,7 +88,7 @@ bool Menu::draw(bool updateStates) {
|
||||
clickedMenuName = opt.name;
|
||||
}
|
||||
|
||||
if (menuClicked && ImGui::IsMouseDragging(ImGuiMouseButton_Left) && draggedMenuName.empty() && clickedMenuName == opt.name) {
|
||||
if (menuClicked && ImGui::IsMouseDragging(ImGuiMouseButton_Left) && draggedMenuName.empty() && clickedMenuName == opt.name && !locked) {
|
||||
draggedMenuName = opt.name;
|
||||
draggedId = rawId - 1;
|
||||
draggedOpt = opt;
|
||||
|
@ -27,9 +27,12 @@ public:
|
||||
|
||||
std::vector<MenuOption_t> order;
|
||||
|
||||
bool locked = false;
|
||||
|
||||
private:
|
||||
bool isInOrderList(std::string name);
|
||||
|
||||
|
||||
bool menuClicked = false;
|
||||
std::string clickedMenuName = "";
|
||||
std::string draggedMenuName = "";
|
||||
|
Reference in New Issue
Block a user