After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694074 - Panning support for games larger then users screen.
Panning support for games larger then users screen.
Status: RESOLVED FIXED
Product: gnome-mines
Classification: Applications
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: gnome-mines-maint
gnome-mines-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-18 10:40 UTC by Isaac Lenton
Modified: 2014-05-07 02:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Panning support for games larger then users screen. (Version 0.1) (17.73 KB, patch)
2013-02-18 10:40 UTC, Isaac Lenton
needs-work Details | Review

Description Isaac Lenton 2013-02-18 10:40:47 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.
Comment 1 Michael Catanzaro 2013-08-18 00:18:01 UTC
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?
Comment 2 Michael Catanzaro 2013-08-18 00:20:38 UTC
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.
Comment 3 Michael Catanzaro 2014-04-02 22:06:51 UTC
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.)
Comment 4 Robert Roth 2014-05-07 02:24:04 UTC
Fixed in head, if the minefield doesn't fit onto the user's screen, scrollbars are added.