#include "Slider.h" #include "IconButton.h" #include "MaterialIcons.h" #include #include #include #include namespace UI { // TODO: make magic numbers less obnoxius than a unnamed namespace, for now putting them in the class // this is slop slop Slider::Slider(double minValue, double maxValue, double step) : minValue(minValue), maxValue(maxValue), minFormat(minValue), maxFormat(maxValue), step(step), value(minValue) { minSize.height = 28.0f; maxSize.height = 28.0f; auto decrease = std::make_unique(ICON_MS_REMOVE, "", [this]() { stepValue(-1.0); }); configureButton(*decrease); decrease->SetPadding(Thickness(2.0f, 2.0f)); decreaseButton = decrease.get(); auto valueDisplay = std::make_unique