I'm not sure what you mean by too dependent. I was using GraphicsWidth() etc to make it less dependent on pre set constants and work for whatever screen/window size the app gets set to.
Would you do this another way? Or did you mean use a global variable at the start and set it via the GraphicsHeight() then use the variable in the code?
Would you do this another way? Or did you mean use a global variable at the start and set it via the GraphicsHeight() then use the variable in the code?
While using GraphicsWidth/Height makes it independent of screen resolution, it still always uses full screen. You could use a Global variable to make it possible to leave some screen space for UI. I prefer using the ViewPort, though, since that's pretty much what it's for.
And sorry to be a pain but could you explain the different logic to me for the else, elseif, endif vs the singular if then's. I'm just hazarding a guess but is it because my 'optional' version is considered as one statement and processed once per time through the loop while the singular 'if thens' allow for the potential of two if's activating the screen move?
Consider a situation where two keys are down. The ElseIf version only registers the first one, whereas the multi-If-version registers both.