Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - ParadoxGery

Pages: [1]
1
Graphics / Re: GetGlobalBounds not updating?
« on: January 27, 2013, 11:09:13 pm »
i want to move things around and it was simple with the Translate method
but after compiling the newest sfml the sprite is not moving
public void StartTest()
{
    //set the window and event handlers
    renWin = new RenderWindow(new VideoMode(800, 600), "DraggTest");
    renWin.Closed += new EventHandler(OnClose);
    renWin.MouseButtonPressed += new EventHandler<MouseButtonEventArgs>(OnClick);
    renWin.MouseButtonReleased += new EventHandler<MouseButtonEventArgs>(OnClickRelease);
    renWin.MouseMoved += new EventHandler<MouseMoveEventArgs>(OnMousMove);
    renWin.KeyPressed += new EventHandler<KeyEventArgs>(OnKey);
    renWin.MouseLeft += new EventHandler(OnMouseLeft);

    //set the sprite
    Texture tex = new Texture("imgs\\ace.gif");
    sprite = new Sprite(tex);
    //move the sprite from the start 0,0 position to 20,20
    sprite.Position = new Vector2f(20,20); //works
    //sprite.Transform.Translate(20,20); //doesn't work

    //the loop
    while (renWin.IsOpen())
    {
        //events
        renWin.DispatchEvents();

        //clear
        renWin.Clear(Color.Black);

        //move sprite
        if (dragging)
        {
            sprite.Position = mPos-dPos;
        }

        //draw sprite
        renWin.Draw(sprite);

        //update window
        renWin.Display();
    }
}

2
Graphics / Re: GetGlobalBounds not updating?
« on: January 27, 2013, 08:03:36 pm »
hi i got the same proble but i fixes it like Quentin....
but now i can't use sprite.Transform.Translate() anymore why ?! you going to remove this


nice work i love sfml

Pages: [1]