public override bool Draw(UltimaBatcher2D batcher, int x, int y) { base.Draw(batcher, x, y); ResetHueVector(); if (Var != InfoBarVars.NameNotoriety && ProfileManager.CurrentProfile.InfoBarHighlightType == 1 && _warningLinesHue != 0x0481) { ShaderHueTranslator.GetHueVector(ref HueVector, _warningLinesHue); batcher.Draw2D ( SolidColorTextureCache.GetTexture(Color.White), _data.ScreenCoordinateX, _data.ScreenCoordinateY, _data.Width, 2, ref HueVector ); batcher.Draw2D ( SolidColorTextureCache.GetTexture(Color.White), _data.ScreenCoordinateX, _data.ScreenCoordinateY + Parent.Height - 2, _data.Width, 2, ref HueVector ); } return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector ( ref HueVector, 0, false, Alpha, true ); int middleWidth = Width - _gumpTexture[0].Width - _gumpTexture[2].Width; batcher.Draw2D(_gumpTexture[0], x, y, ref HueVector); batcher.Draw2DTiled ( _gumpTexture[1], x + _gumpTexture[0].Width, y, middleWidth, _gumpTexture[1].Height, ref HueVector ); batcher.Draw2D(_gumpTexture[2], x + Width - _gumpTexture[2].Width, y, ref HueVector); return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (!string.IsNullOrWhiteSpace(_label.Text) && MouseIsOver) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); batcher.Draw ( SolidColorTextureCache.GetTexture(Color.Gray), new Rectangle ( x + 2, y + 5, Width - 4, Height - 10 ), hueVector ); } base.Draw(batcher, x, y); if (_entry.Items != null && _entry.Items.Count != 0) { _moreMenuLabel.Draw(batcher, x + Width - _moreMenuLabel.Width, y + (Height >> 1) - (_moreMenuLabel.Height >> 1) - 1); } return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { //batcher.SetBlendState(_checkerBlend.Value); //batcher.SetStencil(_checkerStencil.Value); //batcher.Draw2D(TransparentTexture, new Rectangle(position.X, position.Y, Width, Height), Vector3.Zero /*ShaderHueTranslator.GetHueVector(0, false, 0.5f, false)*/); //batcher.SetBlendState(null); //batcher.SetStencil(null); //return true; Vector3 hueVector = ShaderHueTranslator.GetHueVector(0, false, 0.5f); //batcher.SetStencil(_checkerStencil.Value); batcher.Draw ( SolidColorTextureCache.GetTexture(Color.Black), new Rectangle ( x, y, Width, Height ), hueVector ); //batcher.SetStencil(null); return(true); }
public override bool Draw(UltimaBatcher2D batcher, int posX, int posY) { if (IsDestroyed) { return(false); } ResetHueVector(); if (ProfileManager.CurrentProfile.NoColorObjectsOutOfRange && Distance > World.ClientViewRange) { HueVector.X = Constants.OUT_RANGE_COLOR; HueVector.Y = 1; } else if (World.Player.IsDead && ProfileManager.CurrentProfile.EnableBlackWhiteEffect) { HueVector.X = Constants.DEAD_RANGE_COLOR; HueVector.Y = 1; } else { ShaderHueTranslator.GetHueVector(ref HueVector, Hue); } //Engine.DebugInfo.EffectsRendered++; DrawStatic (batcher, AnimationGraphic, posX - ((int)Offset.X + 22), posY - ((int)-Offset.Y + 22), ref HueVector); ref StaticTiles data = ref TileDataLoader.Instance.StaticData[Graphic];
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector ( ref HueVector, 0, false, 1.0f - _alpha / 255f, true ); UOTexture texture = GumpsLoader.Instance.GetTexture(Graphic); if (texture != null) { if (ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.BuffBarTime) { batcher.Draw2D(texture, x, y, ref HueVector); return(_gText.Draw(batcher, x - 3, y + texture.Height / 2 - 3, HueVector.Z)); } return(batcher.Draw2D(texture, x, y, ref HueVector)); } return(false); }
public override bool Draw(UltimaBatcher2D batcher, int posX, int posY) { ResetHueVector(); ushort hue = Hue; if (ProfileManager.Current.NoColorObjectsOutOfRange && Distance > World.ClientViewRange) { hue = Constants.OUT_RANGE_COLOR; } else if (World.Player.IsDead && ProfileManager.Current.EnableBlackWhiteEffect) { hue = Constants.DEAD_RANGE_COLOR; } else { hue = 1150; } ShaderHueTranslator.GetHueVector(ref HueVector, hue, false, 0); HueVector.Y = ShaderHueTranslator.SHADER_LIGHTS; //Engine.DebugInfo.EffectsRendered++; ref var index = ref GumpsLoader.Instance.GetValidRefEntry(AnimationGraphic);
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(Hue); var texture = GumpsLoader.Instance.GetGumpTexture(Graphic, out var bounds); if (texture != null) { batcher.DrawTiled ( texture, new Rectangle ( x, y, Percent, Height ), bounds, hueVector ); return(true); } return(false); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); batcher.Draw ( backgroundTexture, new Rectangle ( x, y, Width, Height ), hueVector ); batcher.DrawRectangle ( SolidColorTextureCache.GetTexture(Color.Gray), x, y, Width, Height, hueVector ); base.Draw(batcher, x, y); return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector(ref HueVector, 0, false, Alpha); return(batcher.Draw2D(_texture, x, y, Width, Height, ref HueVector)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (IsDisposed) { return(false); } if (MouseIsOver) { ResetHueVector(); ShaderHueTranslator.GetHueVector ( ref HueVector, 0, false, Alpha, true ); batcher.Draw2D ( _texture, x, y, 0, 0, Width, Height, ref HueVector ); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (IsDisposed) { return(false); } if (MouseIsOver) { Vector3 hueVector = ShaderHueTranslator.GetHueVector ( 0, false, Alpha, true ); batcher.Draw ( _texture, new Vector2(x, y), new Rectangle(0, 0, Width, Height), hueVector ); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector ( 0, false, _alpha / 255f, true ); var texture = GumpsLoader.Instance.GetGumpTexture(Graphic, out var bounds); if (texture != null) { batcher.Draw ( texture, new Vector2(x, y), bounds, hueVector ); if (ProfileManager.CurrentProfile != null && ProfileManager.CurrentProfile.BuffBarTime) { _gText.Draw(batcher, x - 3, y + bounds.Height / 2 - 3, hueVector.Z); } } return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector(ref _hueVector, Hue, false, Alpha); return(batcher.Draw2D(Texture2DCache.GetTexture(Color.Black), x, y, Width, Height, ref _hueVector)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (_gumpTexture == null || _gumpTexture.IsDisposed || IsDisposed) { return(false); } ResetHueVector(); batcher.Draw2D(_gumpTexture, x, y, ref _hueVector); CreateMiniMapTexture(); batcher.Draw2D(_mapTexture, x, y, ref _hueVector); if (_draw) { if (_playerIndicator == null) { _playerIndicator = new Texture2D(batcher.GraphicsDevice, 1, 1); _playerIndicator.SetData(new uint[1] { 0xFFFFFFFF }); _mobilesIndicator = new Texture2D(batcher.GraphicsDevice, 1, 1); _mobilesIndicator.SetData(new[] { Color.White }); } int w = Width >> 1; int h = Height >> 1; foreach (Mobile mob in World.Mobiles) { if (mob == World.Player) { continue; } int xx = mob.X - World.Player.X; int yy = mob.Y - World.Player.Y; int gx = xx - yy; int gy = xx + yy; _hueVector.Z = 0; ShaderHueTranslator.GetHueVector(ref _hueVector, Notoriety.GetHue(mob.NotorietyFlag)); batcher.Draw2D(_mobilesIndicator, x + w + gx, y + h + gy, 2, 2, ref _hueVector); } //DRAW DOT OF PLAYER ResetHueVector(); batcher.Draw2D(_playerIndicator, x + w, y + h, 2, 2, ref _hueVector); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { base.Draw(batcher, x, y); Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); batcher.DrawString(Fonts.Bold, CREDITS, x + _offset.X, y + _offset.Y, hueVector); return(true); }
public override bool Draw(UltimaBatcher2D batcher, int posX, int posY) { if (IsDestroyed || !AllowedToDraw) { return(false); } ResetHueVector(); ushort hue = Hue; if (ProfileManager.CurrentProfile.NoColorObjectsOutOfRange && Distance > World.ClientViewRange) { hue = Constants.OUT_RANGE_COLOR; } else if (World.Player.IsDead && ProfileManager.CurrentProfile.EnableBlackWhiteEffect) { hue = Constants.DEAD_RANGE_COLOR; } ShaderHueTranslator.GetHueVector(ref HueVector, hue); //Engine.DebugInfo.EffectsRendered++; if (FixedDir) { DrawStatic ( batcher, AnimationGraphic, posX, posY, ref HueVector ); } else { posX += (int)Offset.X; posY += (int)(Offset.Y + Offset.Z); DrawStaticRotated ( batcher, AnimationGraphic, posX, posY, 0, 0, AngleToTarget, ref HueVector ); } ref StaticTiles data = ref TileDataLoader.Instance.StaticData[AnimationGraphic];
public override bool Draw(UltimaBatcher2D batcher, int posX, int posY, float depth) { if (!AllowedToDraw || IsDestroyed) { return(false); } ushort graphic = Graphic; ushort hue = Hue; bool partial = ItemData.IsPartialHue; if (ProfileManager.CurrentProfile.HighlightGameObjects && SelectedObject.LastObject == this) { hue = Constants.HIGHLIGHT_CURRENT_OBJECT_HUE; partial = false; } else if (ProfileManager.CurrentProfile.NoColorObjectsOutOfRange && Distance > World.ClientViewRange) { hue = Constants.OUT_RANGE_COLOR; partial = false; } else if (World.Player.IsDead && ProfileManager.CurrentProfile.EnableBlackWhiteEffect) { hue = Constants.DEAD_RANGE_COLOR; partial = false; } Vector3 hueVec = ShaderHueTranslator.GetHueVector(hue, partial, AlphaHue / 255f); bool isTree = StaticFilters.IsTree(graphic, out _); if (isTree && ProfileManager.CurrentProfile.TreeToStumps) { graphic = Constants.TREE_REPLACE_GRAPHIC; } DrawStaticAnimated ( batcher, graphic, posX, posY, hueVec, ProfileManager.CurrentProfile.ShadowsEnabled && ProfileManager.CurrentProfile.ShadowsStatics && (isTree || ItemData.IsFoliage || StaticFilters.IsRock(graphic)), depth ); if (ItemData.IsLight) { Client.Game.GetScene <GameScene>().AddLight(this, this, posX + 22, posY + 22); } return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); base.Draw(batcher, x, y); ResetHueVector(); ShaderHueTranslator.GetHueVector(ref _hueVector, _hue, _isPartial, 0); return(batcher.Draw2D(_texture, x + _tileX, y + _tileY, ref _hueVector)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { var texture = GumpsLoader.Instance.GetGumpTexture(_graphic, out var bounds); Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); if (_tiled) { batcher.DrawTiled ( texture, new Rectangle ( x, y, Width, Height ), new Rectangle ( bounds.X + _rect.X, bounds.Y + _rect.Y, _rect.Width, _rect.Height ), hueVector ); } else { batcher.Draw ( texture, new Rectangle ( x, y, Width, Height ), new Rectangle ( bounds.X + _rect.X, bounds.Y + _rect.Y, _rect.Width, _rect.Height ), hueVector ); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector(ref HueVector, Hue); UOTexture texture = GumpsLoader.Instance.GetTexture(Graphic); if (texture != null) { return(batcher.Draw2DTiled(texture, x, y, Percent, Height, ref HueVector)); } return(false); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector(ref _hueVector, Hue, IsPartialHue, 0); var texture = ArtLoader.Instance.GetTexture(Graphic); if (texture != null) { batcher.Draw2D(texture, x, y, Width, Height, ref _hueVector); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { var texture0 = GumpsLoader.Instance.GetGumpTexture((ushort)(_graphic + 0), out var bounds0); var texture1 = GumpsLoader.Instance.GetGumpTexture((ushort)(_graphic + 1), out var bounds1); var texture2 = GumpsLoader.Instance.GetGumpTexture((ushort)(_graphic + 2), out var bounds2); Vector3 hueVector = ShaderHueTranslator.GetHueVector ( 0, false, Alpha, true ); int middleWidth = Width - bounds0.Width - bounds2.Width; batcher.Draw ( texture0, new Vector2(x, y), bounds0, hueVector ); batcher.DrawTiled ( texture1, new Rectangle ( x + bounds0.Width, y, middleWidth, bounds1.Height ), bounds1, hueVector ); batcher.Draw ( texture2, new Vector2(x + Width - bounds2.Width, y), bounds2, hueVector ); return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); batcher.DrawRectangle ( SolidColorTextureCache.GetTexture(Color.Gray), x - 1, y - 1, _background.Width + 1, _background.Height + 1, hueVector ); return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { ResetHueVector(); ShaderHueTranslator.GetHueVector(ref HueVector, Hue); return(batcher.Draw2D ( SolidColorTextureCache.GetTexture(Color.White), x, y, Width, Height, ref HueVector )); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (_graphic != 0) { var texture = ArtLoader.Instance.GetStaticTexture(_graphic, out var bounds); var rect = ArtLoader.Instance.GetRealArtBounds(_graphic); Vector3 hueVector = ShaderHueTranslator.GetHueVector(_hue, _partial, 1f); Point originalSize = new Point(Width, Height); Point point = new Point(); if (rect.Width < Width) { originalSize.X = rect.Width; point.X = (Width >> 1) - (originalSize.X >> 1); } if (rect.Height < Height) { originalSize.Y = rect.Height; point.Y = (Height >> 1) - (originalSize.Y >> 1); } batcher.Draw ( texture, new Rectangle ( x + point.X, y + point.Y, originalSize.X, originalSize.Y ), new Rectangle ( bounds.X + rect.X, bounds.Y + rect.Y, rect.Width, rect.Height ), hueVector ); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { if (_gumpTexture == null || _gumpTexture.IsDisposed || IsDisposed) { return(false); } ResetHueVector(); batcher.Draw2D(_gumpTexture, x, y, ref HueVector); CreateMiniMapTexture(); batcher.Draw2D(_mapTexture, x, y, ref HueVector); if (_draw) { int w = Width >> 1; int h = Height >> 1; Texture2D mobilesTextureDot = SolidColorTextureCache.GetTexture(Color.Red); foreach (Mobile mob in World.Mobiles) { if (mob == World.Player) { continue; } int xx = mob.X - World.Player.X; int yy = mob.Y - World.Player.Y; int gx = xx - yy; int gy = xx + yy; HueVector.Z = 0; ShaderHueTranslator.GetHueVector(ref HueVector, Notoriety.GetHue(mob.NotorietyFlag)); batcher.Draw2D(mobilesTextureDot, x + w + gx, y + h + gy, 2, 2, ref HueVector); } //DRAW DOT OF PLAYER ResetHueVector(); batcher.Draw2D(SolidColorTextureCache.GetTexture(Color.White), x + w, y + h, 2, 2, ref HueVector); } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(0); var textureFlag = GumpsLoader.Instance.GetGumpTexture(BUTTON_FLAG, out var boundsFlag); var textureButtonUp = GumpsLoader.Instance.GetGumpTexture(BUTTON_UP, out var boundsButtonUp); var textureButtonDown = GumpsLoader.Instance.GetGumpTexture(BUTTON_DOWN, out var boundsButtonDown); if (MaxValue != MinValue && textureFlag != null) { batcher.Draw ( textureFlag, new Vector2(x, y + _sliderPosition), boundsFlag, hueVector ); } if (_showButtons) { if (textureButtonUp != null) { batcher.Draw ( textureButtonUp, new Vector2(x, y), boundsButtonUp, hueVector ); } if (textureButtonDown != null) { batcher.Draw ( textureButtonDown, new Vector2(x, y + Height), boundsButtonDown, hueVector ); } } return(base.Draw(batcher, x, y)); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(0, false, Alpha); batcher.Draw ( _texture, new Rectangle ( x, y, Width, Height ), hueVector ); return(true); }
public override bool Draw(UltimaBatcher2D batcher, int x, int y) { Vector3 hueVector = ShaderHueTranslator.GetHueVector(Hue, false, Alpha); batcher.Draw ( SolidColorTextureCache.GetTexture(Color.Black), new Rectangle ( x, y, Width, Height ), hueVector ); return(true); }