Tastudio branches - screenshot hover - fixes and cleanups
This commit is contained in:
parent
b67fda05f5
commit
59c7349900
|
@ -249,11 +249,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void ScreenShotPopUp(TasBranch branch, int index)
|
||||
{
|
||||
Tastudio.ScreenshotControl.Location = new Point(
|
||||
this.Location.X - branch.OSDFrameBuffer.Width - ScreenshotPopupControl.BorderWidth,
|
||||
this.Location.Y + ((BranchView.RowHeight * index) + BranchView.RowHeight) - branch.OSDFrameBuffer.Height - ScreenshotPopupControl.BorderWidth);
|
||||
int x = this.Location.X - Tastudio.ScreenshotControl.Width;
|
||||
int y = this.Location.Y + (BranchView.RowHeight * index);
|
||||
|
||||
Tastudio.ScreenshotControl.Location = new Point(x, y);
|
||||
|
||||
Tastudio.ScreenshotControl.Visible = true;
|
||||
Tastudio.ScreenshotControl.Branch = branch;
|
||||
Tastudio.ScreenshotControl.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,19 +18,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
public const int BorderWidth = 20;
|
||||
private TasBranch _branch = null;
|
||||
|
||||
public TasBranch Branch
|
||||
{
|
||||
get { return _branch; }
|
||||
set
|
||||
{
|
||||
_branch = value;
|
||||
Size = new Size(Branch.OSDFrameBuffer.Width + (BorderWidth * 2), Branch.OSDFrameBuffer.Height + (BorderWidth * 2));
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
public TasBranch Branch { get; set; }
|
||||
|
||||
private void ScreenshotPopupControl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -39,8 +27,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
e.Graphics.DrawRectangle(new Pen(Brushes.Black), 0, 0, Width - 1, Height - 1);
|
||||
e.Graphics.DrawImage(Branch.OSDFrameBuffer.ToSysdrawingBitmap(), new Point(BorderWidth, BorderWidth));
|
||||
var bitmap = Branch.OSDFrameBuffer.ToSysdrawingBitmap();
|
||||
e.Graphics.DrawImage(bitmap, new Rectangle(0, 0, Width, Height));
|
||||
base.OnPaint(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
@ -37,9 +38,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
private UndoHistoryForm undoForm;
|
||||
|
||||
public ScreenshotPopupControl ScreenshotControl = new ScreenshotPopupControl
|
||||
{
|
||||
Size = new System.Drawing.Size(250, 250),
|
||||
};
|
||||
{
|
||||
Size = new Size(200, 200),
|
||||
};
|
||||
|
||||
[ConfigPersist]
|
||||
public TAStudioSettings Settings { get; set; }
|
||||
|
|
Loading…
Reference in New Issue