1
Window / Dual Monitor
« on: September 22, 2009, 04:20:46 am »
Does SFML support dual monitor displays? I'm not sure as to how I would create a sf::renderwindow for a dual monitor setup. Any helps/links/tips would be great, thank you
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
/////////////////////////////////////////////////
/// Place sprite positions (background)
Background[0].SetPosition(0.f, 0.f);
Background[1].SetPosition(300.f, 0.f);
Background[2].SetPosition(600.f, 0.f);
Background[3].SetPosition(900.f, 0.f);
Background[4].SetPosition(0.f, 300.f);
Background[5].SetPosition(0.f, 600.f);
Background[6].SetPosition(0.f, 900.f);
Background[7].SetPosition(300.f, 300.f);
Background[8].SetPosition(600.f, 600.f);
Background[9].SetPosition(900.f, 900.f);
Background[10].SetPosition(600.f, 300.f);
Background[11].SetPosition(900.f, 300.f);
Background[12].SetPosition(900.f, 600.f);
Background[13].SetPosition(300.f, 600.f);
Background[14].SetPosition(300.f, 900.f);
Background[15].SetPosition(600.f, 900.f);
/////////////////////////////////////////////////
namespace gtp
{
struct Vector2
{
Vector2();
Vector2(float x, float y);
Vector2& operator=(const Vector2& param);
float x;
float y;
};
Vector2 normalize(Vector2 Target, Vector2 Current);
}
namespace gtp
{
Vector2 gtp::normalize(Vector2 Target, Vector2 Current)
{
Vector2 _Normal;
float SlopeX = Target.x - Current.x;
float SlopeY = Target.y - Current.y;
if ((SlopeY == 1) || (SlopeY == -1))
{
_Normal.y = SlopeY;
_Normal.x = SlopeX;
}
else
{
_Normal.y = (SlopeY / SlopeY);
_Normal.x = (SlopeX / SlopeY);
}
return _Normal;
}
}
//Direction 1 (Quadrant 1 - North West)
if ((Event.MouseMove.X > 50) && (Event.MouseMove.Y < ((int)App.GetHeight() + 50)))
{
GameView.Move(-1.f * ElapsedTime, -1.f);
}