public override void Draw(SpriteBatchUI spriteBatch, Point position) { Vector3 hueVector = Utility.GetHueVector(Hue); int width = (int)(m_PercentWidthDrawn * Width); spriteBatch.Draw2D(m_Texture, new Rectangle(position.X, position.Y, width, Height), new Rectangle(0, 0, width, Height), hueVector); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { bool isMouseOver = (m_BG[0].IsMouseOver || m_BG[1].IsMouseOver || m_BG[2].IsMouseOver); if (m_IsMouseDown) { m_BG[0].IsVisible = false; m_BG[1].IsVisible = false; m_BG[2].IsVisible = true; } else if (isMouseOver) { m_BG[0].IsVisible = false; m_BG[1].IsVisible = true; m_BG[2].IsVisible = false; } else { m_BG[0].IsVisible = true; m_BG[1].IsVisible = false; m_BG[2].IsVisible = false; } if (m_IsMouseDown) m_Caption.Position = new Point(m_Caption.Position.X, m_Caption.Position.Y + 1); base.Draw(spriteBatch, position); if (m_IsMouseDown) m_Caption.Position = new Point(m_Caption.Position.X, m_Caption.Position.Y - 1); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { AEntity player = WorldModel.Entities.GetPlayerEntity(); float x = (float)Math.Round((player.Position.X % 256) + player.Position.X_offset) / 256f; float y = (float)Math.Round((player.Position.Y % 256) + player.Position.Y_offset) / 256f; Vector3 playerPosition = new Vector3(x - y, x + y, 0f); float minimapU = (m_GumpTexture.Width / 256f) / 2f; float minimapV = (m_GumpTexture.Height / 256f) / 2f; VertexPositionNormalTextureHue[] v = new VertexPositionNormalTextureHue[4] { new VertexPositionNormalTextureHue(new Vector3(position.X, position.Y, 0), playerPosition + new Vector3(-minimapU, -minimapV, 0), new Vector3(0, 0, 0)), new VertexPositionNormalTextureHue(new Vector3(position.X + Width, position.Y, 0), playerPosition + new Vector3(minimapU, -minimapV, 0), new Vector3(1, 0, 0)), new VertexPositionNormalTextureHue(new Vector3(position.X, position.Y + Height, 0), playerPosition + new Vector3(-minimapU, minimapV, 0), new Vector3(0, 1, 0)), new VertexPositionNormalTextureHue(new Vector3(position.X + Width, position.Y + Height, 0), playerPosition + new Vector3(minimapU, minimapV, 0), new Vector3(1, 1, 0)) }; spriteBatch.Draw(m_GumpTexture, v, Techniques.MiniMap); if (UltimaGame.TotalMS % 500f < 250f) { if (m_PlayerIndicator == null) { m_PlayerIndicator = new Texture2D(spriteBatch.GraphicsDevice, 1, 1); m_PlayerIndicator.SetData<uint>(new uint[1] { 0xFFFFFFFF }); } spriteBatch.Draw2D(m_PlayerIndicator, new Vector3(position.X + Width / 2, position.Y + Height / 2 - 8, 0), Vector3.Zero); } }
public void Draw(SpriteBatchUI spriteBatch, int x, int y) { // determine if properties need to be updated. if (m_Entity != null && m_PropertyListHash != m_Entity.PropertyList.Hash) { m_PropertyListHash = m_Entity.PropertyList.Hash; Caption = m_Entity.PropertyList.Properties; } // update text if necessary. if (m_RenderedText == null) { m_RenderedText = new RenderedText("<center>" + Caption, 300, true); } else if (m_RenderedText.Text != "<center>" + Caption) { m_RenderedText = null; m_RenderedText = new RenderedText("<center>" + Caption, 300, true); } // draw checkered trans underneath. spriteBatch.Draw2DTiled(CheckerTrans.CheckeredTransTexture, new Rectangle(x - 4, y - 4, m_RenderedText.Width + 8, m_RenderedText.Height + 8), Vector3.Zero); // draw tooltip contents m_RenderedText.Draw(spriteBatch, new Point(x, y)); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { if (m_Texture == null) { IResourceProvider provider = ServiceRegistry.GetService<IResourceProvider>(); if (IsFemale) { int index = Item.ItemData.AnimID + 60000; int indexTranslated, hueTranslated; if (GumpDefTranslator.ItemHasGumpTranslation(index, out indexTranslated, out hueTranslated)) { index = indexTranslated; m_HueOverride = hueTranslated; m_Texture = provider.GetUITexture(index); } } if (m_Texture == null) { int index = Item.ItemData.AnimID + 50000; int indexTranslated, hueTranslated; if (GumpDefTranslator.ItemHasGumpTranslation(index, out indexTranslated, out hueTranslated)) { index = indexTranslated; m_HueOverride = hueTranslated; m_Texture = provider.GetUITexture(index); } m_Texture = provider.GetUITexture(index); } Size = new Point(m_Texture.Width, m_Texture.Height); } int hue = (Item.Hue == 0 & m_HueOverride != 0) ? m_HueOverride : Item.Hue; spriteBatch.Draw2D(m_Texture, new Vector3(position.X, position.Y, 0), Utility.GetHueVector(hue)); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { Texture2D worldTexture = (m_Model.GetView() as WorldView).Isometric.Texture; m_InputMultiplier = new Vector2((float)worldTexture.Width / Width, (float)worldTexture.Height / Height); spriteBatch.Draw2D(worldTexture, new Rectangle(position.X, position.Y, Width, Height), Vector3.Zero); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position, double frameMS) { base.Draw(spriteBatch, position, frameMS); if (Caption != string.Empty) { int yoffset = IsMouseDownOnThis ? 2 : 1; m_Caption.Draw(spriteBatch, new Point( position.X + (Width - m_Caption.Width) / 2, position.Y + yoffset + (Height - m_Caption.Height) / 2)); } }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { int y = m_TextEntry.Y + position.Y - 6; for (int i = m_TextEntries.Count - 1; i >= 0; i--) { y -= m_TextEntries[i].TextHeight; m_TextEntries[i].Draw(spriteBatch, new Point(position.X + 2, y)); } base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { base.Draw(spriteBatch, position); if (IsChecked && m_Active != null) { spriteBatch.Draw2D(m_Active, new Vector3(position.X, position.Y, 0), Vector3.Zero); } else if (!IsChecked && m_Inactive != null) { spriteBatch.Draw2D(m_Inactive, new Vector3(position.X, position.Y, 0), Vector3.Zero); } }
public void Initialize() { m_SpriteBatch = Service.Get<SpriteBatchUI>(); Texture = new Texture2D(m_SpriteBatch.GraphicsDevice, (int)Stride, (int)Stride); m_TextureData = new uint[Stride * Stride]; m_BlockColors = new uint[TilesPerBlock]; m_BlockCache = new MiniMapChunk[BlockCacheWidth * BlockCacheHeight]; m_MustRedrawEntireTexture = true; m_QueuedToDrawBlocks = new List<uint>(); }
public void Draw(SpriteBatchUI spriteBatch, int x, int y) { // draw checkered trans underneath. if (m_RenderedText == null) { m_RenderedText = new RenderedText(Caption, 200); } spriteBatch.Draw2DTiled(Controls.CheckerTrans.CheckeredTransTexture, new Rectangle(x - 4, y - 4, m_RenderedText.Width + 8, m_RenderedText.Height + 8), Vector3.Zero); m_RenderedText.Draw(spriteBatch, new Point(x, y)); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { if (m_texture == null) { if (IsFemale) m_texture = IO.GumpData.GetGumpXNA(Item.ItemData.AnimID + 60000); if (m_texture == null) m_texture = IO.GumpData.GetGumpXNA(Item.ItemData.AnimID + 50000); Size = new Point(m_texture.Width, m_texture.Height); } spriteBatch.Draw2D(m_texture, new Vector3(position.X, position.Y, 0), Utility.GetHueVector(Item.Hue)); base.Draw(spriteBatch, position); }
protected virtual void BeforeDraw(SpriteBatchUI spritebatch, Point position) { // Over the interface or not in world. Display a default cursor. int artworkIndex = 8305; if (WorldModel.IsInWorld && WorldModel.Entities.GetPlayerEntity().Flags.IsWarMode) { // if in warmode, show the red-hued cursor. artworkIndex -= 23; } CursorSpriteArtIndex = artworkIndex; CursorOffset = new Point(-1, 1); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { if (m_texture == null) { m_texture = IO.ArtData.GetStaticTexture(Item.DisplayItemID); Size = new Point(m_texture.Width, m_texture.Height); } Vector3 hue = Utility.GetHueVector(IsMouseOver && HighlightOnMouseOver ? WorldView.MouseOverHue : Item.Hue); if (Item.Amount > 1 && Item.ItemData.IsGeneric) { int offset = Item.ItemData.Unknown4; spriteBatch.Draw2D(m_texture, new Vector3(position.X - offset, position.Y - offset, 0), hue); } spriteBatch.Draw2D(m_texture, new Vector3(position.X, position.Y, 0), hue); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { if (m_Texture == null) { IResourceProvider provider = ServiceRegistry.GetService<IResourceProvider>(); m_Texture = provider.GetItemTexture(Item.DisplayItemID); Size = new Point(m_Texture.Width, m_Texture.Height); } Vector3 hue = Utility.GetHueVector(IsMouseOver && HighlightOnMouseOver ? WorldView.MouseOverHue : Item.Hue); if (Item.Amount > 1 && Item.ItemData.IsGeneric && Item.DisplayItemID == Item.ItemID) { int offset = Item.ItemData.Unknown4; spriteBatch.Draw2D(m_Texture, new Vector3(position.X - 5, position.Y - 5, 0), hue); } spriteBatch.Draw2D(m_Texture, new Vector3(position.X, position.Y, 0), hue); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { base.Draw(spriteBatch, position); Point p = new Point(position.X + 36, position.Y + 35); int height = 0; int maxheight = m_ScrollBar.Value + m_ScrollBar.Height; for (int i = 0; i < m_JournalEntries.Count; i++) { if (height + m_JournalEntries[i].Height <= m_ScrollBar.Value) { // this entry is above the renderable area. height += m_JournalEntries[i].Height; } else if (height + m_JournalEntries[i].Height <= maxheight) { int y = height - m_ScrollBar.Value; if (y < 0) { // this entry starts above the renderable area, but exists partially within it. m_JournalEntries[i].Draw(spriteBatch, new Rectangle(p.X, position.Y + 35, m_JournalEntries[i].Width, m_JournalEntries[i].Height + y), 0, -y); p.Y += m_JournalEntries[i].Height + y; } else { // this entry is completely within the renderable area. m_JournalEntries[i].Draw(spriteBatch, p); p.Y += m_JournalEntries[i].Height; } height += m_JournalEntries[i].Height; } else { int y = maxheight - height; m_JournalEntries[i].Draw(spriteBatch, new Rectangle(p.X, position.Y + 35 + m_ScrollBar.Height - y, m_JournalEntries[i].Width, y), 0, 0); // can't fit any more entries - so we break! break; } } }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { int centerWidth = Width - m_bgGumps[0].Width - m_bgGumps[2].Width; int centerHeight = Height - m_bgGumps[0].Height - m_bgGumps[6].Height; int line2Y = position.Y + m_bgGumps[0].Height; int line3Y = position.Y + Height - m_bgGumps[6].Height; spriteBatch.Draw2D(m_bgGumps[0], new Vector3(position.X, position.Y, 0), Vector3.Zero); spriteBatch.Draw2DTiled(m_bgGumps[1], new Rectangle(position.X + m_bgGumps[0].Width, position.Y, centerWidth, m_bgGumps[0].Height), Vector3.Zero); spriteBatch.Draw2D(m_bgGumps[2], new Vector3(position.X + Width - m_bgGumps[2].Width, position.Y, 0), Vector3.Zero); spriteBatch.Draw2DTiled(m_bgGumps[3], new Rectangle(position.X, line2Y, m_bgGumps[3].Width, centerHeight), Vector3.Zero); spriteBatch.Draw2DTiled(m_bgGumps[4], new Rectangle(position.X + m_bgGumps[3].Width, line2Y, centerWidth, centerHeight), Vector3.Zero); spriteBatch.Draw2DTiled(m_bgGumps[5], new Rectangle(position.X + Width - m_bgGumps[5].Width, line2Y, m_bgGumps[5].Width, centerHeight), Vector3.Zero); spriteBatch.Draw2D(m_bgGumps[6], new Vector3(position.X, line3Y, 0), Vector3.Zero); spriteBatch.Draw2DTiled(m_bgGumps[7], new Rectangle(position.X + m_bgGumps[6].Width, line3Y, centerWidth, m_bgGumps[6].Height), Vector3.Zero); spriteBatch.Draw2D(m_bgGumps[8], new Vector3(position.X + Width - m_bgGumps[8].Width, line3Y, 0), Vector3.Zero); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { int hue = (Key == WinKeys.None) ? 33 : 2; if (IsEditable) { if (m_RenderedText.Width <= Width) { m_RenderedText.Draw(spriteBatch, position, Utility.GetHueVector(hue)); } else { int textOffset = m_RenderedText.Width - (Width); m_RenderedText.Draw(spriteBatch, new Rectangle(position.X, position.Y, m_RenderedText.Width - textOffset, m_RenderedText.Height), textOffset, 0, Utility.GetHueVector(hue)); } } else { m_RenderedText.Draw(spriteBatch, new Rectangle(position.X, position.Y, Width, Height), 0, 0, Utility.GetHueVector(hue)); } base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { IResourceProvider provider = ServiceRegistry.GetService<IResourceProvider>(); m_Inactive = provider.GetUITexture(210); spriteBatch.Draw2D(m_Inactive, new Vector3(position.X, position.Y, 0), Vector3.Zero); spriteBatch.Draw2D(m_huesTexture, new Rectangle(position.X+3, position.Y+3, Width-2, Height-1), Vector3.Zero); if (IsChild && IsMouseOver) { spriteBatch.Draw2D(m_selectedIndicator, new Vector3( (int)(position.X + (float)(Width / m_hueWidth) * ((Index % m_hueWidth) + 0.5f) - m_selectedIndicator.Width / 2), (int)(position.Y + (float)(Height / m_hueHeight) * ((Index / m_hueWidth) + 0.5f) - m_selectedIndicator.Height / 2), 0), Vector3.Zero); } base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { base.Draw(spriteBatch, position); }
protected void DebugDrawBounds(SpriteBatchUI spriteBatch, Point position, Color color) { if (m_BoundsTexture == null) { m_BoundsTexture = new Texture2D(spriteBatch.GraphicsDevice, 1, 1); m_BoundsTexture.SetData<Color>(new Color[] { Color.White }); } Rectangle drawArea = new Rectangle(ScreenX, ScreenY, Width, Height); spriteBatch.Draw2D(m_BoundsTexture, new Rectangle(position.X, position.Y, Width, 1), Vector3.Zero); spriteBatch.Draw2D(m_BoundsTexture, new Rectangle(position.X, position.Y + Height - 1, Width, 1), Vector3.Zero); spriteBatch.Draw2D(m_BoundsTexture, new Rectangle(position.X, position.Y, 1, Height), Vector3.Zero); spriteBatch.Draw2D(m_BoundsTexture, new Rectangle(position.X + Width - 1, position.Y, 1, Height), Vector3.Zero); #endregion }
virtual public void Draw(SpriteBatchUI spriteBatch, Point position) { if (!IsInitialized || !IsVisible) return; if (Settings.Debug.ShowUIOutlines) DebugDrawBounds(spriteBatch, position, Color.White); foreach (AControl c in Children) { if ((c.Page == 0) || (c.Page == ActivePage)) { if (c.IsInitialized && c.IsVisible) { Point offset = new Point(c.Position.X + position.X, c.Position.Y + position.Y); c.Draw(spriteBatch, offset); } } } }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { Point caratPosition = new Point(position.X, position.Y); if (m_RenderedText.Width + m_Carat.Width <= Width) { m_RenderedText.Draw(spriteBatch, position, Utility.GetHueVector(Hue)); caratPosition.X += m_RenderedText.Width; } else { int textOffset = m_RenderedText.Width - (Width - m_Carat.Width); m_RenderedText.Draw(spriteBatch, new Rectangle(position.X, position.Y, m_RenderedText.Width - textOffset, m_RenderedText.Height), textOffset, 0, Utility.GetHueVector(Hue)); caratPosition.X += (Width - m_Carat.Width); } if (m_CaratBlinkOn) m_Carat.Draw(spriteBatch, caratPosition, Utility.GetHueVector(Hue)); base.Draw(spriteBatch, position); }
protected override void DrawTooltip(SpriteBatchUI spritebatch, Point position) { // Do not draw tooltips if: // 1. Holding an item. // Draw tooltips for items: // 1. Items in the world (MouseOverItem) // 2. ItemGumplings (both in paperdoll and in containers) // 3. the Backpack icon (in paperdolls). if (IsHoldingItem) { if (m_Tooltip != null) { m_Tooltip.Dispose(); m_Tooltip = null; } } else if (MouseOverItem != null && MouseOverItem.PropertyList.HasProperties) { if (m_Tooltip == null) m_Tooltip = new Tooltip(MouseOverItem); else m_Tooltip.UpdateEntity(MouseOverItem); m_Tooltip.Draw(spritebatch, position.X, position.Y + 24); } else if (m_World.Input.MousePick.MouseOverObject != null && m_World.Input.MousePick.MouseOverObject is Mobile && m_World.Input.MousePick.MouseOverObject.PropertyList.HasProperties) { AEntity entity = m_World.Input.MousePick.MouseOverObject; if (m_Tooltip == null) m_Tooltip = new Tooltip(entity); else m_Tooltip.UpdateEntity(entity); m_Tooltip.Draw(spritebatch, position.X, position.Y + 24); } else if (m_UserInterface.IsMouseOverUI && m_UserInterface.MouseOverControl != null && m_UserInterface.MouseOverControl is ItemGumpling && (m_UserInterface.MouseOverControl as ItemGumpling).Item.PropertyList.HasProperties) { AEntity entity = (m_UserInterface.MouseOverControl as ItemGumpling).Item; if (m_Tooltip == null) m_Tooltip = new Tooltip(entity); else m_Tooltip.UpdateEntity(entity); m_Tooltip.Draw(spritebatch, position.X, position.Y + 24); } else if (m_UserInterface.IsMouseOverUI && m_UserInterface.MouseOverControl != null && m_UserInterface.MouseOverControl is GumpPicBackpack && (m_UserInterface.MouseOverControl as GumpPicBackpack).BackpackItem.PropertyList.HasProperties) { AEntity entity = (m_UserInterface.MouseOverControl as GumpPicBackpack).BackpackItem; if (m_Tooltip == null) m_Tooltip = new Tooltip(entity); else m_Tooltip.UpdateEntity(entity); m_Tooltip.Draw(spritebatch, position.X, position.Y + 24); } else { base.DrawTooltip(spritebatch, position); } }
protected override void BeforeDraw(SpriteBatchUI spritebatch, Point position) { Mobile player = WorldModel.Entities.GetPlayerEntity(); // Hue the cursor if not in warmode and in trammel. if (WorldModel.IsInWorld && !player.Flags.IsWarMode && (m_World.MapIndex == 1)) CursorHue = 2414; else CursorHue = 0; if (IsHoldingItem) { ItemSpriteArtIndex = HeldItem.DisplayItemID; if (m_ItemSprite != null) { m_ItemSprite.Hue = HeldItem.Hue; m_ItemSprite.Offset = m_HeldItemOffset; if (HeldItem.Amount > 1 && HeldItem.ItemData.IsGeneric && HeldItem.DisplayItemID == HeldItem.ItemID) { int offset = HeldItem.ItemData.Unknown4; m_ItemSprite.Draw(spritebatch, new Point(position.X - 5, position.Y - 5)); } m_ItemSprite.Draw(spritebatch, position); } // set up to draw standard cursor sprite above item art. base.BeforeDraw(spritebatch, position); } else if (IsTargeting) { int artworkIndex = 8310; if (WorldModel.IsInWorld && player.Flags.IsWarMode) { // Over the interface or not in world. Display a default cursor. artworkIndex -= 23; } CursorSpriteArtIndex = artworkIndex; CursorOffset = new Point(13, 13); // sourceRect = new Rectangle(1, 1, 46, 34); /*if (m_targetingMulti != -1) { // UNIMPLEMENTED !!! Draw a transparent multi }*/ } else if ((m_World.Input.ContinuousMouseMovementCheck || m_World.Input.IsMouseOverWorld) && !m_UserInterface.IsModalControlOpen) { ResolutionConfig resolution = Settings.World.PlayWindowGumpResolution; Direction mouseDirection = DirectionHelper.DirectionFromPoints(new Point(resolution.Width / 2, resolution.Height / 2), m_World.Input.MouseOverWorldPosition); int artIndex = 0; switch (mouseDirection) { case Direction.North: CursorOffset = new Point(29, 1); artIndex = 8299; break; case Direction.Right: CursorOffset = new Point(41, 9); artIndex = 8300; break; case Direction.East: CursorOffset = new Point(36, 24); artIndex = 8301;break; case Direction.Down: CursorOffset = new Point(14, 33); artIndex = 8302; break; case Direction.South: CursorOffset = new Point(2, 26); artIndex = 8303; break; case Direction.Left: CursorOffset = new Point(2, 10); artIndex = 8304; break; case Direction.West: CursorOffset = new Point(1, 1); artIndex = 8305; break; case Direction.Up: CursorOffset = new Point(4, 2); artIndex = 8298; break; default: CursorOffset = new Point(2, 10); artIndex = 8309; break; } if (WorldModel.IsInWorld && player.Flags.IsWarMode) { // Over the interface or not in world. Display a default cursor. artIndex -= 23; } CursorSpriteArtIndex = artIndex; } else { // cursor is over UI or there is a modal message box open. Set up to draw standard cursor sprite. base.BeforeDraw(spritebatch, position); } }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { if (Height <= 0) return; // draw scrollbar background int middleHeight = Height - m_GumpUpButton[0].Height - m_GumpDownButton[0].Height - m_GumpBackground[0].Height - m_GumpBackground[2].Height; if (middleHeight > 0) { spriteBatch.Draw2D(m_GumpBackground[0], new Vector3(position.X, position.Y + m_GumpUpButton[0].Height, 0), Vector3.Zero); spriteBatch.Draw2DTiled(m_GumpBackground[1], new Rectangle(position.X, position.Y + m_GumpUpButton[0].Height + m_GumpBackground[0].Height, m_GumpBackground[0].Width, middleHeight), Vector3.Zero); spriteBatch.Draw2D(m_GumpBackground[2], new Vector3(position.X, position.Y + Height - m_GumpDownButton[0].Height - m_GumpBackground[2].Height, 0), Vector3.Zero); } else { middleHeight = Height - m_GumpUpButton[0].Height - m_GumpDownButton[0].Height; spriteBatch.Draw2DTiled(m_GumpBackground[1], new Rectangle(position.X, position.Y + m_GumpUpButton[0].Height, m_GumpBackground[0].Width, middleHeight), Vector3.Zero); } // draw up button spriteBatch.Draw2D(m_BtnUpClicked ? m_GumpUpButton[1] : m_GumpUpButton[0], new Vector3(position.X, position.Y, 0), Vector3.Zero); // draw down button spriteBatch.Draw2D(m_BtnDownClicked ? m_GumpDownButton[1] : m_GumpDownButton[0], new Vector3(position.X, position.Y + Height - m_GumpDownButton[0].Height, 0), Vector3.Zero); // draw slider if (MaxValue > MinValue && middleHeight > 0) spriteBatch.Draw2D(m_GumpSlider, new Vector3(position.X + (m_GumpBackground[0].Width - m_GumpSlider.Width) / 2, position.Y + m_GumpUpButton[0].Height + m_SliderPosition, 0), Vector3.Zero); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { spriteBatch.Draw2D(m_texture, new Vector3(position.X, position.Y, 0), Utility.GetHueVector(0, false, false, true)); base.Draw(spriteBatch, position); }
public override void Draw(SpriteBatchUI spriteBatch, Point position, double frameMS) { m_Rendered.Draw(spriteBatch, position, Utility.GetHueVector(Hue, true, false, true)); base.Draw(spriteBatch, position, frameMS); }
public void Draw(SpriteBatchUI sb, Point position) { m_Texture.Draw(sb, position, Utility.GetHueVector(0, false, (m_alpha < 1.0f))); }
public override void Draw(SpriteBatchUI spriteBatch, Point position) { Texture2D texture = getTextureFromMouseState(); if (Caption != string.Empty) m_Texture.Text = Caption; spriteBatch.Draw2D(texture, new Rectangle(position.X, position.Y, Width, Height), Vector3.Zero); if (Caption != string.Empty) { int yoffset = MouseDownOnThis ? 1 : 0; m_Texture.Draw(spriteBatch, new Point(position.X + (Width - m_Texture.Width) / 2, position.Y + yoffset + (Height - m_Texture.Height) / 2)); } base.Draw(spriteBatch, position); }