protected virtual void draw_bar(SpriteBatch sprite_batch, Vector2 loc) { if (Window_Img == null) { return; } if (Items.ActiveNode == null) { return; } if (Glow) { Glowing_Line.draw(sprite_batch, -(loc + new Vector2(8, 0))); } else { int x = 8; sprite_batch.Draw(UICursor.texture, loc + new Vector2(x, 0), new Rectangle(16, Window_Img.window_color * 8, 8, 8), Window_Img.tint); x += 8; while (x < (this.column_width - ((int)draw_offset.X + (int)Bar_Offset.X * 2))) { sprite_batch.Draw(UICursor.texture, loc + new Vector2(x, 0), new Rectangle(24, Window_Img.window_color * 8, 8, 8), Window_Img.tint); x += 8; } sprite_batch.Draw(UICursor.texture, loc + new Vector2(x, 0), new Rectangle(32, Window_Img.window_color * 8, 8, 8), Window_Img.tint); } }
private void draw_bar(SpriteBatch sprite_batch) { /* //Debug * Vector2 loc = (this.column == 0 ? Window1.loc : Window2.loc) + * new Vector2(0, 16 + 16 * this.index);*/ Vector2 loc = this.loc + UICursor.target_loc + new Vector2(-8, 8); if (Glow) { Glowing_Line.draw(sprite_batch, -(loc + draw_vector() + new Vector2(8, 0))); } else { int x = 8; sprite_batch.Draw(UICursor.texture, loc + draw_vector() + new Vector2(x, 0), new Rectangle(16, Global.game_options.window_color * 8, 8, 8), Color.White); x += 8; while (x < (Window1.width - 16)) { sprite_batch.Draw(UICursor.texture, loc + draw_vector() + new Vector2(x, 0), new Rectangle(24, Global.game_options.window_color * 8, 8, 8), Color.White); x += 8; } sprite_batch.Draw(UICursor.texture, loc + draw_vector() + new Vector2(x, 0), new Rectangle(32, Global.game_options.window_color * 8, 8, 8), Color.White); } }
public override void Draw(SpriteBatch sprite_batch, Vector2 draw_offset = default(Vector2)) { GlowingLine.draw(sprite_batch, draw_offset - loc); MapSprite.draw(sprite_batch, draw_offset - loc); Name.draw(sprite_batch, draw_offset - loc); }