amos wrote: I've been working on the gui screens for character generation and have stumbled over an issue with MyGUI. The problem is that MyGUI seems to be built around using one texture file for a widget with different offsets/sizes for the various parts of the widget.
However in Morrowind each widget part is placed as a separate dds file. I noticed the workaround by using multiple sub-widgets with a new skin. This works fine for static content like boxes etc., but it causes problems for widgets such as the HScroll since the sub-widgets will receive mouse input and do nothing when clicked on.
Documentation and examples for MyGUI are quite scarce so I'm wondering if anyone of you know if it is at all possible to solve this easily.
If not I'm considering either combining multiple widget textures into one file and using that as texture. The downside is that it will not be loaded from the Morrowind files anymore, but it could be sufficient for now.
An alternative would be to extend MyGUI to support an optional texture element per BasisSkin/SubSkin element.
Yet another option would be to catch those events on the sub-children and forward them to the correct widget, but I would rather avoid this approach.
nicolay wrote: It's a while since I messed with MyGUI xml files, so I can't give you a good answer on this. I know the window borders have a similar problem, they need to resize the window, but IIRC they are all added as child widgets. Yet it still works. However looking over the file again I actually no longer have any clue _why_ it works. I guess I should have commented that better...
But on the topic of scroll bars, I think the easiest route by far is to extract the relevant images from the bsa and stick them in a single png. I had to do this for some of the mouse pointers too. Theoretically Bethesda could accuse us of piracy by doing this but I think the chance (and the potential damage) is pretty slim.
EDIT: Oh wait, found it. There are tags like:in the main MW_Window skin that handle this. There might be something similar for the scroll bars, though searching for it might take longer than just making a new texture.
Code: Select all
<Property key="Scale" value = "0 1 0 -1"/>
Zini wrote:Better do that at run-time. Some mods may modify these graphics. Also it avoids any potential problem with Bethesda.I think the easiest route by far is to extract the relevant images from the bsa and stick them in a single png. I had to do this for some of the mouse pointers too. Theoretically Bethesda could accuse us of piracy by doing this but I think the chance (and the potential damage) is pretty slim.