Ejemplo n.º 1
0
        public DeckBuilderLayout(DeckBuilder deckBuilder)
        {
            int   columnCount = deckBuilder.ColumnCount();
            float usableWidth = deckBuilder.ClientSize.Width;

            scale      = (usableWidth * (1 - DeckBuilder.SPACING_PERCENTAGE) / columnCount) / DeckBuilder.CARD_WIDTH;
            spacing    = (usableWidth * DeckBuilder.SPACING_PERCENTAGE) / (columnCount + 1 + (DeckBuilder.SIDEBOARD_SPACING_MULTIPLIER - 1) * 2);
            headerSize = DeckBuilder.CARD_HEIGHT * scale * DeckBuilder.CARD_HEADER_PERCENTAGE;
            int maxFirstRowLength = deckBuilder.GetMaxFirstRowLength();

            secondRowY = (spacing * DeckBuilder.INTER_ROW_SPACING_MULTIPLIER - 1) + (headerSize * (maxFirstRowLength - 1)) + (DeckBuilder.CARD_HEIGHT * scale);
        }
Ejemplo n.º 2
0
        public DeckBuilderLayout(DeckBuilder deckBuilder)
        {
            columnCount  = deckBuilder.ColumnCount;
            vScrollValue = deckBuilder.VerticalScroll.Value;
            float usableWidth = deckBuilder.ClientSize.Width;

            scale      = usableWidth * (1 - SPACING_PERCENTAGE) / (columnCount * CARD_WIDTH);
            spacing    = (usableWidth * SPACING_PERCENTAGE) / (columnCount + 1 + (SIDEBOARD_SPACING_MULTIPLIER - 1) * 2);
            headerSize = CARD_HEIGHT * scale * CARD_HEADER_PERCENTAGE;
            int maxFirstRowLength = deckBuilder.GetMaxFirstRowLength();

            secondRowY = (spacing * INTER_ROW_SPACING_MULTIPLIER - 1) + (headerSize * (maxFirstRowLength - 1)) +
                         (CARD_HEIGHT * scale);

            cardWidth  = CARD_WIDTH * scale;
            cardHeight = CARD_HEIGHT * scale;
        }
Ejemplo n.º 3
0
 public DeckBuilderLayout(DeckBuilder deckBuilder)
 {
     int columnCount = deckBuilder.ColumnCount();
     float usableWidth = deckBuilder.ClientSize.Width;
     scale = (usableWidth * (1 - DeckBuilder.SPACING_PERCENTAGE) / columnCount) / DeckBuilder.CARD_WIDTH;
     spacing = (usableWidth * DeckBuilder.SPACING_PERCENTAGE) / (columnCount + 1 + (DeckBuilder.SIDEBOARD_SPACING_MULTIPLIER - 1) * 2);
     headerSize = DeckBuilder.CARD_HEIGHT * scale * DeckBuilder.CARD_HEADER_PERCENTAGE;
     int maxFirstRowLength = deckBuilder.GetMaxFirstRowLength();
     secondRowY = (spacing * DeckBuilder.INTER_ROW_SPACING_MULTIPLIER - 1) + (headerSize * (maxFirstRowLength - 1)) + (DeckBuilder.CARD_HEIGHT * scale);
 }