public void AddEmpireListEntry(EmpireDefinition empire) { Rect rect = new Rect(new Vector2(0, EmpireEntries.Count * ListEntrySize.y), ListEntrySize); EmpireEntries.Add(new EmpireListEntry(rect, EmpireEntries.Count, empire, ChangeSelectionIndex, LoadEmpireDefinition)); }
public EmpireListEntry(Rect rect, int index, EmpireDefinition empireDefinition, ChangeSelectedIndex changeIndex, ButtonPress buttonPress) { baseRect = rect; Index = index; changeSelectionIndex = changeIndex; Definition = empireDefinition; buttonCallBack = buttonPress; Rect EmpireFlagRect = new Rect(new Rect(baseRect.x, baseRect.y, baseRect.height, baseRect.height)); empireFlag = new EmpireFlag(EmpireFlagRect, Definition.FlagBackgroundIndex, Definition.FlagEmblemIndex, Definition.FlagBackgroundColor.GetColor(), Definition.FlagEmblemColor.GetColor()); }