#include <MRRenderClickableRect.h>
Inheritance diagram for MR::BasicClickableRectUiRenderTask:Public Member Functions | |
| BasicClickableRectUiRenderTask ()=default | |
| BasicClickableRectUiRenderTask (const BasicClickableRectUiRenderTask &other) | |
| Don't assign the memebers (except the base), because we want to preserve the state across frames. | |
| BasicClickableRectUiRenderTask & | operator= (const BasicClickableRectUiRenderTask &other) |
| virtual | ~BasicClickableRectUiRenderTask ()=default |
| virtual void | onClick ()=0 |
| This is called when the click happens. | |
| MRVIEWER_API void | earlyBackwardPass (const BackwardPassParams &backParams) override |
This is what ultimately calls onClick() if the certain conditions hold. | |
Public Member Functions inherited from MR::BasicUiRenderTask | |
| virtual | ~BasicUiRenderTask ()=default |
| BasicUiRenderTask ()=default | |
| BasicUiRenderTask (const BasicUiRenderTask &)=default | |
| BasicUiRenderTask (BasicUiRenderTask &&)=default | |
| BasicUiRenderTask & | operator= (const BasicUiRenderTask &)=default |
| BasicUiRenderTask & | operator= (BasicUiRenderTask &&)=default |
| virtual void | renderPass ()=0 |
| This is the main rendering pass. | |
Public Attributes | |
| ImVec2 | clickableCornerA |
| Set those to set the clickable area. Zero both to hovers and clicks. | |
| ImVec2 | clickableCornerB |
| bool | enabled = true |
| bool | isHovered = false |
| Read these to decide how to render. | |
| bool | isActive = false |
Public Attributes inherited from MR::BasicUiRenderTask | |
| float | renderTaskDepth = 0 |
| The tasks are sorted by this depth, descending (larger depth = further away). | |
Additional Inherited Members | |
Public Types inherited from MR::BasicUiRenderTask | |
| enum class | InteractionMask { InteractionMask::mouseHover = 1 << 0 , InteractionMask::mouseScroll = 1 << 1 } |
This is a helper base class for writing BasicUiRenderTasks that let you click a rectangle in the scene. Note, this task relies on preserving state between the frames.