Hi AdderD,
> That is actually an interesting way to go about it. But, QT
> can do those sort of things too.
It can do kind of vaguely similar things but not up to the full level of what I need.
It is the combination of markup + layout + script logic that makes for the best flexibility.
Here's a quick example of the kind of flexibility that I need to help me work with UI in the most effective way:
It's a simple example as far as what is often needed in MoI, but there are actually a lot of things happening there.
Notice how some controls are being hidden or shown based on the checkbox, and when the new controls are shown, the labels have longer text but the labels and input fields adapt to the new text length?
That kind of adaptability to changing UI, including text length and visibility is important for what I in particular need to do. It is not as important for a lot of conventional UI which does not do such things, but as you may have seen by now MoI does not really have a conventional UI. Doing a Qt UI is just a better fit for a more typical basic program UI that more closely follows standard conventions (and limitations! :) .
Then the key thing is not just that I'm hiding and showing UI there, but that it is extremely easy and natural for me to create UI like that, since all the code for hiding and showing things is done completely in script without needing to put that logic in C++ code only. The speed (in development time) at which that happens helps me a lot in developing the UI.
It also allows for 3rd parties to do similar types of things without having to write C++ code to handle the UI.
Maybe that will help you to understand more about why using Qt does not deliver what I am looking for in a UI toolkit.
> I don't know a lot of languages outside of English but I do
> know some Spanish and German so maybe I could translate a
> few strings to test this out.
Just make sure you do an actual "real world" type of test where for example the German strings become 4 times as long and need to make the UI elements expand and word wrap to multiple lines to hold the larger text!
> In QT you can set interface elements (widgets) to have a
> certain orientation to each other and the main window and
> scaling will preserve the relationship
Yeah, the basic kind of layout mechanism where a widget is either a fixed size and located relative to another one or the window edge, or where it is some percentage size of the main window are common things in many UI toolkits.
But that's a primitive system once you try to get a lot more things like embedded forms, like in the example I show above.
To get real flexibility, a widget's size should be determined dynamically to fit around the text that is contained within it, including allowing that text to word wrap to multiple lines if necessary.
That's what an HTML based UI engine delivers and that is different than the typical old-style widget docking and sizing mechanisms.
Again, often times conventional UI is done with fixed size widgets that will do things like clip long text instead of adapting to long text. That can be fine if you want to limit your UI, but I need something more flexible than that.
As far as I have been able to tell the Qt toolkit does not do these kinds of things, here is a quote from their
Layout documentation:
quote:
Qt's layout classes were designed for hand-written C++ code, allowing measurements to be specified in pixels for simplicity, so they are easy to understand and use.
That's not suitable for me - especially having widget sizes fixed in pixel size does not allow it to adapt to dynamically shifting text content, and being oriented towards being hand-written C++ code is not as flexible as dealing with it through script and markup...
> However, today being cross platform might actually be important.
It definitely is, and I do wish that I was cross-platform!
But I'm not willing to use a more primitive UI mechanism to get there... That kind of system can be fine for basic UI but it does not really cut it for my needs, which I've tried to explain to you in more detail above with some examples. I would never have been able to get to my current UI design with a more primitive layout system.
The main way forward for me for cross-platform is to try and shift to WebKit or Gecko which will deliver to me the same kinds of advantages that I mentioned above but not be tied only to Windows. This is going to be a bit difficult though, like I explained earlier in this thread neither of these engines is currently set up to be as extensible for writing new controls as mshtml is. Of course the source code is available to work with and change but it takes quite a bit of time to get in there and get familiar with it enough to do that. I do plan to do some experiments with WebKit in between MoI v2 and v3, I have already done a bit of tinkering where I've ruled out using wxWebKit, but I think that QtWebKit has a lot more possibility.
Anyway, I can understand that you want to evangelize cross-platform UIs to make it so you can more easily get software that runs where you want it! But please don't think that all program UI needs are the same and can easily fit in the same box, that is not the case.
- Michael