Updating the windows

Everything about development and the OpenMW source code.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Updating the windows

Post by scrawl »

Another thing I thought about was the extension of layout files. Since the layout editor wants .layout, would it make more sense to have them that instead of xml?
Yes, that's no problem. I'll get that committed to the repo.
Not sure how <Skin name="MW_Box" size="516 516"> would be translated to a <Resource type="ResourceSkin"> equivalent.
Well, currently it's not possible because the different box edges are in a different texture. Until then, it should be ResourceLayout like this:

Code: Select all

<Resource type="ResourceLayout" name="MW_Box" version="3.2.0">
        <Widget type="Widget" skin="" position="0 0 516 516" name="Root">
            <Widget type="Widget" skin="IB_T" position="2 0 512 2" align="ALIGN_TOP ALIGN_HSTRETCH"/>
            <Widget type="Widget" skin="IB_B" position="2 514 512 2" align="ALIGN_BOTTOM ALIGN_HSTRETCH"/>
           .............  etc
        </Widget>
    </Resource>
Anyhow, I'm guessing there's some code that need to be changed in order for OpenMW to recognize the new syntax?
Nope, there is no need for code changes. btw, I am using this new syntax for one skin already (Tab skin), because I couldn't get it to work with the old syntax.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Updating the windows

Post by scrawl »

I gave the layout editor a try and got it working, however the textures\*.dds textures dont get loaded. Lazaroth, did you try this on windows or linux?

I have tried to copy the textures to a file without subfolder (e.g. a file named "textures\tx_cursor.dds", as well as copying them in a folder ("textures/tx_cursor.dds").
User avatar
Lazaroth
Posts: 220
Joined: 30 May 2012, 05:04

Re: Updating the windows

Post by Lazaroth »

I did it on Windows.

The only way I got textures to load correctly was to put them with no subfolders and update the layout files to the new "no-subdir" location. You can use this to edit, but you'll have to manually readd the subdirs afterwards.
User avatar
Lazaroth
Posts: 220
Joined: 30 May 2012, 05:04

Re: Updating the windows

Post by Lazaroth »

I've updated two things and thought I'd get some feedback.

1. Removed that ugly border repeat on e.g. the loading window.

2. Fixed the loading window to more closely resemble that of Morrowind (which I think looks better).

Comparison

Before:
http://img515.imageshack.us/img515/2166 ... ll002v.jpg

After:
http://img443.imageshack.us/img443/7462 ... ill001.jpg

I can pull it if it's ok.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Updating the windows

Post by scrawl »

Very nice, please make a pull request or post the patch.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Updating the windows

Post by sirherrbatka »

Good idea. Smaller progress bar looks better.
User avatar
pvdk
Posts: 528
Joined: 12 Aug 2011, 16:34

Re: Updating the windows

Post by pvdk »

And it's more true to the original.
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Updating the windows

Post by scrawl »

I just noticed that MyGUI has support for writing plugins, which is neat. This means we can get the LayoutEditor to properly open resources from .bsa files without code changes to it. I did just that (see pull 261). And a few minor patches to LayoutEditor later, I got this:

Image

Now I need to add the loader for .fnt files from OpenMW to the MyGUI plugin, as well as the various custom widgets used in OpenMW. Then it should be usable in practice. The plugin can be distributed with OpenMW, so that users only have to download a binary for OpenMW, binaries for the MyGUI tools, activate the plugin and are ready to go.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Updating the windows

Post by raevol »

Very nice. :D
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Updating the windows

Post by scrawl »

Update: added fonts and custom widgets to the plugin. Everything appears to be working great.

Image

Will add a tutorial to the wiki soon, just need to make pull requests for the LayoutEditor patches first.
Post Reply