split app.cpp into multiple files, add NodeScroll and use it to scroll the side panels, some fixes to the events system
This commit is contained in:
14
engine/node_scroll.h
Normal file
14
engine/node_scroll.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
#include "node_border.h"
|
||||
|
||||
class NodeScroll : public NodeBorder
|
||||
{
|
||||
bool m_dragging = false;
|
||||
glm::vec2 m_drag_start;
|
||||
glm::vec2 m_offset_start;
|
||||
glm::vec2 m_offset;
|
||||
glm::vec2 m_mask{ 0, 1 };
|
||||
public:
|
||||
virtual Node* clone_instantiate() const override;
|
||||
virtual kEventResult handle_event(Event* e) override;
|
||||
};
|
||||
Reference in New Issue
Block a user