Input roll - simplify a few things
This commit is contained in:
parent
bf14551632
commit
830a785545
|
@ -19,9 +19,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
//SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
//SetStyle(ControlStyles.Opaque, true);
|
SetStyle(ControlStyles.Opaque, true);
|
||||||
this.Font = new Font("Courier New", 8);
|
this.Font = new Font("Courier New", 8);
|
||||||
BackColor = Color.Transparent;
|
//BackColor = Color.Transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
@ -171,20 +171,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
protected override void OnPaintBackground(PaintEventArgs pevent)
|
protected override void OnPaintBackground(PaintEventArgs pevent)
|
||||||
{
|
{
|
||||||
using (var ntr = new GDIRenderer(this))
|
|
||||||
{
|
|
||||||
if (NeedToUpdateColumn() && Columns.Any())
|
|
||||||
{
|
|
||||||
DrawColumnBg(ntr, pevent);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NeedToUpdateBg())
|
|
||||||
{
|
|
||||||
DrawBg(ntr, pevent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//base.OnPaintBackground(pevent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawColumnText(GDIRenderer ntr, PaintEventArgs e)
|
private void DrawColumnText(GDIRenderer ntr, PaintEventArgs e)
|
||||||
|
@ -213,10 +200,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
using (var ntr = new GDIRenderer(this))
|
using (var ntr = new GDIRenderer(this))
|
||||||
{
|
{
|
||||||
if (NeedToUpdateColumn() && Columns.Any())
|
// Header
|
||||||
|
if (Columns.Any())
|
||||||
{
|
{
|
||||||
|
DrawColumnBg(ntr, e);
|
||||||
DrawColumnText(ntr, e);
|
DrawColumnText(ntr, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Background
|
||||||
|
DrawBg(ntr, e);
|
||||||
|
|
||||||
|
// ForeGround
|
||||||
}
|
}
|
||||||
|
|
||||||
//base.OnPaint(e);
|
//base.OnPaint(e);
|
||||||
|
@ -240,21 +234,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
#region Helpers
|
#region Helpers
|
||||||
|
|
||||||
private bool NeedToUpdateColumn()
|
|
||||||
{
|
|
||||||
return true; // TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool NeedToUpdateText()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool NeedToUpdateBg()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool NeedToUpdateScrollbar()
|
private bool NeedToUpdateScrollbar()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -338,8 +317,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class RollColumn
|
public class RollColumn
|
||||||
{
|
{
|
||||||
public enum InputType { Boolean, Float, Text }
|
public enum InputType { Boolean, Float, Text }
|
||||||
|
|
Loading…
Reference in New Issue