#pragma once
#include "node_button.h"

class NodeComboBox : public NodeButton
{
public:
    std::function<void(Node* target, int index)> on_select;
    std::vector<std::string> m_data;
    std::vector<std::string> m_items;
    int m_current_index = 0;
    int m_selected_child_index = 0; 
    virtual Node* clone_instantiate() const override;
    virtual void clone_copy(Node* dest) const override;
    virtual void loaded() override;
    virtual void parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr) override;
    void set_index(int index);
    float get_float(int index) const noexcept;
    float get_float() const noexcept;
    int get_int() const noexcept;
};
