Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If main_scene is not set it will be set to the current scene... #1242

Closed

Conversation

NathanWarden
Copy link
Contributor

If main_scene is not set it will be set to the current scene when running the project (or pressing F5)

@NathanWarden
Copy link
Contributor Author

This pull request is based off of this discussion. Thanks :)

#1134

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

Nice, it's a minor change but these things add up to making Godot having a better user experience.

But I noticed you seem to have made another dialog to say "save the scene before running" without prompting to the "save as" window automatically. I already made this change in a commit before, so IMO you should call _menu_option_confirm(FILE_SAVE_BEFORE_RUN, false); in place of where you created that dialog. FILE_SAVE_BEFORE_RUN will tell the user the scene has never been saved before, and will open the file save dialog and run the scene automatically after saving.

@NathanWarden
Copy link
Contributor Author

Awesome, thanks! I just added that in there instead of the message.

@reduz
Copy link
Member

reduz commented Jan 17, 2015

As an usability feature, I'm not so sure about this one. For a new user, if this happens automatically, it may be great at first but later he or she will have no idea why a scene runs instead of another scene. In the current way, the user is forced to explore. Maybe what could happen instead is to give the option to the user to open the project manager and edit that property?

As a productivity feature, I'm also not sure how useful it is as it only happens once for each project.

@mamarilmanson
Copy link

why not ask a question: "Do you want to save this and make your main scene?"

or maybe do what web servers do... once they see index.php they set it as the first page...

in this case make main.scn/xscn/res the main scene...

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

@reduz brings a good point. I think one of @mamarilmanson's suggestions would probably work better in the long run.

@NathanWarden
Copy link
Contributor Author

Juan, I'm inclined to agree with you and the same thing had crossed my mind a while after I sent the PR.

I think there are a few options here:

  1. Leave it as is in master. (The message that says they don't have a main scene set and they should go to project settings a.)
  2. Do what mamarilmanson suggests and present them with a yes/no dialog.
  3. Have a dialog that says something like "No main scene setup, would you like to open up project settings now? Yes : No" and it opens up the project settings.

Regardless, unless I'm missing something, I think whatever the decision is that it probably should apply to the Export button also since it seems pointless to build out a project with no main_scene set.

What do you guys think?

@NathanWarden
Copy link
Contributor Author

I just noticed Juan already mentioned option 3, what do you guys think about option 3? And should it also apply to the "Export" button? Thanks!

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

The purpose of me opening an issue about this is so we can eliminate
intrusive pop ups for developers. If we add a new popup for the main scene
then we'll have three total dialogs to get through just to run the project
the first time.

If we add this dialog for the main scene then IMO we should save the scene
(a temp save?) automatically without prompting the user first, so we have
less of these pesky pop ups.

@NathanWarden
Copy link
Contributor Author

Yeah, I definitely can understand that. However, this popup would only show up once per project and it points people (IE newcomers) to where they need to go to change the main scene, thus educating them in the process. For people working on more serious projects they will only see this popup maybe once every few months. Even if you started a new project every day, you would only see it once per day. If it stays as is in my commit, I can definitely see people who are just getting started being confused how the main scene is assigned.

My main point is that this popup won't be all that intrusive.

Also, unless it violates the design philosophy, maybe in the future Godot will have preferences that apply to the editor itself and not just individual projects. There the option for one or the other could exist.

@NathanWarden
Copy link
Contributor Author

I'm going to go ahead and try out option 3 and also apply it to the Export button.

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

Is it possible to get a dialog menu to change the main scene that is
separate from the project manager? I guess my issue with option 3 is that
the beginner has to look around dozens of properties in the project manager
to find the main-scene property. It's kind of easy to overlook.

Opening dialog with a dropdown menu with all of the available scenes that
can be set as the main would be a lot more intuitive.
On Jan 17, 2015 9:41 AM, "Nathan" [email protected] wrote:

I'm going to go ahead and try out option 3 and also apply it to the Export
button.


Reply to this email directly or view it on GitHub
#1242 (comment).

@NathanWarden
Copy link
Contributor Author

Maybe I could do something like this with the alert...

"No main scene is set. What would you like to do?"
Use this Scene : Open Project Settings

There's an X on the alert for them if they just want to close it.

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

I still think giving them a dropdown menu to select a main scene is more
intuitive than making a new user dig through project settings. I'm interested in what @reduz thinks about this
On Jan 17, 2015 10:37 AM, "Nathan" [email protected] wrote:

Maybe I could do something like this with the alert...


"No main scene is set. What would you like to do?"

Use this Scene : Open Project Settings


There's an X on the alert for them if they just want to close it.

On 01/17/2015 11:52 AM, Max wrote:

Is it possible to get a dialog menu to change the main scene that is
separate from the project manager? I guess my issue with option 3 is that
the beginner has to look around dozens of properties in the project
manager
to find the main-scene property. It's kind of easy to overlook.

Opening dialog with a dropdown menu with all of the available scenes that
can be set as the main would be a lot more intuitive.
On Jan 17, 2015 9:41 AM, "Nathan" [email protected] wrote:

I'm going to go ahead and try out option 3 and also apply it to the
Export
button.


Reply to this email directly or view it on GitHub
#1242 (comment).


Reply to this email directly or view it on GitHub
#1242 (comment).


Reply to this email directly or view it on GitHub
#1242 (comment).

@adolson
Copy link
Contributor

adolson commented Jan 17, 2015

If the main scene is set automatically and later on not working correctly, or if they're prevented from running their only scene because they haven't explicitly set it as the main scene... they have to go exploring either way. I would rather have it automated, myself.

Why not compromise and prompt this: "No main scene set. Would you like to set this as your main scene? You can change this at any time in Project Settings."

Edit: I see a couple more comments added since I had opened this tab, so this is fairly similar to Nate's idea.

@NathanWarden
Copy link
Contributor Author

While I like the idea of a dropdown, and if I'm understanding correctly, it may be a bit overkill since most of the time the user will likely only have one scene the first time they hit F5. If the expectation was that they would have five to ten scenes at that point it would make a lot more sense.

I like the idea of pointing them to "Project Settings" in some fassion or another so they know where to go to change it. I like adolson's last idea since it's clean and to the point.

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

The dropdown makes sense to me because the first scene isn't always going
to be the main scene. What if you made a prototype level for a game and
later made a menu scene? Changing the main scene isn't something that
happens only once in a project's lifetime and for this reason I think a
dropdown menu separate from the project settings is a good option.

But I read adolsons idea again and it will work well for the first run. Maybe a dropdown menu can still exist for when you change the main scene later?
On Jan 17, 2015 10:21 AM, "Nathan" [email protected] wrote:

While I like the idea of a dropdown, and if I'm understanding correctly,
it may be a bit overkill since most of the time the user will likely only
have one scene the first time they hit F5. If the expectation was that they
would have five to ten scenes at that point it would make a lot more sense.

I like the idea of pointing them to "Project Settings" in some fassion or
another so they know where to go to change it. I like adolson's last idea
since it's clean and to the point.


Reply to this email directly or view it on GitHub
#1242 (comment).

@adolson
Copy link
Contributor

adolson commented Jan 17, 2015

You want a dropdown to come up every single time you run the project?

@xodene
Copy link
Contributor

xodene commented Jan 17, 2015

No, just make a button to change the project's main scene in the editor's
menu perhaps.

But I think adolsons solution will be best to solve this issue. I will maybe propose a shortcut to changing a main scene later in a project's development when I have time
On Jan 17, 2015 10:43 AM, "adolson" [email protected] wrote:

You want a dropdown to come up every single time you run the project?


Reply to this email directly or view it on GitHub
#1242 (comment).

@NathanWarden
Copy link
Contributor Author

Closing this. Maybe we can revisit this at a later date. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants