More debug added

This commit is contained in:
Bertrand Songis
2020-11-25 10:01:37 +01:00
parent c04826f9ba
commit f90e5b6d71
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -41,6 +41,10 @@ class Layer
parentLayer.focus = Window::getFocus();
}
stack.emplace_back(Layer(window));
TRACE_WINDOWS("New layer added for %s (%d layers)", window->getWindowDebugString().c_str(), stack.size());
for (auto layer: stack) {
TRACE_WINDOWS(" - %s (focus=%s)", layer.main->getWindowDebugString().c_str(), layer.focus ? layer.focus->getWindowDebugString().c_str() : "---");
}
}
static void pop(Window * window)
@@ -61,5 +65,10 @@ class Layer
}
}
}
TRACE_WINDOWS("Layer removed for %s (%d layers)", window->getWindowDebugString().c_str(), stack.size());
for (auto layer: stack) {
TRACE_WINDOWS(" - %s (focus=%s)", layer.main->getWindowDebugString().c_str(), layer.focus ? layer.focus->getWindowDebugString().c_str() : "---");
}
}
};
+7
View File
@@ -163,6 +163,13 @@ class Menu: public ModalWindow
public:
explicit Menu(Window * parent, bool multiple = false);
#if defined(DEBUG_WINDOWS)
std::string getName() const override
{
return "Menu";
}
#endif
void setCancelHandler(std::function<void()> handler)
{