2015-07-09 16:35:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
|
|
|
|
public partial class TAStudio
|
|
|
|
|
{
|
2015-07-23 17:55:22 +00:00
|
|
|
|
// Everything here is currently for Lua
|
2015-07-09 16:35:48 +00:00
|
|
|
|
public Func<int, string, Color?> QueryItemBgColorCallback { get; set; }
|
|
|
|
|
public Func<int, string, string> QueryItemTextCallback { get; set; }
|
2015-07-09 16:47:59 +00:00
|
|
|
|
public Func<int, string, Bitmap> QueryItemIconCallback { get; set; }
|
|
|
|
|
|
2015-07-09 16:35:48 +00:00
|
|
|
|
public Action<int> GreenzoneInvalidatedCallback { get; set; }
|
2018-02-10 11:58:46 +00:00
|
|
|
|
public Action<int> BranchLoadedCallback { get; set; }
|
|
|
|
|
public Action<int> BranchSavedCallback { get; set; }
|
|
|
|
|
public Action<int> BranchRemovedCallback { get; set; }
|
2015-07-09 16:35:48 +00:00
|
|
|
|
|
|
|
|
|
private Color? GetColorOverride(int index, InputRoll.RollColumn column)
|
|
|
|
|
{
|
2017-05-24 15:49:35 +00:00
|
|
|
|
return QueryItemBgColorCallback?.Invoke(index, column.Name);
|
2015-07-09 16:35:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string GetTextOverride(int index, InputRoll.RollColumn column)
|
|
|
|
|
{
|
2017-05-24 15:49:35 +00:00
|
|
|
|
return QueryItemTextCallback?.Invoke(index, column.Name);
|
2015-07-09 16:35:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 16:47:59 +00:00
|
|
|
|
private Bitmap GetIconOverride(int index, InputRoll.RollColumn column)
|
|
|
|
|
{
|
2017-05-24 15:49:35 +00:00
|
|
|
|
return QueryItemIconCallback?.Invoke(index, column.Name);
|
2015-07-09 16:47:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 16:35:48 +00:00
|
|
|
|
private void GreenzoneInvalidated(int index)
|
|
|
|
|
{
|
2017-05-24 15:49:35 +00:00
|
|
|
|
GreenzoneInvalidatedCallback?.Invoke(index);
|
2015-07-09 16:35:48 +00:00
|
|
|
|
}
|
2018-02-10 11:58:46 +00:00
|
|
|
|
|
|
|
|
|
private void BranchLoaded(int index)
|
|
|
|
|
{
|
|
|
|
|
BranchLoadedCallback?.Invoke(index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BranchSaved(int index)
|
|
|
|
|
{
|
|
|
|
|
BranchSavedCallback?.Invoke(index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BranchRemoved(int index)
|
|
|
|
|
{
|
|
|
|
|
BranchRemovedCallback?.Invoke(index);
|
|
|
|
|
}
|
2015-07-09 16:35:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|