Esempio n. 1
0
        public OldMouseCursorRenderer(EOGame game, OldMapRenderer parentMapRenderer)
        {
            _game = game;
            _parentMapRenderer = parentMapRenderer;

            _contextMenu = new EOMapContextMenu(_game.API);

            _mainCharacter = OldWorld.Instance.MainPlayer.ActiveCharacter;
        }
        public MouseCursorRenderer(EOGame game, OldMapRenderer parentMapRenderer)
        {
            _game = game;
            _parentMapRenderer = parentMapRenderer;

            _mouseCursor   = game.GFXManager.TextureFromResource(GFXTypes.PostLoginUI, 24, true);
            _itemHoverName = new XNALabel(new Rectangle(1, 1, 1, 1), Constants.FontSize08pt75)
            {
                Visible   = true,
                Text      = "",
                ForeColor = Color.White,
                DrawOrder = (int)ControlDrawLayer.BaseLayer + 3,
                AutoSize  = false
            };

            _cursorSourceRect = new Rectangle(0, 0, _mouseCursor.Width / 5, _mouseCursor.Height);

            _contextMenu = new EOMapContextMenu(_game.API);

            _mainCharacter = OldWorld.Instance.MainPlayer.ActiveCharacter;
        }
Esempio n. 3
0
		/* GAME COMPONENT DERIVED METHODS */
		public override void Initialize()
		{
			_rtMapObjAbovePlayer = new RenderTarget2D(Game.GraphicsDevice, 
				Game.GraphicsDevice.PresentationParameters.BackBufferWidth, 
				Game.GraphicsDevice.PresentationParameters.BackBufferHeight,
				false,
				SurfaceFormat.Color,
				DepthFormat.None);

			_rtMapObjBelowPlayer = new RenderTarget2D(Game.GraphicsDevice,
				Game.GraphicsDevice.PresentationParameters.BackBufferWidth, 
				Game.GraphicsDevice.PresentationParameters.BackBufferHeight,
				false,
				SurfaceFormat.Color,
				DepthFormat.None);

			_playerBlend = new BlendState
			{
				BlendFactor = new Color(255, 255, 255, 64),

				AlphaSourceBlend = Blend.One,
				AlphaDestinationBlend = Blend.One,
				AlphaBlendFunction = BlendFunction.Add,

				ColorSourceBlend = Blend.BlendFactor,
				ColorDestinationBlend = Blend.One
			};

			m_contextMenu = new EOMapContextMenu(m_api);

			base.Initialize();
		}