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:
2017-05-14 21:48:25 +01:00
parent 366f233aa0
commit 577a4e4db7
16 changed files with 1028 additions and 838 deletions

14
engine/node_scroll.h Normal file
View 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;
};