public UICollectionViewerOutfits(float x, float y, int thumbSizeX, int thumbSizeY, int thumbMarginX, int thumbMarginY, int thumbImageSizeX, int thumbImageSizeY, int thumbImageOffsetX, int thumbImageOffsetY, int rows, int columns, ulong maleCollectionID, ulong femaleCollectionID, UIScreen screen, string strID, ScreenManager scrnMgr)
            : base(screen, strID, DrawLevel.AlwaysOnTop)
        {
            float Scale = GlobalSettings.Default.ScaleFactor;

            myButtons = new UIButton[rows, columns];
            myScreen = screen;
            myScrMgr = scrnMgr;
            myMaleCollectionID = maleCollectionID;
            myFemaleCollectionID = femaleCollectionID;
            myCurrentCollectionID = femaleCollectionID;
            myThumbSizeX = thumbSizeX;
            myThumbSizeY = thumbSizeY;
            myThumbImageSizeX = thumbImageSizeX;
            myThumbImageSizeY = thumbImageSizeY;
            myThumbMarginX = thumbMarginX;
            myThumbMarginY = thumbMarginY;
            myThumbImageOffsetX = thumbImageOffsetX;
            myThumbImageOffsetY = thumbImageOffsetY;
            myPurchasables = new List<ulong>();
            myOutfits = new List<ulong>();
            myAppearances = new List<ulong[]>();
            myThumbnails = new List<ulong[]>();
            myCurrentThumbnails = null;
            myLeftButton = addButton(0x3f500000001, 415 * Scale, 560 * Scale, 1, false, strID + "LeftArrow");
            myRightButton = addButton(0x3f600000001, 650 * Scale, 560 * Scale, 1, false, strID + "RightArrow");

            /*myLeftButton.OnButtonClick += delegate(UIButton btn) { myPageStartIdx -= myRows * myColumns; myCurrentThumbnails = null; };
            myRightButton.OnButtonClick += delegate(UIButton btn) { myPageStartIdx += myRows * myColumns; myCurrentThumbnails = null; };*/

            myTextButtons = new UITextButton[12];
            for (int i = 0, stride = 0; i < 12; i++)
            {
                myTextButtons[i] = new UITextButton((455 * Scale) + stride, (555 * Scale), (i + 1).ToString(), strID + "NumberButton" + i, myScreen);
                myScreen.Add(myTextButtons[i]);
                myTextButtons[i].OnButtonClick += delegate(UIElement element) { myPageStartIdx = int.Parse(element.StrID.Substring(element.StrID.LastIndexOf("NumberButton") + 12)) * myRows * myColumns; myCurrentThumbnails = null; };
                if (i < 9)
                    stride += 15;
                else
                    stride += 22;
            }

            mySkinColor = 0;
            myRows = rows;
            myColumns = columns;
            myPageStartIdx = 0;

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    myButtons[i, j] = addButton(0x3df00000001, (x * Scale) + (thumbMarginX * Scale) + (j * ((thumbMarginX * Scale) + (thumbSizeX * Scale))), (y * Scale) + (thumbMarginY * Scale) + (i * ((thumbMarginY * Scale) + (thumbSizeY * Scale))), 1, false, strID + '_' + i + j);
                }
            }
            loadCollection();
            myCountLabel = new UILabel(0, strID + "CountLabel", 515, 537, myScreen);
            myCountLabel.Caption = "" + myThumbnails.Count + " Outfits";
            myScreen.Add(myCountLabel);
        }
        public UICollectionViewer(int x, int y, int thumbSizeX, int thumbSizeY, int thumbMarginX, int thumbMarginY, int thumbImageSizeX, int thumbImageSizeY, int thumbImageOffsetX, int thumbImageOffsetY, int rows, int columns, ulong maleCollectionID, ulong femaleCollectionID, UIScreen screen, string strID, ScreenManager scrnMgr)
            : base(screen, strID, DrawLevel.AlwaysOnTop)
        {
            m_StringID = strID;

            myButtons = new UIButton[rows, columns];
            myScreen = screen;
            myScrMgr = scrnMgr;
            myMaleCollectionID = maleCollectionID;
            myFemaleCollectionID = femaleCollectionID;
            myCurrentCollectionID = femaleCollectionID;
            myThumbSizeX = thumbSizeX;
            myThumbSizeY = thumbSizeY;
            myThumbImageSizeX = thumbImageSizeX;
            myThumbImageSizeY = thumbImageSizeY;
            myThumbMarginX = thumbMarginX;
            myThumbMarginY = thumbMarginY;
            myThumbImageOffsetX = thumbImageOffsetX;
            myThumbImageOffsetY = thumbImageOffsetY;
            myPurchasables = new List<ulong>();
            myOutfits = new List<ulong>();
            myAppearances = new List<ulong[]>();
            myBindings = new List<ulong[]>();
            myThumbnails = new List<ulong[]>();
            myCurrentThumbnails = null;
            myLeftButton = addButton(0x3f500000001, 410, 275, 1, false, strID + "LeftArrow");
            myRightButton = addButton(0x3f600000001, 645, 275, 1, false, strID + "RightArrow");

            /*myLeftButton.OnButtonClick += delegate(UIButton btn) { myPageStartIdx -= myRows * myColumns; myCurrentThumbnails = null; };
            myRightButton.OnButtonClick += delegate(UIButton btn) { myPageStartIdx += myRows * myColumns; myCurrentThumbnails = null; };*/

            myTextButtons = new UITextButton[12];

            for (int i = 0, stride = 0; i < 12; i++)
            {
                myTextButtons[i] = new UITextButton(450 + stride, 270, (i + 1).ToString(), strID + "NumberButton" + i, myScreen);
                myScreen.Add(myTextButtons[i]);
                myTextButtons[i].OnButtonClick += delegate(UIElement element) { myPageStartIdx = int.Parse(element.StrID.Substring(element.StrID.LastIndexOf("NumberButton") + 12)) * myRows * myColumns; myCurrentThumbnails = null; };

                if (i < 9)
                    stride += 15;
                else
                    stride += 22;
            }

            mySkinColor = 0;
            myRows = rows;
            myColumns = columns;
            myPageStartIdx = 0;

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    myButtons[i, j] = addButton(0x000003E600000001, x + thumbMarginX + (j * (thumbMarginX + thumbSizeX)), y + thumbMarginY + (i * (thumbMarginY + thumbSizeY)), 1, false, strID + '_' + i + j);
                }
            }

            loadCollection();
            myCountLabel = new UILabel(0, "CountLabel", 505, 250, myScreen);
            myCountLabel.Caption = "" + myThumbnails.Count + " Heads";
            myScreen.Add(myCountLabel);
        }