public DetailsCommand(DetailsDisplayEnum display, Village village, VillageTools tool) { Tooltip = village.ToString(); Display = display; if (Display == DetailsDisplayEnum.None) { Display = DetailsDisplayEnum.Village; } else if (Display == DetailsDisplayEnum.Player && !village.HasPlayer) { Display = DetailsDisplayEnum.Village; } else if (Display == DetailsDisplayEnum.Tribe && !village.HasTribe) { Display = DetailsDisplayEnum.Village; } UnderlyingDisplay = DetailsDisplayEnum.Village; Village = village; Tool = tool; if (village.HasPlayer) { Player = village.Player; if (Player.HasTribe) { Tribe = Player.Tribe; } } }
public DetailsCommand(DetailsDisplayEnum display, Tribe tribe, VillageTools tool) { Tooltip = tribe.ToString(); Display = display; if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village || Display == DetailsDisplayEnum.Player) Display = DetailsDisplayEnum.Tribe; UnderlyingDisplay = DetailsDisplayEnum.Tribe; Tribe = tribe; Tool = tool; }
/// <summary> /// Create a new command with the same underlying display /// </summary> /// <param name="previous">The previous command</param> /// <param name="display">The new display</param> public DetailsCommand(DetailsCommand previous, DetailsDisplayEnum display) { Tooltip = previous.Tooltip; Village = previous.Village; Player = previous.Player; Tribe = previous.Tribe; UnderlyingDisplay = display; Display = display; Tool = VillageTools.SelectVillage; SubLayout = true; }
public DetailsCommand(DetailsDisplayEnum display, Player player, VillageTools tool) { Tooltip = player.ToString(); Display = display; if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village) Display = DetailsDisplayEnum.Player; else if (Display == DetailsDisplayEnum.Tribe && !player.HasTribe) Display = DetailsDisplayEnum.Player; UnderlyingDisplay = DetailsDisplayEnum.Player; Player = player; Tool = tool; Tribe = player.Tribe; }
public DetailsCommand(DetailsDisplayEnum display, Tribe tribe, VillageTools tool) { Tooltip = tribe.ToString(); Display = display; if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village || Display == DetailsDisplayEnum.Player) { Display = DetailsDisplayEnum.Tribe; } UnderlyingDisplay = DetailsDisplayEnum.Tribe; Tribe = tribe; Tool = tool; }
public DetailsCommand(DetailsDisplayEnum display, Player player, VillageTools tool) { Tooltip = player.ToString(); Display = display; if (Display == DetailsDisplayEnum.None || Display == DetailsDisplayEnum.Village) { Display = DetailsDisplayEnum.Player; } else if (Display == DetailsDisplayEnum.Tribe && !player.HasTribe) { Display = DetailsDisplayEnum.Player; } UnderlyingDisplay = DetailsDisplayEnum.Player; Player = player; Tool = tool; Tribe = player.Tribe; }
public DetailsCommand(DetailsDisplayEnum display, Village village, VillageTools tool) { Tooltip = village.ToString(); Display = display; if (Display == DetailsDisplayEnum.None) Display = DetailsDisplayEnum.Village; else if (Display == DetailsDisplayEnum.Player && !village.HasPlayer) Display = DetailsDisplayEnum.Village; else if (Display == DetailsDisplayEnum.Tribe && !village.HasTribe) Display = DetailsDisplayEnum.Village; UnderlyingDisplay = DetailsDisplayEnum.Village; Village = village; Tool = tool; if (village.HasPlayer) { Player = village.Player; if (Player.HasTribe) { Tribe = Player.Tribe; } } }
public DetailsCommand() { UnderlyingDisplay = DetailsDisplayEnum.None; Display = DetailsDisplayEnum.None; Tooltip = string.Empty; }