-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
[Enhancement] Save asset view options settings #147
Comments
Hi there, I'm new to Stride (actually, I've never actually participated in an open-source project before this), and I'm interested in helping out. My coding experience is limited to programing business software, so I think that this issue would be a good fit for me as a starting point, since it doesn't seem to require technical knowledge specific to game engine development. Would it be OK if I tried to solve this issue? |
@dadofboi Yes, definitely! PRs are welcome! |
In complex WPF applications you can't really use the designer because there's a lot of dynamic parts to the views - depending on the data you're working on in the project. So you wouldn't be working with a designer but straight with XAML. While debugging you can use VS tools to select a part of the window (a control or panel) and show it in the visual tree view which can allow you to map it back to a line in the XAML file. |
Thanks for the help! My company still uses WinForms (yeah, I know), so I had no idea this is how WPF works. In that case I'll spend some time learning about WPF and then try to tackle this issue again. |
Hello, is it okay if I take a stab at implementing this enhancement? |
Definitely, please do ! |
Been looking at this and I think I have a good understanding on this system and what needs to be done, but just in case I was hoping to get some feedback real quick:
Still have a few questions:
|
|
Thank you so much for the quick response! These help very much, and I look forward to implementing this! |
I'll come back to you with some details. Remind me in a few days if I forget. |
I am looking into saving the selected settings in the editor as a settings key in internalSettings.cs. The issue I am running into is how to access the ObservableListSelectedContent in AssetCollectionViewModel.cs to save it as a settings key in InternalSettings.cs. Do you have any suggestions on how I should approach this? |
@soorMSWE What are you trying to do specifically here, saving and restoring the assets that were selected in the last session ? If that's the case, best to avoid it for now since this is actually quite complex in comparison to what this issue is about. Not sure the settings serialization is prepared for that. |
Hello, I confused myself with what I was trying to do. I am actually trying to save the asset filters and not the selected assets. I am currently looking into it. Please let me know if you have any suggestions! |
Hello, I am currently looking at how to possibly put the current filters stored in ObservableSet into a SettingsKey but its proving to be a bit tricky. I was thinking maybe pulling out the stored strings in the AssetFilterViewModel objects and storing them in a settingsKey since I dont think the AssetFilterViewModel objects can be simply saved out a settingsKey directly. Are we able to save out the lists through the SettingsKeys? |
Afaict, yes, we have tests covering those here https://github.com/stride3d/stride/blob/master/sources/core/Stride.Core.Design.Tests/TestSettings.cs
Sounds good, just a note, there's also the If you create a new data type to store those two variables into, make sure to decorate it with |
* Zoom save settings for Tile and Grid * added ViewFilters Settings Key * Adjusted settingskey and added load area * Fixed formatting on SettingsKey default * Implemented Filters to be saved and reloaded on new instances * Added SaveAssetFilters call to filter IsActive toggle * Adjusted comments and fixed filter load order to be consistent * Updated load and save methods to now be private - No reason for them to be public * Removed unnecessary comment - was for tracking potential load points with asset filters * added private access modifier for asset filter view model data var --------- Co-authored-by: soorMSWE <soor@uci.edu> Co-authored-by: Will S <wrshield@uci.edu>
The view options (such as level of zoom, filters, grid or tile view, etc.) are not saved in the settings and thus use their default value when restarting the Game Studio.
Starting point:
AssetViewUserControl.xaml
inXenko.Core.Assets.Editor
EditorSettings
inXenko.Core.Assets.Editor
AssetCollectionViewModel
inXenko.Core.Assets.Editor
The text was updated successfully, but these errors were encountered: