Quote from: texus on 27 November 2014, 08:33:35
I have though about XML, but I kindof see JSON as its successor.
XML requires you to open and close tags which means you have to write things twice.
I would choose the second or third opposed to the first one. The third one looks best here, but these key-value pairs like now are too limited.Code Select<TextSize>5</TextSize>
"TextSize" : 5
TextSize = 5
While 2nd and 3rd are more human-readable, the question is if you would write them manually in the first place. If I wouldn't use the GUI builder, I'd do it programmatically in my .cpp files.
Hm. And file size shouldn't be a concern. If I were not to use xml I'd probably go for JSON instead of the 3rd option, simply because libconfig uses ascii for strings which is undesirable if you do ButtonText = "MinButtøn".
.
I understand why one would not to. Myself, I have a static class called settings where I store some global variables like fontSize, paths, videomode, audiovolume, etc
While I'm at it; Currently text is centered inside a button by computing the center of it's axis-aligned bounding box. Which is good. However, this bounding box depends on what glyphs you used, for example 'A's center is higher than 'j's center. The consequence is, that the base line of text does not align if you have words containing an Ascender(
.