예제 #1
0
        /// <summary>
        /// Adds a mod cell to the table.
        /// </summary>
        /// <param name="capi">The client API</param>
        /// <param name="cell">The table cell to add.</param>
        /// <param name="assetManager">The asset manager for the mod</param>
        /// <param name="bounds">The bounds of the cell</param>
        public GuiElementModCell(ICoreClientAPI capi, ListCellEntry cell, IAssetManager assetManager, ElementBounds bounds) : base(capi, "", null, bounds)
        {
            this.cell         = cell;
            this.assetManager = assetManager;

            if (cell.TitleFont == null)
            {
                cell.TitleFont = CairoFont.WhiteSmallishText();
            }

            if (cell.DetailTextFont == null)
            {
                cell.DetailTextFont           = CairoFont.WhiteSmallText();
                cell.DetailTextFont.Color[3] *= 0.6;
            }

            modcellTexture = new LoadedTexture(capi);
        }
예제 #2
0
        /// <summary>
        /// Creates a new Element Cell.  A container for TableCells.
        /// </summary>
        /// <param name="capi">The Client API</param>
        /// <param name="cell">The base cell</param>
        /// <param name="bounds">The bounds of the TableCell</param>
        public GuiElementCell(ICoreClientAPI capi, ListCellEntry cell, ElementBounds bounds) : base(capi, "", null, bounds)
        {
            this.cellEntry        = cell;
            leftHighlightTexture  = new LoadedTexture(capi);
            rightHighlightTexture = new LoadedTexture(capi);

            releasedButtonTexture = new LoadedTexture(capi);
            pressedButtonTexture  = new LoadedTexture(capi);

            if (cell.TitleFont == null)
            {
                cell.TitleFont = CairoFont.WhiteSmallishText();
            }

            if (cell.DetailTextFont == null)
            {
                cell.DetailTextFont                      = CairoFont.WhiteSmallText();
                cell.DetailTextFont.Color[3]            *= 0.8;
                cell.DetailTextFont.LineHeightMultiplier = 1.1;
            }
        }