Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read this question, but didn't understand the implementation suggestions with SFML on C#.

For example, right now I'm just trying to make sure that the mouse crosshairs stay onscreen constantly. I tried using this code:

        View lastView = this._mainWindow.GetView();
        this._mainWindow.SetView(this._mainWindow.DefaultView);
        this._mainWindow.Draw(crosshair);
        this._mainWindow.SetView(lastView);

After drawing all other sprites and before call this._mainWindow.display(), when beforehand I set crosshair.Position based on its position relative to the window, not the view. This just keeps the screen locked and prevents screen scrolling. Any suggestions?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.