Files
@ be9989c2c66e
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/PaintSwatch.cs - annotation
be9989c2c66e
970 B
text/x-csharp
Reduce the amount of debug output. Fix a crash when a potential window candidate is detected on the top row of the screen (which isn't possible). Break out of screen region tests early when the frame isn't detected to reduce how long a scan takes.
b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 b9934660c784 721656f9e923 b9934660c784 b9934660c784 b9934660c784 | 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";
}
}
}
|