public TweakedColourPickerPreset(TweakedColourPicker owner, Color colour)
        {
            this.owner = owner;
            Color      = colour;

            // Init the GUI part of the ColorRect
            MarginTop           = MarginBottom = MarginLeft = MarginRight = 6.0f;
            RectMinSize         = new Vector2(20, 20);
            SizeFlagsHorizontal = (int)SizeFlags.ShrinkEnd;
            SizeFlagsVertical   = (int)SizeFlags.ShrinkCenter;
            UpdateTooltip();
        }
Exemple #2
0
    public override void _Ready()
    {
        compounds       = GetNode <OptionButton>(CompoundsPath);
        maximumDistance = GetNode <Slider>(MaximumDistancePath);
        minimumAmount   = GetNode <Slider>(MinimumAmountPath);
        colour          = GetNode <TweakedColourPicker>(ColourPath);

        compounds.Clear();

        maximumDistance.MinValue = Constants.CHEMORECEPTOR_RANGE_MIN;
        maximumDistance.MaxValue = Constants.CHEMORECEPTOR_RANGE_MAX;

        minimumAmount.MinValue = Constants.CHEMORECEPTOR_AMOUNT_MIN;
        minimumAmount.MaxValue = Constants.CHEMORECEPTOR_AMOUNT_MAX;
    }