Settings menu placeholder
#673 #728 #732 #751
- [x] SettingsMode and its TabView with global font size setting in "Graphics" tab
- [x] Global font size cvar
- [x] Write back cvars to config file when calling set
- [x] Initial propagation of the cvar list to gui
- [x] on-changed propagation from gui to cvar
- [x] on-cvar-changed callbacks (that will allow on-changed propagation from cvar to gui)
- [x] caching of the cvars that are loaded but not yet taken by any subsystem of the engine
- [x] ~~Batch write back to config file (instead on writing each time)~~. Ok, write them one by one, but in different thread
Random unrelated stuff:
- [x] Keep mode when reloading gui
- [x] Fix input crash on reload
Once compiled, how do I test it? Thanks! EDIT: Got it! It's 'Change Mode' everyone!
Screenshots:
http://i.imgur.com/LK912Ey.png
http://i.imgur.com/oNTtv6E.png
The rest of the tabs are empty.
@lisacvuk Testing of the whole UI happens in #751 ;)
OK, finally had a look at it myself :)
- Instead of anchoring the tabs in the middle of the top, an anchor point further to the left would be nice. After all, this is were most players will look first.
- Seeing how
Font Sizealso affects UI scale, shouldn't we just call the option "UI Scale"? Furthermore the selection of a font size is very finicky and requires readjusting the mouse pointer every time. We either should have presets (like I did it in the mockup) or aUI Scaleslider with percentage numbers.
I changed the cvar manager a bit in #723, how should we proceed? Which one should go first? :)
@TheJJ at a first glance, #723 doesn't deal with file contents. So it'll be easy.
I've got time to merge settings later.
cvar stuff is merged, you may adapt this now please.
Ping? :)
Two things:
- can't figure out into what file to write the changes (so hardcoded the keybinds.oac)
- can't write the changes
For those two things, I just created #813 :)
For the second one it's about inability to edit files with the new path system. I still need to figure out why it doesn't accept open("a+").
Any luck finding out why a+ doesn't work? Does w work?
I implemented file append modes in #996. I'm not sure though how we should edit our config files properly, because it's quite tricky to a) allow users to write the files as they like and b) update just the values at the right place automatically. Basically we'd have to parse the files and then rewrite them retaining all information including comments and whitespace, etc.
Basically we'd have to parse the files and then rewrite them retaining all information including comments and whitespace, etc.
That's roughly what this PR does. But it deletes the comment on the line where an option is overwritten (probably not the worst thing to do when I think about it).
Ah okay, I didn't realize that since you asked for the append functionality. Is something else missing or is this nearly reviewable/mergeable?
Should the text here go to openage-data ? What's our plan on translation?
The translation issue is #107. Generally, engine-message-translations are within the openage repo, as openage-data is only for the default and free asset pack.
The translation issue is #107. Generally, engine-message-translations are within the
openagerepo, as openage-data is only for the default and free asset pack.
Yeah I believe in #107 you mentioned some of these strings should go to openage-data but I'm not sure which ones should go. Maybe the settings is consistent across all mods so those strings should stay in this repo?
I think this pull request added some strings on the UI. We better store them in a resource folder somewhere so that it's easier to do translation afterwards. Also I didn't read the code -- probably the author already did that -- but I think we should make sure to use wide char and UTF8 for all strings exposed to UI.
Exactly: settings dialogs and any other engine text that remains the same and is independent of loaded games, modpacks, scripts, ... belong in this repo. Texts that are provided in a modpack has to be translated there. How we implement the translation system in general is not decided yet, and that discussion should happen in #107.