Files
@ 4a851acc4491
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/SelectProfileDialog.cs - annotation
4a851acc4491
2.6 KiB
text/x-csharp
Fixed finding the paint bench interface with UI updates adding more shading along the borders of the color bars. Need to verify bar widths on larger interface settings, as the change to Falcon's Bait may make them wider. Also should speed up finding the paint bench, since it no longer searches every pixel on the screen one at a time until it finds the interface.
63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c | /*
* Copyright (c) 2010, Tess Snider
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
using System;
using System.Collections.Generic;
namespace DesertPaintLab
{
public partial class SelectProfileDialog : Gtk.Dialog
{
List<string> profileList = null;
Gtk.ListStore profileStore = new Gtk.ListStore(typeof(string));
string selectedProfile;
public int ProfileCount
{
get
{
return profileList.Count;
}
}
public List<string> ProfileList
{
get
{
return profileList;
}
set
{
profileList = value;
profileStore.Clear();
foreach (string name in profileList)
{
profileStore.AppendValues(name);
}
}
}
public string SelectedProfile
{
get
{
return selectedProfile;
}
}
public SelectProfileDialog()
{
this.Build();
Gtk.TreeViewColumn nameColumn = new Gtk.TreeViewColumn();
Gtk.CellRendererText nameColumnCell = new Gtk.CellRendererText();
nameColumn.PackStart(nameColumnCell, true);
nameColumn.Title = "Name";
profileListView.AppendColumn(nameColumn);
nameColumn.AddAttribute(nameColumnCell, "text", 0);
profileListView.Model = profileStore;
}
protected virtual void OnCursorChanged(object sender, System.EventArgs e)
{
Gtk.TreeModel model;
Gtk.TreeIter iter;
Gtk.TreeSelection selection = profileListView.Selection;
if ((selection != null) && selection.GetSelected(out model, out iter))
{
selectedProfile = model.GetValue(iter, 0).ToString();
}
else
{
selectedProfile = "";
}
}
}
}
|