change mouse sequence to blocked whene map borders are reached
This commit is contained in:
committed by
Chris Forbes
parent
73017d3f5c
commit
669aaab6b4
@@ -51,23 +51,55 @@ namespace OpenRA.Widgets
|
||||
if (!Game.Settings.Game.ViewportEdgeScroll)
|
||||
return null;
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Left))
|
||||
return "scroll-tl";
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Right))
|
||||
return "scroll-tr";
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Left))
|
||||
return "scroll-bl";
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Right))
|
||||
return "scroll-br";
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if(BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-tl-blocked";
|
||||
else
|
||||
return "scroll-tl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Up) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Up) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-tr-blocked";
|
||||
else
|
||||
return "scroll-tr";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Left)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Left))
|
||||
return "scroll-bl-blocked";
|
||||
else
|
||||
return "scroll-bl";
|
||||
}
|
||||
if (Edge.Includes(ScrollDirection.Down) && Edge.Includes(ScrollDirection.Right)){
|
||||
ScrollDirection BlockedDirections = Game.viewport.GetBlockedDirections();
|
||||
if (BlockedDirections.Includes(ScrollDirection.Down) && BlockedDirections.Includes(ScrollDirection.Right))
|
||||
return "scroll-br-blocked";
|
||||
else
|
||||
return "scroll-br";
|
||||
}
|
||||
|
||||
if (Edge.Includes(ScrollDirection.Up))
|
||||
return "scroll-t";
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Up))
|
||||
return "scroll-t-blocked";
|
||||
else
|
||||
return "scroll-t";
|
||||
if (Edge.Includes(ScrollDirection.Down))
|
||||
return "scroll-b";
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Down))
|
||||
return "scroll-b-blocked";
|
||||
else
|
||||
return "scroll-b";
|
||||
if (Edge.Includes(ScrollDirection.Left))
|
||||
return "scroll-l";
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Left))
|
||||
return "scroll-l-blocked";
|
||||
else
|
||||
return "scroll-l";
|
||||
if (Edge.Includes(ScrollDirection.Right))
|
||||
return "scroll-r";
|
||||
if (Game.viewport.GetBlockedDirections().Includes(ScrollDirection.Right))
|
||||
return "scroll-r-blocked";
|
||||
else
|
||||
return "scroll-r";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user