#include "specter/ScrollView.hpp" #include #include "specter/Button.hpp" #include "specter/IViewManager.hpp" #include "specter/RootView.hpp" #include "specter/ViewResources.hpp" #include namespace specter { #define MAX_SCROLL_SPEED 100 ScrollView::ScrollView(ViewResources& res, View& parentView, Style style) : View(res, parentView), m_style(style), m_sideButtonBind(*this, rootView().viewManager()) { commitResources(res, [&](boo::IGraphicsDataFactory::Context& ctx) -> bool { buildResources(ctx, res); m_vertsBinding.init(ctx, res, 4, m_viewVertBlockBuf); return true; }); if (style == Style::SideButtons) { m_sideButtons[0].m_view = std::make_unique