KitSquarePos method inversing original configurationSuggestion
I've put about 8 hours into figuring out ur cs. It would be SO MUCH better to have the...
kitsumod.png

        private float[] KitSquarePos(int number, double count)
        {
            Vector2 position = new Vector2(0.015f, 0.5f);
            Vector2 dimensions = new Vector2(0.22f, 0.4f);
            float offsetY = 0;
            float offsetX = 0;
          if (count < 10)
            {
                position.x = (float)(1 - (((dimensions.x + .005f) * (count > 1 ? (Math.Round((count / 2), MidpointRounding.AwayFromZero)) : 1)))) / 2;
            }
            if (number >= 0 && number < 2)
            {
                offsetY = (-0.01f - dimensions.y) * number;
            }
            if (number > 1 && number < 4)
            {
                offsetX = (.005f + dimensions.x) * 1;
                offsetY = (-0.01f - dimensions.y) * (number - 2);
            }
            if (number > 3 && number < 6)
            {
                offsetX = (.005f + dimensions.x) * 2;
                offsetY = (-0.01f - dimensions.y) * (number - 4);
            }
            if (number > 5 && number < 8)
            {
                offsetX = (.005f + dimensions.x) * 3;
                offsetY = (-0.01f - dimensions.y) * (number - 6);
            }
            if (number > 7 && number < 10)
            {
                offsetX = (.005f + dimensions.x) * 4;
                offsetY = (-0.01f - dimensions.y) * (number - 8);
            }
            Vector2 offset = new Vector2(offsetX, offsetY);
            Vector2 posMin = position + offset;
            Vector2 posMax = posMin + dimensions;
            return new float[] { posMin.x, posMin.y, posMax.x, posMax.y };
        }​
KitSquarePos and the corresponding CalcKitButtonPos go horizontal first, then go vertical. I tried for so long, but ur logic is so clever. I got one row to be be once.

It'll allow a lot more. We can change

            Vector2 position = new Vector2(0.015f, 0.5f);
            Vector2 dimensions = new Vector2(0.22f, 0.4f);

to resize the entries (the whole CUI icon space, the whole image area, the clickable area is smaller). This one change would allow much cooler stuff.

Lemme clarify (lol)

I would like the order to go horizontally first, then create a new row of kits below the first row.

This is meant for the Kits mod, not this mod.