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 664978 - Use a new game screen or move new game options to the app menu
Use a new game screen or move new game options to the app menu
Status: RESOLVED OBSOLETE
Product: swell-foop
Classification: Applications
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: swell-foop-maint
swell-foop-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-27 23:04 UTC by Robert Ancell
Modified: 2018-05-22 11:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace New Game button and add a Play Again button to the Game Over screen (3.84 KB, patch)
2014-09-22 14:13 UTC, Iulian Radu
reviewed Details | Review
Replace New Game button and add a Play Again button to the Game Over screen (3.49 KB, patch)
2014-09-25 12:09 UTC, Iulian Radu
reviewed Details | Review
Button is now same size as in Allan's mockup (3.59 KB, patch)
2014-09-25 13:44 UTC, Iulian Radu
reviewed Details | Review

Description Robert Ancell 2011-11-27 23:04:35 UTC
Use a new game screen that shows the game options at the start of a game.  This means that preferences dialogs for game difficulty can be removed and resolves the issue that options can be changed while a game is in progress.  See the Sudoku start screen for ideas.
Comment 1 Robert Ancell 2011-12-04 02:20:02 UTC
Probably should be done after the game is ported to Vala (bug 664943).
Comment 2 Michael Catanzaro 2014-09-07 19:07:12 UTC
Reassessing whether we really want new game screens for all of our games....

For Swell Foop, we want to remove the Board size and Number of colors preferences from the preferences dialog. However, Swell Foop is very quick to play, and a new game screen would be annoying even if it required only one click to get through.  So the app menu would probably be a better place for these two options. Changing those settings would cause the game to immediately restart, after presenting a warning dialog (if the game has already started).

If we do use a new game screen, it would need to be done the same way we handles Mines's: by default, start a new game skipping the screen, and add a Change Settings or Change Difficulty button (maybe with a different name) to take you to the new game screen. This would require a new window layout for Swell Foop, since we don't even have enough space to use a text label in the new game button, let alone add another one.
Comment 3 Allan Day 2014-09-18 10:25:58 UTC
(In reply to comment #2)
> ... Swell Foop is very quick to
> play, and a new game screen would be annoying even if it required only one
> click to get through.

I'm inclined to agree.

> So the app menu would probably be a better place for
> these two options. Changing those settings would cause the game to immediately
> restart, after presenting a warning dialog (if the game has already started).

Here's an idea for how it might work - https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/games/swell-foop/swell-foop.png
Comment 4 Michael Catanzaro 2014-09-18 14:33:54 UTC
Thanks!
Comment 5 Iulian Radu 2014-09-20 22:01:16 UTC
I will have a try at implementing Allan's design.
Comment 6 Iulian Radu 2014-09-22 14:13:51 UTC
Created attachment 286816 [details] [review]
Replace New Game button and add a Play Again button to the Game Over screen

My work so far.
Comment 7 Michael Catanzaro 2014-09-23 14:33:06 UTC
Review of attachment 286816 [details] [review]:

Looks like good progress. Let me know if you have any specific questions!

::: src/game-view.vala
@@ +308,3 @@
+
+        var play_again_button = new Gtk.Button ();
+        play_again_button.label = _("Play Again");

I think you can use Gtk.Button.with_label() here instead. But it'd be awesome if mnemonics work, so give Gtk.Button.with_mnemonic() a try too. (Place an underscore in front of the P in the label, then hold Alt and see if you can activate it by pressing P.)

@@ +310,3 @@
+        play_again_button.label = _("Play Again");
+        play_again_button.action_name = "app.new-game";
+        play_again_button.tooltip_text = _("Start a new game");

I'm not sure the tooltip is a good idea.

@@ +316,3 @@
+        style.add_class ("suggested-action");
+
+        var button_actor = new GtkClutter.Actor.with_contents (play_again_button);

OK, looks like this was easier than I was expecting it to be. Great.

::: src/swell-foop.vala
@@ +107,3 @@
+
+            var settings_menu = new Gtk.Menu ();
+            settings_button.set_popup (settings_menu);

This is what's disabling the popover. You have to use set_popover() instead.
Comment 8 Michael Catanzaro 2014-09-23 14:34:40 UTC
(In reply to comment #7)
> You have to use set_popover() instead.

Just kidding. That would be difficult; don't try that. Try set_menu_model(); it should just work.
Comment 9 Iulian Radu 2014-09-25 12:09:28 UTC
Created attachment 287065 [details] [review]
Replace New Game button and add a Play Again button to the Game Over screen

Should be much better now.
Comment 10 Michael Catanzaro 2014-09-25 13:02:14 UTC
Review of attachment 287065 [details] [review]:

OK, it works well and I don't see any issues with the code. But the button feels too small to me; can you make it a bit bigger, like in Allan's mockup?
Comment 11 Iulian Radu 2014-09-25 13:44:33 UTC
Created attachment 287082 [details] [review]
Button is now same size as in Allan's mockup
Comment 12 Michael Catanzaro 2014-09-25 16:38:19 UTC
Review of attachment 287082 [details] [review]:

I guess it needs to be larger than in the mockup, since it's still quite small.
Comment 13 Michael Catanzaro 2014-09-25 16:41:18 UTC
Anyway, the next step is to replace the preferences dialog with this new game screen (which Allan has called "preferences" -- that's fine).  To match his mockup you'll need to remove the zealous animation preference, which was not a particularly useful preference anyway, and also the preference that allows you to use colors without shapes.  (From his mockup, he instead removes the ability to have shapes with the colors. I'm not sure if that's the desired final result or just a shortcut for the purposes of the mockup, but regardless, our colors aren't vibrant enough to use unmodified without shapes, so let's keep the shapes for the time being.)
Comment 14 Iulian Radu 2014-09-25 19:02:15 UTC
What I see from Allan's mockup is that the middle top screen is the New Game screen (new game as in "the first time you open the game screen"), the preferences screen(the preferences dialog more exactly - middle left) and the Game Over screen displayed when finishing a game. Is this correct? Or that preferences dialog should be the screen you see when you open the game?
Comment 15 Michael Catanzaro 2014-09-25 20:43:17 UTC
There's a confusing disconnect between the terminology shown in the mockup (which is what we want to implement) and the terminology I use:

* First run dialog -- explains the rules the first time the game is launched
* New game screen -- screen for changing options that can't be changed while a game is in progress and then starting a new game, labeled Preferences in the mockup; that's the subject of this bug
* Preferences dialog -- the thing we want to remove and replace with the new game screen titled Preferences in the mockup
Comment 16 Robert Roth 2015-01-01 15:39:19 UTC
@Iulian Radu: Do you plan to continue working on this?
Comment 17 Robert Roth 2017-12-08 21:15:39 UTC
(In reply to Iulian Radu from comment #14)
Ping @Iulian Radu, do you plan to work on this?
Comment 18 Iulian Radu 2017-12-08 21:42:16 UTC
Hello,

I'm sorry for such a late answer. I won't be able to work on it anytime soon.
Comment 19 Robert Roth 2018-01-29 22:47:00 UTC
For now I did:
* update the appmenu as in the mockup
* moved play again button from headerbar into game area
* updated high scores dialog title
What's left to do
* update the preferences dialog
  * remove the zealous animation configuration option from the preferences, leaving default to true, dconf option should still be left there
  * remove the option to select theme, stay with colors and shapes by default
  * change the board size selector to a graphic one
  * change the colors selector to a graphic one
  * add Restart and Cancel to the preferences dialog headerbar
* add "score to reach leaderboard" to the game over screen
Comment 20 GNOME Infrastructure Team 2018-05-22 11:38:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/swell-foop/issues/3.