InputRoll - temporarily add ensureVisible with an implementation for legacy support for now

This commit is contained in:
adelikat 2014-08-23 14:49:01 +00:00
parent c61e200161
commit e4937563f6
1 changed files with 25 additions and 0 deletions

View File

@ -93,6 +93,12 @@ namespace BizHawk.Client.EmuHawk
public bool SelectAllInProgress { get; set; }
public System.Windows.Forms.View View { get; set; }
public int selectedItem { get; set; }
public void ensureVisible(int val)
{
LastVisibleIndex = val;
}
// ********************************************************
// TODO: implement this
@ -378,6 +384,25 @@ namespace BizHawk.Client.EmuHawk
}
}
public int LastVisibleIndex
{
get
{
return ScrollPosition + VisibleRows;
}
set
{
int i = value - VisibleRows;
if (i < 0)
{
i = 0;
}
ScrollPosition = 0;
}
}
/// <summary>
/// Returns the number of rows currently visible
/// </summary>