xm_player/src/widget/label.hpp

24 lines
664 B
C++

#pragma once
#include "holly/ta_parameter.hpp"
#include "ta_multiwriter.hpp"
#include "widget/widget.hpp"
namespace widget {
struct label : widget {
const char * const value;
const int value_length;
inline label(float _width, float _height, const char * value)
: widget(0, 0, _width, _height), value(value), value_length(str_length(value))
{ }
inline label(float _x, float _y, float _width, float _height, const char * value)
: widget(_x, _y, _width, _height), value(value), value_length(str_length(value))
{ }
void draw_label(ta_parameter_writer& writer) const;
void draw(ta_multiwriter& multi) override;
};
}