Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed interval on map #396

Merged
merged 1 commit into from Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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