GNOME Bugzilla – Bug 694074
Panning support for games larger then users screen.
Last modified: 2014-05-07 02:24:04 UTC
Created attachment 236572 [details] [review] Panning support for games larger then users screen. (Version 0.1) This patch adds an option to pan games larger then the users screen. The minefield can be panned using either the mouse or Shift+Arrow keys. Using the mouse: Middle button + motion or when in full screen mode, moving the mouse to the outer edges of the screen. This patch is probably not ready to be committed, but feed back would be appreciated including any bugs found, improvements and further additions or any thoughts on the coding style (have I overused the ternary '?' operator?). Additional: What is the policy for this project regarding contributors adding their names to the About dialog credits section? Thanks.
Review of attachment 236572 [details] [review]: I was thinking "oh boy this sounds like huge overkill" since so few programs work well on 800x600 nowadays. But your panning actually works pretty well and seems harmless. If you try to place a flag by right-clicking after having left your original position, the flag will be placed in the wrong location. The ternaries in the lambdas look fine, but I would say this one should probably be expanded: panning_velocity = {x < 0 ? -1 : x >= minefield_view_width ? 1 : 0, y < 0 ? -1 : y >= minefield_view_height ? 1 : 0}; Why is fullscreen required to enable panning with the mouse?
Also there's at least one spot where you're missing the space between function name and opening parentheses, though you did it right for the most part.
Hey Isaac, will you be able to update your patch to account for my review comments and to rebase in onto master? (In particular, note that Mines no longer has a fullscreen mode.)
Fixed in head, if the minefield doesn't fit onto the user's screen, scrollbars are added.