本文整理汇总了C#中BizHawk.Client.EmuHawk.InputRoll类的典型用法代码示例。如果您正苦于以下问题:C# InputRoll类的具体用法?C# InputRoll怎么用?C# InputRoll使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InputRoll类属于BizHawk.Client.EmuHawk命名空间,在下文中一共展示了InputRoll类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MarkerView_QueryItemBkColor
private void MarkerView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
var prev = Markers.PreviousOrCurrent(Global.Emulator.Frame);//Temp fix
if (prev != null && index == Markers.IndexOf(prev))
{
color = TAStudio.Marker_FrameCol;
}
else if (index < Markers.Count)
{
var marker = Markers[index];
var record = Tastudio.CurrentTasMovie[marker.Frame];
if (record.Lagged.HasValue)
{
if (record.Lagged.Value)
{
color = column.Name == "FrameColumn" ? TAStudio.LagZone_FrameCol : TAStudio.LagZone_InputLog;
}
else
{
color = column.Name == "LabelColumn" ? TAStudio.GreenZone_FrameCol : TAStudio.GreenZone_InputLog;
}
}
else
{
color = Color.White;
}
}
else
color = Color.White;
}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:32,代码来源:MarkerControl.cs
示例2: MarkerView_QueryItemText
private void MarkerView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = "";
if (column.Name == "FrameColumn")
{
text = Markers[index].Frame.ToString();
}
else if (column.Name == "LabelColumn")
{
text = Markers[index].Message;
}
}
开发者ID:SaxxonPike,项目名称:BizHawk,代码行数:13,代码来源:MarkerControl.cs
示例3: QueryItemText
private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = string.Empty;
if (index >= Movie.BranchCount)
{
return;
}
switch (column.Name)
{
case BranchNumberColumnName:
text = index.ToString();
break;
case FrameColumnName:
text = GetBranch(index).Frame.ToString();
break;
case TimeColumnName:
text = GetBranch(index).TimeStamp.ToString(@"hh\:mm\:ss\.ff");
break;
}
}
开发者ID:TraceBullet,项目名称:BizHawk,代码行数:22,代码来源:BookmarksBranchesBox.cs
示例4: TasView_PointedCellChanged
private void TasView_PointedCellChanged(object sender, InputRoll.CellEventArgs e)
{
// TODO: think about nullability
// For now return if a null because this happens OnEnter which doesn't have any of the below behaviors yet?
// Most of these are stupid but I got annoyed at null crashes
if (e.OldCell == null || e.OldCell.Column == null || e.OldCell.RowIndex == null ||
e.NewCell == null || e.NewCell.RowIndex == null || e.NewCell.Column == null)
{
return;
}
int startVal, endVal;
int frame = e.NewCell.RowIndex.Value;
if (e.OldCell.RowIndex.Value < e.NewCell.RowIndex.Value)
{
startVal = e.OldCell.RowIndex.Value;
endVal = e.NewCell.RowIndex.Value;
}
else
{
startVal = e.NewCell.RowIndex.Value;
endVal = e.OldCell.RowIndex.Value;
}
if (_startMarkerDrag)
{
if (e.NewCell.RowIndex.HasValue)
{
GoToFrame(e.NewCell.RowIndex.Value);
}
}
else if (_startFrameDrag)
{
if (e.OldCell.RowIndex.HasValue && e.NewCell.RowIndex.HasValue)
{
for (var i = startVal; i <= endVal; i++)
{
TasView.SelectRow(i, _frameDragState);
}
RefreshTasView();
}
}
else if (_rightClickFrame != -1)
{
_triggerAutoRestore = true;
_supressContextMenu = true;
if (frame > CurrentTasMovie.InputLogLength - _rightClickInput.Length)
frame = CurrentTasMovie.InputLogLength - _rightClickInput.Length;
if (_rightClickShift)
{
if (_rightClickControl) // Insert
{
// If going backwards, delete!
bool shouldInsert = true;
if (startVal < _rightClickFrame)
{ // Cloning to a previous frame makes no sense.
startVal = _rightClickFrame - 1;
}
if (startVal < _rightClickLastFrame)
shouldInsert = false;
if (shouldInsert)
{
for (int i = startVal + 1; i <= endVal; i++)
CurrentTasMovie.InsertInput(i, _rightClickInput[(i - _rightClickFrame) % _rightClickInput.Length]);
}
else
{
CurrentTasMovie.RemoveFrames(startVal + 1, endVal + 1);
}
_rightClickLastFrame = frame;
}
else // Overwrite
{
for (int i = startVal; i <= endVal; i++)
CurrentTasMovie.SetFrame(i, _rightClickInput[(_rightClickFrame - i) % _rightClickInput.Length]);
if (startVal < _triggerAutoRestoreFromFrame)
_triggerAutoRestoreFromFrame = startVal;
}
}
else
{
if (_rightClickControl)
{
for (int i = 0; i < _rightClickInput.Length; i++) // Re-set initial range, just to verify it's still there.
CurrentTasMovie.SetFrame(_rightClickFrame + i, _rightClickInput[i]);
if (_rightClickOverInput != null) // Restore overwritten input from previous movement
{
for (int i = 0; i < _rightClickOverInput.Length; i++)
CurrentTasMovie.SetFrame(_rightClickLastFrame + i, _rightClickOverInput[i]);
}
else
_rightClickOverInput = new string[_rightClickInput.Length];
_rightClickLastFrame = frame; // Set new restore log
CurrentTasMovie.GetLogEntries().CopyTo(frame, _rightClickOverInput, 0, _rightClickOverInput.Length);
//.........这里部分代码省略.........
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:101,代码来源:TAStudio.ListView.cs
示例5: TasView_ColumnRightClick
private void TasView_ColumnRightClick(object sender, InputRoll.ColumnClickEventArgs e)
{
e.Column.Emphasis ^= true;
UpdateAutoFire(e.Column.Name, e.Column.Emphasis);
RefreshTasView();
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:8,代码来源:TAStudio.ListView.cs
示例6: TasView_ColumnReordered
private void TasView_ColumnReordered(object sender, InputRoll.ColumnReorderedEventArgs e)
{
CurrentTasMovie.FlagChanges();
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:4,代码来源:TAStudio.ListView.cs
示例7: TasView_ColumnClick
private void TasView_ColumnClick(object sender, InputRoll.ColumnClickEventArgs e)
{
if (TasView.SelectedRows.Any())
{
var columnName = e.Column.Name;
if (columnName == FrameColumnName)
{
CurrentTasMovie.Markers.Add(TasView.LastSelectedIndex.Value, "");
RefreshDialog();
}
else if (columnName != MarkerColumnName) // TODO: what about float?
{
foreach (var index in TasView.SelectedRows)
{
CurrentTasMovie.ToggleBoolState(index, columnName);
_triggerAutoRestore = true;
_triggerAutoRestoreFromFrame = TasView.SelectedRows.Min();
}
RefreshDialog();
}
}
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:25,代码来源:TAStudio.ListView.cs
示例8: TasView_QueryItemIcon
private void TasView_QueryItemIcon(int index, InputRoll.RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
{
var overrideIcon = GetIconOverride(index, column);
if (overrideIcon != null)
{
bitmap = overrideIcon;
return;
}
var columnName = column.Name;
if (columnName == CursorColumnName)
{
if (index == Emulator.Frame && index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green_blue :
Properties.Resources.ts_h_arrow_green_blue;
}
else if (index == Emulator.Frame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_blue :
Properties.Resources.ts_h_arrow_blue;
}
else if (index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green :
Properties.Resources.ts_h_arrow_green;
}
}
else if (columnName == FrameColumnName && VersionInfo.DeveloperBuild)
{
TasMovieRecord record = CurrentTasMovie[index];
if (record.HasState)
{
offsetX = -2;
offsetY = 2;
bitmap = Properties.Resources.anchor;
}
}
}
开发者ID:TechnoTaff,项目名称:BizHawk,代码行数:44,代码来源:TAStudio.ListView.cs
示例9: BranchView_CellHovered
private void BranchView_CellHovered(object sender, InputRoll.CellEventArgs e)
{
if (e.NewCell != null && e.NewCell.RowIndex.HasValue && e.NewCell.Column != null && e.NewCell.RowIndex < Movie.BranchCount)
{
if (e.NewCell.Column.Name == BranchNumberColumnName)
{
ScreenShotPopUp(GetBranch(e.NewCell.RowIndex.Value), e.NewCell.RowIndex.Value);
}
else
{
CloseScreenShotPopUp();
}
}
else
{
CloseScreenShotPopUp();
}
}
开发者ID:TraceBullet,项目名称:BizHawk,代码行数:18,代码来源:BookmarksBranchesBox.cs
示例10: TasView_QueryItemText
private void TasView_QueryItemText(int index, InputRoll.RollColumn column, out string text)
{
var overrideText = GetTextOverride(index, column);
if (overrideText != null)
{
text = overrideText;
return;
}
try
{
text = string.Empty;
var columnName = column.Name;
if (columnName == MarkerColumnName)
{
// Do nothing
}
else if (columnName == FrameColumnName)
{
text = (index).ToString().PadLeft(CurrentTasMovie.InputLogLength.ToString().Length, '0');
}
else
{
if (index < CurrentTasMovie.InputLogLength)
text = CurrentTasMovie.DisplayValue(index, columnName);
}
}
catch (Exception ex)
{
text = string.Empty;
MessageBox.Show("oops\n" + ex);
}
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:34,代码来源:TAStudio.ListView.cs
示例11: QueryItemText
private void QueryItemText(int index, InputRoll.RollColumn column, out string text)
{
text = string.Empty;
if (index >= Tastudio.CurrentTasMovie.TasBranches.Count)
{
return;
}
switch (column.Name)
{
case BranchNumberColumnName:
text = index.ToString();
break;
case FrameColumnName:
text = Branches[index].Frame.ToString();
break;
case TimeColumnName:
text = MovieTime(Branches[index].Frame).ToString(@"hh\:mm\:ss\.fff");
break;
}
}
开发者ID:raiscan,项目名称:BizHawk,代码行数:22,代码来源:BookmarksBranchesBox.cs
示例12: TasView_QueryItemBkColor
private void TasView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
var overrideColor = GetColorOverride(index, column);
if (overrideColor.HasValue)
{
color = overrideColor.Value;
return;
}
string columnName = column.Name;
if (columnName == MarkerColumnName)
{ // For debugging purposes, let's visually show the state frames
if (VersionInfo.DeveloperBuild && CurrentTasMovie.TasStateManager.HasState(index))
color = Color.FromArgb(0xEEEEEE);
else
color = Color.FromArgb(0xFEFFFF);
return;
}
if (columnName == FrameColumnName)
{
if (Emulator.Frame != index && CurrentTasMovie.Markers.IsMarker(index))
color = Marker_FrameCol;
}
else if (index == _floatEditRow && columnName == _floatEditColumn)
{ // SuuperW: Analog editing is indicated by a color change.
color = AnalogEdit_Col;
}
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:31,代码来源:TAStudio.ListView.cs
示例13: TasView_QueryItemBkColor
private void TasView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
Color? overrideColor = GetColorOverride(index, column);
if (overrideColor.HasValue)
{
color = overrideColor.Value;
return;
}
string columnName = column.Name;
if (columnName == CursorColumnName)
{ // For debugging purposes, let's visually show the state frames
if (VersionInfo.DeveloperBuild && CurrentTasMovie.TasStateManager.HasState(index))
color = Color.FromArgb(0xEEEEEE);
else
color = Color.FromArgb(0xFEFFFF);
return;
}
if (columnName == FrameColumnName)
{
if (Emulator.Frame != index && CurrentTasMovie.Markers.IsMarker(index))
color = Marker_FrameCol;
else
color = Color.FromArgb(32, 0, 0, 0); // same as players 2 and 4
}
else if (index == _floatEditRow && columnName == _floatEditColumn)
{ // SuuperW: Analog editing is indicated by a color change.
color = AnalogEdit_Col;
}
int player = Global.Emulator.ControllerDefinition.PlayerNumber(columnName);
if (player != 0 && player % 2 == 0)
color = Color.FromArgb(32, 0, 0, 0);
}
开发者ID:raiscan,项目名称:BizHawk,代码行数:37,代码来源:TAStudio.ListView.cs
示例14: MarkerView_QueryItemText
private void MarkerView_QueryItemText(int index, InputRoll.RollColumn column, out string text)
{
text = "";
if (column.Name == "FrameColumn")
{
text = Tastudio.CurrentTasMovie.Markers[index].Frame.ToString();
}
else if (column.Name == "LabelColumn")
{
text = Tastudio.CurrentTasMovie.Markers[index].Message;
}
}
开发者ID:cas1993per,项目名称:bizhawk,代码行数:13,代码来源:MarkerControl.cs
示例15: TasView_QueryItemIcon
private void TasView_QueryItemIcon(int index, InputRoll.RollColumn column, ref Bitmap bitmap)
{
var overrideIcon = GetIconOverride(index, column);
if (overrideIcon != null)
{
bitmap = overrideIcon;
return;
}
var columnName = column.Name;
if (columnName == CursorColumnName)
{
if (index == Emulator.Frame && index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green_blue :
Properties.Resources.ts_h_arrow_green_blue;
}
else if (index == Emulator.Frame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_blue :
Properties.Resources.ts_h_arrow_blue;
}
else if (index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green :
Properties.Resources.ts_h_arrow_green;
}
}
}
开发者ID:wildBill123,项目名称:BizHawk,代码行数:34,代码来源:TAStudio.ListView.cs
示例16: TasView_QueryItemText
private void TasView_QueryItemText(int index, InputRoll.RollColumn column, out string text)
{
var overrideText = GetTextOverride(index, column);
if (overrideText != null)
{
text = overrideText;
return;
}
try
{
text = string.Empty;
var columnName = column.Name;
if (columnName == CursorColumnName)
{
// TODO: what logic should we have when there is more than 1?
var branch = CurrentTasMovie.TasBranches.FirstOrDefault(x => x.Frame == index);
if (branch != null)
{
text = CurrentTasMovie.TasBranches.IndexOf(branch).ToString();
}
}
else if (columnName == FrameColumnName)
{
text = (index).ToString().PadLeft(CurrentTasMovie.InputLogLength.ToString().Length, '0');
}
else
{
if (index < CurrentTasMovie.InputLogLength)
text = CurrentTasMovie.DisplayValue(index, columnName);
}
}
catch (Exception ex)
{
text = string.Empty;
MessageBox.Show("oops\n" + ex);
}
}
开发者ID:raiscan,项目名称:BizHawk,代码行数:39,代码来源:TAStudio.ListView.cs
示例17: TasView_QueryItemIcon
private void TasView_QueryItemIcon(int index, InputRoll.RollColumn column, ref Bitmap bitmap)
{
var columnName = column.Name;
if (columnName == MarkerColumnName)
{
if (index == Emulator.Frame && index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green_blue :
Properties.Resources.ts_h_arrow_green_blue;
}
else if (index == Emulator.Frame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_blue :
Properties.Resources.ts_h_arrow_blue;
}
else if (index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
Properties.Resources.ts_v_arrow_green :
Properties.Resources.ts_h_arrow_green;
}
}
}
开发者ID:TomzxForks,项目名称:BizHawk,代码行数:26,代码来源:TAStudio.ListView.cs
示例18: QueryItemBkColor
private void QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
TasBranch branch = GetBranch(index);
if (branch != null)
{
var record = Tastudio.CurrentTasMovie[branch.Frame];
if (index == Movie.CurrentBranch)
color = TAStudio.CurrentFrame_InputLog; // SystemColors.HotTrack;
else if (record.Lagged.HasValue)
{
if (record.Lagged.Value)
{
color = TAStudio.LagZone_InputLog;
}
else
{
color = TAStudio.GreenZone_InputLog;
}
}
}
// Highlight the branch cell a little, if hovering over it
if (BranchView.CurrentCellIsDataCell &&
BranchView.CurrentCell.Column.Name == BranchNumberColumnName &&
column.Name == BranchNumberColumnName &&
index == BranchView.CurrentCell.RowIndex)
{
color = Color.FromArgb((byte)(color.A - 24), (byte)(color.R - 24), (byte)(color.G - 24), (byte)(color.B - 24));
}
}
开发者ID:henke37,项目名称:BizHawk,代码行数:30,代码来源:BookmarksBranchesBox.cs
示例19: BranchView_CellDropped
private void BranchView_CellDropped(object sender, InputRoll.CellEventArgs e)
{
if (e.NewCell != null && e.NewCell.IsDataCell)
{
var branch = Branches[e.OldCell.RowIndex.Value];
int originalIndex = Branches.IndexOf(branch);
int newIndex = e.NewCell.RowIndex.Value;
if (newIndex >= Branches.Count)
newIndex = Branches.Count - 1;
Branches.Remove(branch);
Branches.Insert(newIndex, branch);
}
}
开发者ID:raiscan,项目名称:BizHawk,代码行数:15,代码来源:BookmarksBranchesBox.cs
示例20: TasView_QueryItemIcon
private void TasView_QueryItemIcon(int index, InputRoll.RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
{
var overrideIcon = GetIconOverride(index, column);
if (overrideIcon != null)
{
bitmap = overrideIcon;
return;
}
var columnName = column.Name;
if (columnName == CursorColumnName)
{
if (index == Emulator.Frame && index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
ts_v_arrow_green_blue :
ts_h_arrow_green_blue;
}
else if (index == Emulator.Frame)
{
bitmap = TasView.HorizontalOrientation ?
ts_v_arrow_blue :
ts_h_arrow_blue;
}
else if (index == GlobalWin.MainForm.PauseOnFrame)
{
bitmap = TasView.HorizontalOrientation ?
ts_v_arrow_green :
ts_h_arrow_green;
}
}
else if (columnName == FrameColumnName)
{
TasMovieRecord record = CurrentTasMovie[index];
offsetX = -3;
offsetY = 1;
if (CurrentTasMovie.Markers.IsMarker(index) && TasView.denoteMarkersWithIcons)
bitmap = icon_marker;
else if (record.HasState && TasView.denoteStatesWithIcons)
{
if (record.Lagged.HasValue && record.Lagged.Value)
bitmap = icon_anchor_lag;
else
bitmap = icon_anchor;
}
}
}
开发者ID:henke37,项目名称:BizHawk,代码行数:50,代码来源:TAStudio.ListView.cs
注:本文中的BizHawk.Client.EmuHawk.InputRoll类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论