Fix UIWindowTitleBar

This commit is contained in:
MrLetsplay 2024-08-23 21:31:10 +02:00
parent 9034c26578
commit 26b532c926
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
2 changed files with 9 additions and 0 deletions

View File

@ -349,6 +349,11 @@ UIWindowTitleBar::UIWindowTitleBar(UIValue height)
addChild(closeButton); addChild(closeButton);
} }
UIWindowTitleBar::~UIWindowTitleBar() {
delete text;
delete closeButton;
}
void UIWindowTitleBar::dragEnter(UIPoint pos, UIPoint screenPos) { void UIWindowTitleBar::dragEnter(UIPoint pos, UIPoint screenPos) {
// TODO // TODO
} }
@ -380,6 +385,8 @@ UIWindow::UIWindow(UIValue x, UIValue y, UIValue w, UIValue h)
} }
UIWindow::~UIWindow() { UIWindow::~UIWindow() {
delete background;
delete titleBar;
} }
UIElementType UIWindow::getType() { UIElementType UIWindow::getType() {

View File

@ -132,6 +132,8 @@ class UIWindowTitleBar: public RectangleElement {
UIWindowTitleBar(UIValue height); UIWindowTitleBar(UIValue height);
virtual ~UIWindowTitleBar();
virtual void dragEnter(UIPoint pos, UIPoint screenPos); virtual void dragEnter(UIPoint pos, UIPoint screenPos);
virtual void drag(UIPoint pos, UIPoint screenPos); virtual void drag(UIPoint pos, UIPoint screenPos);
virtual void dragExit(UIPoint pos, UIPoint screenPos); virtual void dragExit(UIPoint pos, UIPoint screenPos);