コード例 #1
0
ファイル: GUIContextShape.cs プロジェクト: pilnine/GUIEditor
        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);
            }
        }
コード例 #2
0
ファイル: HotSpot2D.cs プロジェクト: haoransun93/2d
        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 );
        }
コード例 #3
0
ファイル: HotSpot2D.cs プロジェクト: swordlegend/2d
        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);
        }
コード例 #4
0
        /// <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);
            }
        }
コード例 #5
0
ファイル: GUIContextShape.cs プロジェクト: taru00/GUIEditor
        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);
            }
        }