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
Add setting for initial scene position #876
Comments
IMHO, Editor should open in the same state is was closed in, hopefully that's not too hard to achieve? |
So lets get this clear- you need the game project file to be able to store the camera position +zoom and to restore it when you open the project :) I could look it into this, if it doesn't require recompiling gdevelop.js |
Yes, that's expected behavior from any program I believe. Same as grid settings, you expect the IDE to remember that too 😄 |
Yes I agree :) |
So both These options are read here (for the SceneEditor):
and here (for the ExternalLayoutEditor): GDevelop/newIDE/app/src/MainFrame/Editors/ExternalLayoutEditor.js Lines 110 to 112 in fb6b959
( So these settings are read... but they are never written :) This is why you can edit them in the game json file, but the IDE was never modified to store the changes. To actually write them, you can do the reverse operation: Explanation: Finally, after doing this, when your game is saved, the settings will be saved (nothing to do here). So now that I've shown how to save these settings, three things:
|
@4ian I can look into this in the weekend if nobody else is doing it :) 👍 |
Sure, give it a try :) |
@4ian I got it to save the grid and the zoom level so far 👍 |
Let's start without the viewport camera, I can add this later if we have something working for the rest |
will do a pull later today :) |
This will also cover.. |
it covers grid and zoom for now, but will hopefully also cover navigation camera placement |
@4ian I would like to try on this. Does this require adding the viewport camera co-ordinates to the |
Yes, though the changes need to define when do we save them and to do some changes in C++ to be able to persist them. See the steps I explained here: #876 (comment) :) |
Thank you! Will take a look :) |
This appears to have been solved through other pull requests than those mentioned above. Scene viewport settings (zoom/location/etc) are saved when saving a project in b117 and newer at least. Closing this out, but feel free to reopen this if it's not resolved. |
As per http://forum.compilgames.net/viewtopic.php?f=19&t=11147, I have a large scene and I've had to change the zoomFactor setting in game.json so as to see it better without manually zooming out every time I open the editor. However there's no way to change the position - currently its centred on the top-left corner and I have to drag to see the full scene.
It'd be nice if there were a setting for this in game.json or even better in the editor UI.
The text was updated successfully, but these errors were encountered: