mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 16:22:32 +03:00
feat(ui): add CSimpleSlider::OnLayerMouseDown
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -133,6 +133,16 @@ void CSimpleSlider::OnLayerHide() {
|
|||||||
this->CSimpleFrame::OnLayerHide();
|
this->CSimpleFrame::OnLayerHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t CSimpleSlider::OnLayerMouseDown(const CMouseEvent& evt, const char* btn) {
|
||||||
|
// TODO something like CSimpleFrame::IsEnabled or CSimpleFrame::GetFrameFlag
|
||||||
|
if (!(this->m_flags & 0x400)) {
|
||||||
|
this->m_buttonDown = 1;
|
||||||
|
this->OnLayerTrackUpdate(evt);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this->CSimpleFrame::OnLayerMouseDown(evt, btn);
|
||||||
|
}
|
||||||
|
|
||||||
int32_t CSimpleSlider::OnLayerTrackUpdate(const CMouseEvent& evt) {
|
int32_t CSimpleSlider::OnLayerTrackUpdate(const CMouseEvent& evt) {
|
||||||
if (this->m_buttonDown && this->m_thumbTexture) {
|
if (this->m_buttonDown && this->m_thumbTexture) {
|
||||||
auto thumbTexture = this->m_thumbTexture;
|
auto thumbTexture = this->m_thumbTexture;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class CSimpleSlider : public CSimpleFrame {
|
|||||||
virtual void OnLayerHide();
|
virtual void OnLayerHide();
|
||||||
virtual void OnLayerUpdate(float elapsedSec);
|
virtual void OnLayerUpdate(float elapsedSec);
|
||||||
virtual int32_t OnLayerTrackUpdate(const CMouseEvent& evt);
|
virtual int32_t OnLayerTrackUpdate(const CMouseEvent& evt);
|
||||||
|
virtual int32_t OnLayerMouseDown(const CMouseEvent& evt, const char* btn);
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
CSimpleSlider(CSimpleFrame* parent)
|
CSimpleSlider(CSimpleFrame* parent)
|
||||||
|
|||||||
Reference in new issue
Block a user