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)
|
private void ScreenShotPopUp(TasBranch branch, int index)
|
||||||
{
|
{
|
||||||
Tastudio.ScreenshotControl.Location = new Point(
|
int x = this.Location.X - Tastudio.ScreenshotControl.Width;
|
||||||
this.Location.X - branch.OSDFrameBuffer.Width - ScreenshotPopupControl.BorderWidth,
|
int y = this.Location.Y + (BranchView.RowHeight * index);
|
||||||
this.Location.Y + ((BranchView.RowHeight * index) + BranchView.RowHeight) - branch.OSDFrameBuffer.Height - ScreenshotPopupControl.BorderWidth);
|
|
||||||
|
Tastudio.ScreenshotControl.Location = new Point(x, y);
|
||||||
|
|
||||||
Tastudio.ScreenshotControl.Visible = true;
|
Tastudio.ScreenshotControl.Visible = true;
|
||||||
Tastudio.ScreenshotControl.Branch = branch;
|
Tastudio.ScreenshotControl.Branch = branch;
|
||||||
|
Tastudio.ScreenshotControl.Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,19 +18,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public const int BorderWidth = 20;
|
public TasBranch Branch { get; set; }
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScreenshotPopupControl_Load(object sender, EventArgs e)
|
private void ScreenshotPopupControl_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -39,8 +27,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
e.Graphics.DrawRectangle(new Pen(Brushes.Black), 0, 0, Width - 1, Height - 1);
|
var bitmap = Branch.OSDFrameBuffer.ToSysdrawingBitmap();
|
||||||
e.Graphics.DrawImage(Branch.OSDFrameBuffer.ToSysdrawingBitmap(), new Point(BorderWidth, BorderWidth));
|
e.Graphics.DrawImage(bitmap, new Rectangle(0, 0, Width, Height));
|
||||||
base.OnPaint(e);
|
base.OnPaint(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
@ -37,9 +38,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private UndoHistoryForm undoForm;
|
private UndoHistoryForm undoForm;
|
||||||
|
|
||||||
public ScreenshotPopupControl ScreenshotControl = new ScreenshotPopupControl
|
public ScreenshotPopupControl ScreenshotControl = new ScreenshotPopupControl
|
||||||
{
|
{
|
||||||
Size = new System.Drawing.Size(250, 250),
|
Size = new Size(200, 200),
|
||||||
};
|
};
|
||||||
|
|
||||||
[ConfigPersist]
|
[ConfigPersist]
|
||||||
public TAStudioSettings Settings { get; set; }
|
public TAStudioSettings Settings { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue