Files @ 41381c24d35a
Branch filter:

Location: ATITD-Tools/Desert-Paint-Lab/PaintSwatch.cs - annotation

Jason Maltzen
Now supports all the interface sizes with a setting to select the current interface size. The initial screen size check now displays the detected resolution as a hint. The screen size check / interface size settings can now be updated after launch through File->Preferences. Capturing a reaction now includes a progress bar, and runs in a separate thread instead of silently blocking. The reaction status window under 'Help' now has options to disable ingredients to remove them from the list. NOTE: this also disables/enables those ingredients in the recipe generator as well. The list also updates as new reactions are recorded instead of requiring that it be closed and re-opened to update.
using System;

namespace DesertPaintLab
{
	[System.ComponentModel.ToolboxItem(true)]
	public partial class PaintSwatch : Gtk.Bin
	{
		PaintColor color;
		
		public PaintColor Color
		{
			get
			{
				return color;
			}
			
			set
			{
				color.Red = value.Red;
				color.Green = value.Green;
				color.Blue = value.Blue;
				colorBox.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(color.Red, color.Green, color.Blue));
				rgbLabel.Text = color.Red.ToString() + ", " +
					            color.Green.ToString() + ", " +
						        color.Blue.ToString();
				colorNameLabel.Text = Palette.FindNearest(color);
			}
		}
		
		public PaintSwatch ()
		{
			color = new PaintColor();
			this.Build ();
		}
		
		public void Clear()
		{
			color.Clear();
			colorBox.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(color.Red, color.Green, color.Blue));
			rgbLabel.Text = "???, ???, ???";
			colorNameLabel.Text = "Unknown";
		}	
	}
}