mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Make "X" button on tab only respond to left clicks
This commit is contained in:
parent
c18e24d7e6
commit
8dcdc2f1a7
1 changed files with 7 additions and 4 deletions
|
@ -23,7 +23,7 @@ namespace Beefy.theme.dark
|
||||||
base.Draw(g);
|
base.Draw(g);
|
||||||
if (mMouseOver)
|
if (mMouseOver)
|
||||||
{
|
{
|
||||||
using (g.PushColor(mMouseDown ? 0xFFFF0000 : Color.White))
|
using (g.PushColor((mMouseFlags.HasFlag(.Left)) ? 0xFFFF0000 : Color.White))
|
||||||
g.Draw(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.CloseOver), GS!(-4), GS!(-4));
|
g.Draw(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.CloseOver), GS!(-4), GS!(-4));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -40,9 +40,12 @@ namespace Beefy.theme.dark
|
||||||
{
|
{
|
||||||
base.MouseClicked(x, y, origX, origY, btn);
|
base.MouseClicked(x, y, origX, origY, btn);
|
||||||
|
|
||||||
var tabButton = (DarkTabButton)mParent;
|
if (btn == 0)
|
||||||
if (tabButton.mCloseClickedEvent.HasListeners)
|
{
|
||||||
tabButton.mCloseClickedEvent();
|
var tabButton = (DarkTabButton)mParent;
|
||||||
|
if (tabButton.mCloseClickedEvent.HasListeners)
|
||||||
|
tabButton.mCloseClickedEvent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MouseMove(float x, float y)
|
public override void MouseMove(float x, float y)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue