You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of Mysthea, Icaion and The Fall share the same structure, it is good create some generic models that will behave correctly with all of them.
The basic idea is to load a specific Json file when an app is chosen. So in the main.qml we will have something like this:
The cards, artworks, miniatures properties defined inside AppConfiguration will be passed respectively to the constructure or to a source property of CardsModel, ArtworksModel and MiniaturesModel to init them with the correct information.
The file that we pass to AppConfiguration's load function contains all the informations related to app's cards, artworks and miniatures, so its structure will be like this:
This class will be able to load the json file and process it to obtain the list of cards, artworks, miniatures and other informations related to a specif game app.
In this way in main.qm each times we click on an game app, we will instance an AppConfiguration object and and pass to it the Json configuration file. This file will be processed and will be created the data structures that we need to use in the various app models.
The text was updated successfully, but these errors were encountered:
Because of Mysthea, Icaion and The Fall share the same structure, it is good create some generic models that will behave correctly with all of them.
The basic idea is to load a specific Json file when an app is chosen. So in the
main.qml
we will have something like this:Where
AppConfiguration
has a structure like this:The
cards
,artworks
,miniatures
properties defined insideAppConfiguration
will be passed respectively to the constructure or to asource
property ofCardsModel
,ArtworksModel
andMiniaturesModel
to init them with the correct information.The file that we pass to
AppConfiguration
'sload
function contains all the informations related to app's cards, artworks and miniatures, so its structure will be like this:This class will be able to load the json file and process it to obtain the list of cards, artworks, miniatures and other informations related to a specif game app.
In this way in
main.qm
each times we click on an game app, we will instance an AppConfiguration object and and pass to it the Json configuration file. This file will be processed and will be created the data structures that we need to use in the various app models.The text was updated successfully, but these errors were encountered: