Scrolling layout
This commit is contained in:
parent
03b2b5d038
commit
047d67c4fa
14 changed files with 288 additions and 35 deletions
|
|
@ -14,6 +14,9 @@ DebugManager tp::gDebugWidget;
|
|||
bool DebugManager::update(RootWidget* rootWidget, EventHandler& events) {
|
||||
mRootWidget = rootWidget;
|
||||
|
||||
events.setEnableKeyEvents(true);
|
||||
if (events.isPressed(InputID::D)) mDebug = !mDebug;
|
||||
|
||||
if (mDebug) {
|
||||
auto area = rootWidget->mRoot.getAreaT();
|
||||
area.size -= { 400, 0 };
|
||||
|
|
@ -53,12 +56,12 @@ bool DebugManager::update(RootWidget* rootWidget, EventHandler& events) {
|
|||
void DebugManager::drawDebug(RootWidget* rootWidget, Canvas& canvas) {
|
||||
mRootWidget = rootWidget;
|
||||
|
||||
ImGui::Checkbox("Draw debug", &mDebug);
|
||||
|
||||
if (!mDebug) {
|
||||
return;
|
||||
}
|
||||
|
||||
// ImGui::Checkbox("Draw debug", &mDebug);
|
||||
|
||||
ImGui::SameLine(); ImGui::Text("To Toggle processing press k");
|
||||
|
||||
auto& upd = rootWidget->mUpdateManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue