Esempio n. 1
0
        public new void setSourceItem(Item item)
        {
            this.sourceItem              = item;
            this.chestColorPicker        = null;
            this.colorPickerToggleButton = null;

            if (this.source == ItemGrabMenu.source_chest && this.sourceItem != null && this.sourceItem is Chest)
            {
                setColorPicker();
            }
        }
Esempio n. 2
0
        private void setColorPicker()
        {
            this.chestColorPicker = new ChestColorPickerEx(this.ItemsToGrabMenu.xPositionOnScreen,
                                                           this.ItemsToGrabMenu.yPositionOnScreen,
                                                           this.ItemsToGrabMenu.width,
                                                           this.ItemsToGrabMenu.height,
                                                           sourceItem as Chest);

            this.colorPickerToggleButton = new ClickableTextureComponent(
                new Rectangle(this.inventory.xPositionOnScreen + this.inventory.width - bgXDiff + 60, this.ItemsToGrabMenu.yPositionOnScreen, 64, 64),
                Game1.mouseCursors,
                new Rectangle(119, 469, 16, 16),
                4f,
                false)
            {
                hoverText      = Game1.content.LoadString("Strings\\UI:Toggle_ColorPicker"),
                myID           = ItemGrabMenu.region_colorPickToggle,
                downNeighborID = ItemGrabMenu.region_fillStacksButton,
                leftNeighborID = ClickableComponent.SNAP_AUTOMATIC,
                region         = ItemGrabMenu.region_organizationButtons
            };
        }