aboutsummaryrefslogtreecommitdiff
path: root/src/ui/events/ui_event.cpp
blob: 9f5185ce5010e5faaac07fcca9a3f464159b085a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "ui_event.h"

#include "ui/control.h"

namespace cru::ui::events
{
    Point MouseEventArgs::GetPoint(Control* control, const RectRange range) const
    {
        if (point_.has_value())
            return control->TransformPoint(control->WindowToControl(point_.value()), RectRange::Margin, range);
        return Point();
    }
}