#pragma once
#include "node_border.h"
#include "node_text.h"

class NodeTextInput : public NodeBorder
{
public:
    float timer = 0;
    NodeText* m_text;
    NodeBorder* m_cursor;
    std::string m_string;
    std::function<void(NodeTextInput*target)> on_return;
    virtual Node* clone_instantiate() const override;
    virtual void clone_finalize(Node* dest) const override;
    virtual void init() override;
    virtual void on_tick(float dt) override;
    virtual kEventResult handle_event(Event* e) override;
    void init_controls();
    void set_text(const std::string& s);
};
