UIRectangle UIRectangle::toGlobal(UIRectangle r) { UIRectangle ret = r; ret.br = toGlobal(ret.br); ret.tl = toGlobal(ret.tl); return ret; }
void UIScrollBar::draw() { glLineWidth ( 1 ); glPushName( _id ) ; if ( _vertical ) vLine(); else hLine(); if ( _vspan < _vrange ) { glPushName( _box.id() ); UIRect b = toGlobal(_box); b.filledRounded(); b.outlineRounded(); glPopName(); } glPopName(); }
bool CurveNode::isInside(const glm::vec2& pos) { glm::vec2 globalPos = toGlobal(pos); return isInsideBB(globalPos, m_AABBs.size()-1, 0); }