public override void RenderShape(VisionViewBase view, ShapeRenderMode mode) { base.RenderShape(view, mode); if (this.Visible == true) { uint iColor = VisionColors.RGBA(0, 255, 255, 255); view.RenderRectangle2D(0, 0, ResolutionX * _editScale, ResolutionY * _editScale, iColor, 1.0f); } }
public override void RenderHotSpot(VisionViewBase view, ShapeRenderMode mode) { base.RenderHotSpot(view, mode); if (!OnScreen) return; Vector2F center2d = Sprite.CenterPosition; view.RenderRectangle2D( center2d.X - 5, center2d.Y - 5, center2d.X + 5, center2d.Y + 5, VisionColors.RGBA(0, 255, 0, 255), 1.0f ); }
public override void RenderHotSpot(VisionViewBase view, ShapeRenderMode mode) { base.RenderHotSpot(view, mode); if (!OnScreen) { return; } Vector2F center2d = Sprite.CenterPosition; view.RenderRectangle2D( center2d.X - 5, center2d.Y - 5, center2d.X + 5, center2d.Y + 5, VisionColors.RGBA(0, 255, 0, 255), 1.0f); }
/// <summary> /// Overridden render function: Let the engine instance render itself and render a box /// </summary> /// <param name="view"></param> /// <param name="mode"></param> public override void RenderShape(VisionViewBase view, ShapeRenderMode mode) { // EngineNode.RenderShape(view, mode); base.RenderShape(view, mode); if (this.Selected == true) { uint iColor = VisionColors.RGBA(0, 0, 255, 255); float fScaleX = UIEditorMessageService.GetInstance().GetResolutionScaleX(); float fScaleY = UIEditorMessageService.GetInstance().GetResolutionScaleY(); float fScreenPosX = PosX; float fScreenPosY = PosY; if (Parent != null && Parent is UIShapeBase) { fScreenPosX += ((UIShapeBase)Parent).PosX; fScreenPosY += ((UIShapeBase)Parent).PosY; } view.RenderRectangle2D(fScreenPosX * fScaleX, fScreenPosY * fScaleY, (fScreenPosX + SizeX) * fScaleX, (fScreenPosY + SizeY) * fScaleY, iColor, 1.0f); } }