Skip to content

Commit 306609f

Browse files
committed
Minor Button Improvements
I changed the location of the text so that it is actually in the center and added another event call to support the object
1 parent 0853ae2 commit 306609f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

release/studios.vanish.engine.jar

36 Bytes
Binary file not shown.

src/studios/vanish/engine/Button.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public void Check(Point MouseLocation, int Button)
9292
if (down == true)
9393
{
9494
OnClick.InvokeAll(MouseLocation, Button);
95+
OnClick.InvokeAll(this, MouseLocation, Button);
9596
down = false;
9697
}
9798
}
@@ -107,7 +108,7 @@ public void Render(GraphicsUnit Graphics)
107108
{
108109
Size center = Graphics.GetTextSize(Text, TextFont);
109110
Initialize();
110-
Point text = new Point(bounds.GetShapeCenter().X - (center.Width / 2), bounds.GetShapeCenter().Y - (center.Height / 2));
111+
Point text = new Point(bounds.GetShapeCenter().X - (center.Width / 2) - 1, bounds.GetShapeCenter().Y - (center.Height / 2) - 2);
111112
bounds.Render(Graphics);
112113
Graphics.DrawString(Text, ForeColor[state], text, TextFont);
113114
}

0 commit comments

Comments
 (0)