Modified code to compile on Linux
This commit is contained in:
@@ -274,7 +274,7 @@ namespace Subsurface
|
||||
|
||||
bool clicked = false;
|
||||
|
||||
if (rect.Contains(PlayerInput.GetMouseState.Position))
|
||||
if (rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
clicked = (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Subsurface
|
||||
|
||||
public override void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
if (rect.Contains(PlayerInput.GetMouseState.Position) && Enabled && (MouseOn == null || MouseOn == this || IsParentOf(MouseOn)))
|
||||
if (rect.Contains(PlayerInput.MousePosition) && Enabled && (MouseOn == null || MouseOn == this || IsParentOf(MouseOn)))
|
||||
{
|
||||
state = ComponentState.Hover;
|
||||
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
|
||||
|
||||
@@ -284,7 +284,7 @@ namespace Subsurface
|
||||
if (CheckSelected() != selected.UserData) selected = null;
|
||||
}
|
||||
}
|
||||
else if (enabled && (MouseOn == this || (MouseOn != null && this.IsParentOf(MouseOn))) && child.Rect.Contains(PlayerInput.GetMouseState.Position))
|
||||
else if (enabled && (MouseOn == this || (MouseOn != null && this.IsParentOf(MouseOn))) && child.Rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
child.State = ComponentState.Hover;
|
||||
if (PlayerInput.LeftButtonClicked())
|
||||
|
||||
@@ -155,14 +155,14 @@ namespace Subsurface
|
||||
int moveAmount;
|
||||
if (isHorizontal)
|
||||
{
|
||||
moveAmount = PlayerInput.GetMouseState.Position.X - PlayerInput.GetOldMouseState.Position.X;
|
||||
moveAmount = (int)PlayerInput.MouseSpeed.X;
|
||||
newX = Math.Min(Math.Max(newX + moveAmount, 0), frame.Rect.Width - bar.Rect.Width);
|
||||
|
||||
barScroll = (float)newX / ((float)frame.Rect.Width - (float)bar.Rect.Width);
|
||||
}
|
||||
else
|
||||
{
|
||||
moveAmount = PlayerInput.GetMouseState.Position.Y - PlayerInput.GetOldMouseState.Position.Y;
|
||||
moveAmount = (int)PlayerInput.MouseSpeed.Y;
|
||||
newY = Math.Min(Math.Max(newY+moveAmount, 0), frame.Rect.Height - bar.Rect.Height);
|
||||
|
||||
barScroll = (float)newY / ((float)frame.Rect.Height - (float)bar.Rect.Height);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Subsurface
|
||||
caretTimer += deltaTime;
|
||||
caretVisible = ((caretTimer*1000.0f) % 1000) < 500;
|
||||
|
||||
if (rect.Contains(PlayerInput.GetMouseState.Position))
|
||||
if (rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
state = ComponentState.Hover;
|
||||
if (PlayerInput.LeftButtonClicked()) Select();
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Subsurface
|
||||
|
||||
if (!Enabled) return;
|
||||
|
||||
if (box.Rect.Contains(PlayerInput.GetMouseState.Position))
|
||||
if (box.Rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user