Example #1
0
    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));
    }
Example #2
0
    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());
    }