#pragma once
#include "node_border.h"

class NodeButtonCustom : public NodeBorder
{
    bool m_active = false;
public:
    glm::vec4 color_normal{ .2, .2, .2, 1 };
    glm::vec4 color_hover{ .3, .3, .3, 1 };
    glm::vec4 color_down{ .4, .4, .4, 1 };
    glm::vec4 color_active{ 1, 0, 0, 1 };
    std::function<void(Node* target)> on_click;
    virtual Node* clone_instantiate() const override;
    virtual void clone_copy(Node* dest) const override;
    virtual void loaded() override;
    bool is_active();
    void set_active(bool active);
    void set_color(const glm::vec4& c);
    virtual kEventResult handle_event(Event* e) override;
    virtual void parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr) override;
};
