Esempio n. 1
0
        private void VirtColorField_Click(object sender, EventArgs e)
        {
            PictureBox outputBox = (PictureBox)sender;

            colorPickerDialog.Color = outputBox.BackColor;
            colorPickerDialog.ShowDialog(this);

            outputBox.BackColor = colorPickerDialog.Color;

            if (sender == VirtHorizonCloudColor)
            {
                ByteColorAlpha HorizonCloud = new ByteColorAlpha(SetPaleMemoryColor(VirtHorizonCloudColor));
                HorizonCloud.A = (byte)VirtUnknown1Index.Value;
                _virtChunk.HorizonCloudColor = HorizonCloud;
            }

            if (sender == VirtCenterCloudColor)
            {
                ByteColorAlpha CenterCloud = new ByteColorAlpha(SetPaleMemoryColor(VirtCenterCloudColor));
                CenterCloud.A = (byte)VirtUnknown2Index.Value;
                _virtChunk.CenterCloudColor = CenterCloud;
            }

            if (sender == VirtCenterSkyColor)
            {
                _virtChunk.CenterSkyColor = SetPaleMemoryColor(VirtCenterSkyColor);
            }
            if (sender == VirtHorizonColor)
            {
                _virtChunk.HorizonColor = SetPaleMemoryColor(VirtHorizonColor);
            }
            if (sender == VirtSkyFadeToColor)
            {
                _virtChunk.SkyFadeTo = SetPaleMemoryColor(VirtSkyFadeToColor);
            }
        }
Esempio n. 2
0
        private Color SetPaleColorBoxColor(ByteColorAlpha color)
        {
            Color newColor = Color.FromArgb(255, color.R, color.G, color.B);

            return(newColor);
        }
Esempio n. 3
0
        /// <summary>
        /// Called when ANY of the color fields in Pale are clicked on.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PaleColorField_Click(object sender, EventArgs e)
        {
            //Set the color in the Color Picker to what it currently is
            //And then pause the app till we get a new color.
            PictureBox outputBox = (PictureBox)sender;

            colorPickerDialog.Color = outputBox.BackColor;
            colorPickerDialog.ShowDialog(this);

            outputBox.BackColor = colorPickerDialog.Color;

            //Update whoever generated the event.
            if (sender == PaleActorAmbientColor)
            {
                _paleChunk.ActorAmbient = SetPaleMemoryColor(PaleActorAmbientColor);
            }
            if (sender == PaleRoomFillColor)
            {
                _paleChunk.RoomFillColor = SetPaleMemoryColor(PaleRoomFillColor);
            }
            if (sender == PaleRoomAmbientColor)
            {
                _paleChunk.RoomAmbient = SetPaleMemoryColor(PaleRoomAmbientColor);
            }
            if (sender == PaleWaveColor)
            {
                _paleChunk.WaveColor = SetPaleMemoryColor(PaleWaveColor);
            }
            if (sender == PaleUnknown1Color)
            {
                _paleChunk.UnknownColor1 = SetPaleMemoryColor(PaleUnknown1Color);
            }
            if (sender == PaleUnknown2Color)
            {
                _paleChunk.UnknownColor2 = SetPaleMemoryColor(PaleUnknown2Color);
            }
            if (sender == PaleOceanColor)
            {
                _paleChunk.OceanColor = SetPaleMemoryColor(PaleOceanColor);
            }
            if (sender == PaleUnknown3Color)
            {
                _paleChunk.UnknownColor3 = SetPaleMemoryColor(PaleUnknown3Color);
            }
            if (sender == PaleDoorwayColor)
            {
                _paleChunk.DoorwayColor = SetPaleMemoryColor(PaleDoorwayColor);
            }
            if (sender == PaleFogColor)
            {
                _paleChunk.FogColor = SetPaleMemoryColor(PaleFogColor);
            }

            if (sender == PaleOceanFadeIntoColor)
            {
                ByteColorAlpha OceanFadeInto = new ByteColorAlpha(SetPaleMemoryColor(PaleOceanFadeIntoColor));
                OceanFadeInto.A          = (byte)PaleOceanFadeAlpha.Value;
                _paleChunk.OceanFadeInto = OceanFadeInto;
            }

            if (sender == PaleShoreFadeIntoColor)
            {
                ByteColorAlpha ShoreFadeInto = new ByteColorAlpha(SetPaleMemoryColor(PaleShoreFadeIntoColor));
                ShoreFadeInto.A          = (byte)PaleShoreFadeAlpha.Value;
                _paleChunk.ShoreFadeInto = ShoreFadeInto;
            }
        }
        private void VirtColorField_Click(object sender, EventArgs e)
        {
            PictureBox outputBox = (PictureBox)sender;

            colorPickerDialog.Color = outputBox.BackColor;
            colorPickerDialog.ShowDialog(this);

            outputBox.BackColor = colorPickerDialog.Color;

            if (sender == VirtHorizonCloudColor)
            {
                ByteColorAlpha HorizonCloud = new ByteColorAlpha(SetPaleMemoryColor(VirtHorizonCloudColor));
                HorizonCloud.A = (byte) VirtUnknown1Index.Value;
                _virtChunk.HorizonCloudColor = HorizonCloud;
            }

            if (sender == VirtCenterCloudColor)
            {
                ByteColorAlpha CenterCloud = new ByteColorAlpha(SetPaleMemoryColor(VirtCenterCloudColor));
                CenterCloud.A = (byte)VirtUnknown2Index.Value;
                _virtChunk.CenterCloudColor = CenterCloud;
            }

            if(sender == VirtCenterSkyColor)
                _virtChunk.CenterSkyColor = SetPaleMemoryColor(VirtCenterSkyColor);
            if(sender == VirtHorizonColor)
                _virtChunk.HorizonColor = SetPaleMemoryColor(VirtHorizonColor);
            if(sender == VirtSkyFadeToColor)
                _virtChunk.SkyFadeTo = SetPaleMemoryColor(VirtSkyFadeToColor);
        }
 private Color SetPaleColorBoxColor(ByteColorAlpha color)
 {
     Color newColor = Color.FromArgb(255, color.R, color.G, color.B);
     return newColor;
 }
        /// <summary>
        /// Called when ANY of the color fields in Pale are clicked on.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PaleColorField_Click(object sender, EventArgs e)
        {
            //Set the color in the Color Picker to what it currently is
            //And then pause the app till we get a new color.
            PictureBox outputBox = (PictureBox) sender;

            colorPickerDialog.Color = outputBox.BackColor;
            colorPickerDialog.ShowDialog(this);

            outputBox.BackColor = colorPickerDialog.Color;

            //Update whoever generated the event.
            if(sender == PaleActorAmbientColor)
                _paleChunk.ActorAmbient = SetPaleMemoryColor(PaleActorAmbientColor);
            if(sender == PaleRoomFillColor)
                _paleChunk.RoomFillColor = SetPaleMemoryColor(PaleRoomFillColor);
            if(sender == PaleRoomAmbientColor)
                _paleChunk.RoomAmbient = SetPaleMemoryColor(PaleRoomAmbientColor);
            if(sender == PaleWaveColor)
                _paleChunk.WaveColor = SetPaleMemoryColor(PaleWaveColor);
            if (sender == PaleUnknown1Color)
                _paleChunk.UnknownColor1 = SetPaleMemoryColor(PaleUnknown1Color);
            if (sender == PaleUnknown2Color)
                _paleChunk.UnknownColor2 = SetPaleMemoryColor(PaleUnknown2Color);
            if(sender == PaleOceanColor)
                _paleChunk.OceanColor = SetPaleMemoryColor(PaleOceanColor);
            if (sender == PaleUnknown3Color)
                _paleChunk.UnknownColor3 = SetPaleMemoryColor(PaleUnknown3Color);
            if(sender == PaleDoorwayColor)
                _paleChunk.DoorwayColor = SetPaleMemoryColor(PaleDoorwayColor);
            if(sender == PaleFogColor)
                _paleChunk.FogColor = SetPaleMemoryColor(PaleFogColor);

            if (sender == PaleOceanFadeIntoColor)
            {
                ByteColorAlpha OceanFadeInto = new ByteColorAlpha(SetPaleMemoryColor(PaleOceanFadeIntoColor));
                OceanFadeInto.A = (byte)PaleOceanFadeAlpha.Value;
                _paleChunk.OceanFadeInto = OceanFadeInto;
            }

            if (sender == PaleShoreFadeIntoColor)
            {
                ByteColorAlpha ShoreFadeInto = new ByteColorAlpha(SetPaleMemoryColor(PaleShoreFadeIntoColor));
                ShoreFadeInto.A = (byte) PaleShoreFadeAlpha.Value;
                _paleChunk.ShoreFadeInto = ShoreFadeInto;
            }
        }
        private void CopyColorList(List<ByteColorAlpha> sourceList)
        {
            foreach (ByteColorAlpha byteColor in sourceList)
            {
                byte[] temp = byteColor.GetBytes();

                ByteColorAlpha copiedColor = new ByteColorAlpha(temp);

                ColorList.Add(copiedColor);
            }
        }