private void RenderInternal(GwenRenderContext ctx) { if (m_resizeCtrl != null && m_resizeCtrl.IsVisible) { if (GwenUtil.GetWorldBound(m_resizeCtrl).Contains(ctx.CurrentMousePos)) { m_resizeCtrl.RenderBound(ctx.Renderer); } } foreach (Node n in m_selection) { Rectangle rect = n.GetWorldBounds(); Color c = ctx.Renderer.DrawColor; RenderSelectionBox(ctx.Renderer, rect); Point textSize = ctx.Renderer.MeasureText(ctx.Font, BaseUtil.PointToString(n.Position)); ctx.Renderer.DrawColor = SceneEdConstants.SelectionCoordBgColor; ctx.Renderer.DrawFilledRect(new Rectangle(rect.X, rect.Y - textSize.Y - 10, textSize.X, textSize.Y)); ctx.Renderer.DrawColor = SceneEdConstants.SelectionCoordTextColor; ctx.Renderer.RenderText(ctx.Font, new Point(rect.X, rect.Y - textSize.Y - 10), BaseUtil.PointToString(n.Position)); if (rect.Contains(ctx.CurrentMousePos) || IsScrolling) { RenderHoveringSelectedNode(ctx.Renderer, ctx, n); } ctx.Renderer.DrawColor = c; } }
public void RenderBound(Gwen.Renderer.Tao renderer) { Color c = renderer.DrawColor; renderer.DrawColor = Color.White; GwenUtil.RenderWorldBound(renderer, this, false); for (int i = 0; i < 10; i++) { Resizer r = GetResizer(i); if (r == null) { continue; } GwenUtil.RenderWorldBound(renderer, r, r.IsHovered); } renderer.DrawColor = c; }