mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-12 21:42:51 +01:00
Added menu order locked tooltip for distracted people
This commit is contained in:
parent
8d78eb301c
commit
54dd3a77db
@ -88,12 +88,16 @@ bool Menu::draw(bool updateStates) {
|
|||||||
clickedMenuName = opt.name;
|
clickedMenuName = opt.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuClicked && ImGui::IsMouseDragging(ImGuiMouseButton_Left) && draggedMenuName.empty() && clickedMenuName == opt.name && !locked) {
|
bool menuDragged = (menuClicked && ImGui::IsMouseDragging(ImGuiMouseButton_Left) && draggedMenuName.empty() && clickedMenuName == opt.name);
|
||||||
|
if (menuDragged && !locked) {
|
||||||
draggedMenuName = opt.name;
|
draggedMenuName = opt.name;
|
||||||
draggedId = rawId - 1;
|
draggedId = rawId - 1;
|
||||||
draggedOpt = opt;
|
draggedOpt = opt;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (menuDragged) {
|
||||||
|
ImGui::SetTooltip("Menu Order Locked!");
|
||||||
|
}
|
||||||
|
|
||||||
// Draw menu header and menu content. There is a lot of boilerplate because the checkbox has to be drawn before the menu, TODO: fix
|
// Draw menu header and menu content. There is a lot of boilerplate because the checkbox has to be drawn before the menu, TODO: fix
|
||||||
if (updateStates) { ImGui::SetNextItemOpen(opt.open); }
|
if (updateStates) { ImGui::SetNextItemOpen(opt.open); }
|
||||||
|
Loading…
Reference in New Issue
Block a user