Sliders change the preview palette and update client data; Need a better algorithm for picking color2
This commit is contained in:
@@ -72,7 +72,18 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
return allocated++;
|
||||
}
|
||||
|
||||
|
||||
public void UpdatePalette(string name, Palette p)
|
||||
{
|
||||
palettes[name] = p;
|
||||
var j = indices[name];
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
this[new Point(i, j)] = p.GetColor(i);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(IEnumerable<IPaletteModifier> paletteMods)
|
||||
{
|
||||
var b = new Bitmap(Bitmap);
|
||||
|
||||
Reference in New Issue
Block a user