mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-24 07:07:44 -05:00
Add sensitive scaling for field item map
if ppl have something other than 100% scale somehow Closes #248
This commit is contained in:
parent
72312641a9
commit
25262478ae
|
|
@ -8,14 +8,18 @@ public class MapView
|
|||
public readonly MapManager Map;
|
||||
|
||||
public int MapScale { get; } = 1;
|
||||
public int AcreScale { get; } = 16;
|
||||
public int AcreScale { get; }
|
||||
public int TerrainScale => AcreScale * 2;
|
||||
|
||||
// Top Left Anchor Coordinates
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
|
||||
protected MapView(MapManager m) => Map = m;
|
||||
protected MapView(MapManager m, int scale = 16)
|
||||
{
|
||||
AcreScale = scale;
|
||||
Map = m;
|
||||
}
|
||||
|
||||
public bool CanUp => Y != 0;
|
||||
public bool CanDown => Y < Map.CurrentLayer.MaxHeight - Map.CurrentLayer.GridHeight;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public sealed class MapViewer : MapView, IDisposable
|
|||
private readonly int[] PixelsBackgroundMapX;
|
||||
private readonly Bitmap BackgroundMap;
|
||||
|
||||
public MapViewer(MapManager m) : base(m)
|
||||
public MapViewer(MapManager m, int scale) : base(m)
|
||||
{
|
||||
var l1 = m.Items.Layer1;
|
||||
PixelsItemAcre1 = new int[l1.GridWidth * l1.GridHeight];
|
||||
|
|
|
|||
|
|
@ -32,9 +32,10 @@ public FieldItemEditor(MainSave sav)
|
|||
InitializeComponent();
|
||||
this.TranslateInterface(GameInfo.CurrentLanguage);
|
||||
|
||||
var scale = (PB_Acre.Width - 2) / 32;
|
||||
SAV = sav;
|
||||
Map = new MapManager(sav);
|
||||
View = new MapViewer(Map);
|
||||
View = new MapViewer(Map, scale);
|
||||
|
||||
Loading = true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user