When you start MoI V3

 From:  Michael Gibson
3712.29 In reply to 3712.28 
Hi vodkamartini, there is actually quite a bit more UI involved than it first appears, since there are 111 bits of command UI.

> QT or WPF

Well, one huge problem with WPF is that it would lock me even more tightly into being Windows only.

Native Qt is a possibility, but after looking into it there are several parts that I don't like - the overall design of it shows that it's really primarily meant to be driven from C++ code (like having code that directly creates widgets).

For tweaking it is a lot easier for a "power user" to edit an .htm file than it is for them to edit some C++ code and compile it in order to make changes or plugins.

Qt does have a method to load UI configurations from .ui files, but when I looked into that the .ui files were kind of like direct XML data dumps of C++ objects, they did not seem particularly easy to edit directly in a text editor.

One of the nice benefits of HTML is that it is very easy to edit in a text editor, it's easier to write simple UI that may include some little bits of script code along with it for UI-specific logic, which greatly helps in keeping a separation between UI stuff and core C++ code stuff. Also HTML is much more widely used and more likely familiar to a wider range of people than the Qt UI XML data file format.

So although I'm sure that it would be possible to whip up something close to MoI's UI in native Qt, I'm very dubious that it would be possible to keep the same level of really easy authoring/customizing that comes with having the UI made up of all user-editable .htm files. This aspect of UI authoring will become more interesting in the future with MoI when I have more emphasis on extensions and plugins.

MoI's UI also has some features that I have not seen in Qt applications like the ability to scale the UI up or down freely, and easy translation by just creating a single Strings.txt file... There would likely be some pretty big stumbling blocks trying to bring 100% of MoI's UI functionality over.


It's just easier to experiment with layout-driven things with HTML, having a flexible HTML based UI was especially crucial in the earlier stages of MoI when the UI was not all finalized, the flexibility really helped me to be able to experiment with things and actually come up with the current UI.


- Michael