protected override DrawerBase CreateVillageDrawerCore(Village.BonusType villageBonus, BackgroundDrawerData data, Marker marker) { if (marker.Settings.ExtraColor != Color.Transparent) { return(new MiniMapDrawer(marker.Settings.ExtraColor)); } return(new MiniMapDrawer(marker.Settings.Color)); }
protected override DrawerBase CreateVillageDrawerCore(Village.BonusType villageBonus, BackgroundDrawerData data, Marker marker) { string iconName = villageBonus == Village.BonusType.None ? data.IconDrawer : data.BonusIconDrawer; if (string.IsNullOrEmpty(iconName)) { return(null); } var icon = (Bitmap)Icons.Villages.ResourceManager.GetObject(iconName); Debug.Assert(icon != null); return(new IconDrawer(icon, marker.Settings)); }
protected override DrawerBase CreateVillageDrawerCore(Village.BonusType villageBonus, BackgroundDrawerData data, Marker marker) { switch (data.ShapeDrawer) { case "RectangleDrawer": return(new ShapeDrawer(false, marker)); case "EllipseDrawer": return(new ShapeDrawer(true, marker)); default: return(null); } }
protected abstract DrawerBase CreateVillageDrawerCore(Village.BonusType bonusType, BackgroundDrawerData data, Marker marker);
/// <summary> /// Create drawer for village background (Shape/Icon) /// </summary> /// <param name="bonusType">Bonus villages have a different icon</param> /// <param name="data">The shape of the drawer</param> /// <param name="colors">The colors for the drawer</param> public DrawerBase CreateVillageDrawer(Village.BonusType bonusType, BackgroundDrawerData data, Marker colors) { DrawerBase drawer = CreateVillageDrawerCore(bonusType, data, colors); return(drawer); }