MeshLib C++ Docs
Loading...
Searching...
No Matches
MRRenderClickableRect.h
Go to the documentation of this file.
1#pragma once
2
4#include "MRViewer/exports.h"
5
6#include "MRViewer/MRImGui.h"
7
8namespace MR
9{
12
13
17{
18public:
20
23 BasicClickableRectUiRenderTask& operator=( const BasicClickableRectUiRenderTask& other ) { BasicUiRenderTask::operator=( other ); return *this; }
24
26
28 virtual void onClick() = 0;
29
31 MRVIEWER_API void earlyBackwardPass( const BackwardPassParams& backParams ) override;
32
36
39 bool enabled = true;
40
42 bool isHovered = false;
43 bool isActive = false;
44};
45
46}
Definition MRRenderClickableRect.h:17
virtual void onClick()=0
This is called when the click happens.
ImVec2 clickableCornerA
Set those to set the clickable area. Zero both to hovers and clicks.
Definition MRRenderClickableRect.h:34
MRVIEWER_API void earlyBackwardPass(const BackwardPassParams &backParams) override
This is what ultimately calls onClick() if the certain conditions hold.
virtual ~BasicClickableRectUiRenderTask()=default
BasicClickableRectUiRenderTask(const BasicClickableRectUiRenderTask &other)
Don't assign the memebers (except the base), because we want to preserve the state across frames.
Definition MRRenderClickableRect.h:22
ImVec2 clickableCornerB
Definition MRRenderClickableRect.h:35
BasicClickableRectUiRenderTask & operator=(const BasicClickableRectUiRenderTask &other)
Definition MRRenderClickableRect.h:23
@ other
Angle, normally float. Measure in radians.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRIRenderObject.h:84
IRenderObject::renderUi() can emit zero or more or more of those tasks. They are sorted by depth ever...
Definition MRIRenderObject.h:64