geode/loader/include/Geode/ui/Scrollbar.hpp
HJfod cdaa8ad6dc add all UI-related stuff from API, including index, nodes, actual ui,
resources, md4c; and fix up some minor formatting issues
2022-08-01 18:18:03 +03:00

34 lines
990 B
C++

#pragma once
#include <Geode/Geode.hpp>
namespace geode {
class GEODE_DLL Scrollbar :
public cocos2d::CCLayer
// public ExtMouseDelegate
{
protected:
CCScrollLayerExt* m_target = nullptr;
cocos2d::extension::CCScale9Sprite* m_track;
cocos2d::extension::CCScale9Sprite* m_thumb;
cocos2d::CCPoint m_clickOffset;
float m_width;
bool m_resizeThumb;
bool m_trackIsRotated;
bool m_hoverHighlight;
// bool mouseDownExt(MouseEvent, cocos2d::CCPoint const&) override;
// bool mouseUpExt(MouseEvent, cocos2d::CCPoint const&) override;
// void mouseMoveExt(cocos2d::CCPoint const&) override;
void scrollWheel(float y, float x) override;
void draw() override;
bool init(CCScrollLayerExt*);
public:
void setTarget(CCScrollLayerExt* list);
static Scrollbar* create(CCScrollLayerExt* list);
};
}