Draw constraints/entities when hovered or selected even if invisible.
This goes really well with the related constraint/request lists, and in general seems very natural.pull/168/head
parent
e388d9fd16
commit
8749a175a6
|
@ -498,7 +498,8 @@ bool Constraint::DoLineExtend(Canvas *canvas, Canvas::hStroke hcs,
|
|||
|
||||
void Constraint::DoLayout(DrawAs how, Canvas *canvas,
|
||||
Vector *labelPos, std::vector<Vector> *refs) {
|
||||
if(!IsVisible()) return;
|
||||
if(!(how == DrawAs::HOVERED || how == DrawAs::SELECTED) &&
|
||||
!IsVisible()) return;
|
||||
|
||||
// Unit vectors that describe our current view of the scene. One pixel
|
||||
// long, not one actual unit.
|
||||
|
@ -1136,7 +1137,7 @@ s:
|
|||
ex = VectorFont::Builtin()->GetExtents(textHeight, s);
|
||||
Vector shift = r.WithMagnitude(ex.x).Plus(
|
||||
u.WithMagnitude(ex.y));
|
||||
|
||||
|
||||
canvas->DrawVectorText(s, textHeight, o.Minus(shift.ScaledBy(0.5)),
|
||||
r.WithMagnitude(1), u.WithMagnitude(1), hcs);
|
||||
if(refs) refs->push_back(o);
|
||||
|
|
|
@ -443,7 +443,8 @@ void Entity::GenerateBezierCurves(SBezierList *sbl) const {
|
|||
}
|
||||
|
||||
void Entity::Draw(DrawAs how, Canvas *canvas) {
|
||||
if(!IsVisible()) return;
|
||||
if(!(how == DrawAs::HOVERED || how == DrawAs::SELECTED) &&
|
||||
!IsVisible()) return;
|
||||
|
||||
int zIndex;
|
||||
if(IsPoint()) {
|
||||
|
|
|
@ -152,11 +152,6 @@ void TextWindow::ScreenHoverConstraint(int link, uint32_t v) {
|
|||
if(!SS.GW.showConstraints) return;
|
||||
|
||||
hConstraint hc = { v };
|
||||
Constraint *c = SK.GetConstraint(hc);
|
||||
if(c->group.v != SS.GW.activeGroup.v) {
|
||||
// Only constraints in the active group are visible
|
||||
return;
|
||||
}
|
||||
SS.GW.hover.Clear();
|
||||
SS.GW.hover.constraint = hc;
|
||||
SS.GW.hover.emphasized = true;
|
||||
|
|
Loading…
Reference in New Issue