Reorganize code in widgets

This commit is contained in:
IlyaShurupov 2024-10-14 16:41:13 +03:00 committed by Ilya Shurupov
parent 837d8dc507
commit e00dec67ba
31 changed files with 652 additions and 481 deletions

View file

@ -0,0 +1,25 @@
#pragma once
#include "Widget.hpp"
namespace tp {
class DebugManager {
public:
DebugManager() = default;
bool isRedrawAlways() const { return mDebugRedrawAlways; }
bool update(RootWidget* rootWidget, EventHandler& events);
void drawDebug(RootWidget* rootWidget, Canvas& canvas);
private:
void recursiveDraw(Canvas& canvas, Widget* active, const Vec2F& pos, int depthOrder);
static void widgetMenu(Widget*);
private:
// debug
bool mDebug = true;
bool mDebugStopProcessing = false;
bool mDebugRedrawAlways = false;
};
}