コード例 #1
0
        public override void                ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            if (usePicker)
            {
                Color col = parentLight.CompGlower.Props.glowColor.ToColor;
                // set alpha to 1 (lights use alpha zero, but that won't show in the picker)
                ColorWrapper _color = new ColorWrapper(new Color(col.r, col.g, col.b));

                Find.WindowStack.Add(new Dialog_ColorPicker(_color, delegate
                {
                    parentLight.ChangeColor(_color.Color);
                }, ev.button == 1, true));
            }
            else
            {
                if (ev.button == 0)
                {
                    parentLight.IncrementColorIndex();
                }
                else if (ev.button == 1)
                {
                    parentLight.DecrementColorIndex();
                }
            }
        }
コード例 #2
0
        public override void                ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            if (ev.button == 0)
            {
                parentLight.IncrementColorIndex();
            }
            else if (ev.button == 1)
            {
                parentLight.DecrementColorIndex();
            }
        }