Skip to content

Commit

Permalink
Changed interval on map (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
SDClowen committed Aug 24, 2022
1 parent 8671d92 commit dffb540
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Plugins/RSBot.Map/Views/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Plugins/RSBot.Map/Views/Main.cs
Expand Up @@ -10,7 +10,6 @@
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RSBot.Map.Views
Expand Down Expand Up @@ -140,7 +139,7 @@ private void DrawPointAt(Graphics gfx, Position position, int entityIndex)

if (entityIndex == 0)
{
gfx.DrawImage(RotateImage(img, Geometry.RadianToDegree(Game.Player.Movement.Angle)),
gfx.DrawImage(RotateImage(img, Geometry.RadianToDegree(Game.Player.Movement.Angle)),
x - img.Width / 2,
y - img.Height / 2);
}
Expand Down Expand Up @@ -351,7 +350,7 @@ private Image LoadSectorImage(int xSec, int ySec)
_cachedImages.Add(sectorImgName, img);
return (Image)img.Clone();
}

return new Bitmap(SectorSize, SectorSize);
}

Expand Down Expand Up @@ -388,7 +387,7 @@ private void RedrawMap()

#if DEBUG
var pen = new Pen(Color.Black);
pen.DashStyle = DashStyle.Dot;
pen.DashStyle = DashStyle.Dot;
gfx.DrawRectangle(pen, new Rectangle(pos, new Size(SectorSize, SectorSize)));
#endif
bitmap.Dispose();
Expand Down Expand Up @@ -448,8 +447,8 @@ private void trmInterval_Tick(object sender, EventArgs e)

lblRegion.Text = Game.ReferenceManager.GetTranslation(Game.Player.Movement.Source.RegionID.ToString());

lblX.Text = Game.Player.Movement.Source.XCoordinate.ToString("0.00");
lblY.Text = Game.Player.Movement.Source.YCoordinate.ToString("0.00");
lblX.Text = Game.Player.Movement.Source.XCoordinate.ToString("0.0");
lblY.Text = Game.Player.Movement.Source.YCoordinate.ToString("0.0");

#if DEBUG
labelSectorInfo.Text = $"{Game.Player.Movement.Source.RegionID} ({Game.Player.Movement.Source.XSector}x{Game.Player.Movement.Source.YSector})";
Expand Down

0 comments on commit dffb540

Please sign in to comment.