Added menu order locked tooltip for distracted people

This commit is contained in:
AlexandreRouma 2022-03-31 01:13:12 +02:00
parent 8d78eb301c
commit 54dd3a77db

View File

@ -88,12 +88,16 @@ bool Menu::draw(bool updateStates) {
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;
draggedId = rawId - 1;
draggedOpt = opt;
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
if (updateStates) { ImGui::SetNextItemOpen(opt.open); }