There's actually no reason to end all these json files with .json, so you could even drop that. I'm not even sure why I went that way. Would certainly add clarity to end block definitions with .block, shape definitions with .shape and so forth.
Immortius miniME89I already started in my examples to give the JSON files different extensions:
Layout files: SomeMenu.layout
Style files: SomeMenu.style
Immortius: I've been using "JsonSlurper" for my prototyping, which is built into Groovy. Hope thats okay too.What parser do you need? If you just mean for JSON, you should use Gson as it is already extensively used in Terasology (and pretty good besides). You have the option of either loading straight to a Java object or working directly with the JSON.
The features of each widget are actually irrelevant for the system itself, as the system really only cares about some basic properties (such as the id) which every elements needs to have, but everything else is simply done through getters/setters. E.g. if an element has a "setText" method with a single argument, it has the property "text".What are the features of each widget? So the code can be extended and adjusted to fit the needs.
I haven't had much time to think about that, and I'm too tired to do it right now. Do you have any ideas on this already?The base class of the Controller. What will the class include exactly?
The features of each widget are actually irrelevant for the system itself, as the system really only cares about some basic properties (such as the id) which every elements needs to have, but everything else is simply done through getters/setters. E.g. if an element has a "setText" method with a single argument, it has the property "text".
Me neither. If I find some time, I will write an example or something, where we can discussed some things.I haven't had much time to think about that, and I'm too tired to do it right now. Do you have any ideas on this already?
I have not ideas about it. But I think "setBackgroundColor(0x00, 0x00, 0x00, 0.75f);" is not good.Maybe @Adeon has some additional thoughts
Immortius: I know, but you need a predefined structure for that, don't you? And the JSON style definitions don't really meet the criterionGson lets you create objects from JSON definitions.
But whatever floats your boat.
I have not ideas about it. But I think "setBackgroundColor(0x00, 0x00, 0x00, 0.75f);" is not good.
"setBackgroundColor("#FFFFFF");" is cool
Cool=)I will overload the method, no problem