コード例 #1
0
 private void OnClickSelectedLine(MenuCustomTraitLine customTraitLine)
 {
     this.modified = true;
     this.selectedGuiTraits.Remove(customTraitLine.GuiFactionTrait);
     this.CheckListOfSelectedTraits();
     this.RefreshContent();
 }
コード例 #2
0
    private void SetupSelectedGuiTrait(AgeTransform tableItem, GuiFactionTrait guiFactionTrait, int index)
    {
        MenuCustomTraitLine component = tableItem.GetComponent <MenuCustomTraitLine>();

        if (component == null)
        {
            Diagnostics.LogError("In the MenuJoinGameScreen, trying to refresh a table item that is not a GameSessionLine");
            return;
        }
        if (index % 20 == 0)
        {
            tableItem.StartNewMesh = true;
        }
        component.RefreshContent(guiFactionTrait, this.SelectedAffinity.Name, base.gameObject, "OnClickSelectedLine");
    }
コード例 #3
0
    private void OnClickAvailableLine(MenuCustomTraitLine customTraitLine)
    {
        this.modified = true;
        GuiFactionTrait guiFactionTrait = this.selectedGuiTraits.FirstOrDefault((GuiFactionTrait match) => !string.IsNullOrEmpty(match.Root) && match.Root == customTraitLine.GuiFactionTrait.Root);

        if (guiFactionTrait != null)
        {
            if (customTraitLine.GuiFactionTrait.Level > guiFactionTrait.Level)
            {
                this.selectedGuiTraits.Remove(guiFactionTrait);
                this.selectedGuiTraits.Add(customTraitLine.GuiFactionTrait);
            }
        }
        else
        {
            this.selectedGuiTraits.Add(customTraitLine.GuiFactionTrait);
        }
        this.RefreshContent();
    }