Reverse engineering an existing GUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 14:21

So, I'm attempting to reverse-engineer an existing GUI by creating/editing dds, layout and imageset files (mainly because I have been having real issues installing CEGUI, but there you go...)

I've managed to put new graphics onto existing dds files while changing the size of the dds and get them into a UI by adding them into the relevant layouts and imagesets. I've managed to change the sizes of the dds files and change the native resolutions within the existing imageset files and get the layout files to use them. I've managed to replace some graphics on existing dds files.

What I can't seem to be able to get to work is creating new dds files with new names and adding them into new imagesets which existing layout files are linked to. I am doubtless making some false assumptions about how this system works, but I presumed that a layout file will be able to pull resources from any imageset file (and therefore any individual dds file). If that's the case then I must be doing something else wrong somewhere. I've checked and double-checked links to file locations etc and they all seem to be correct, but the graphics on the new dds file simply don't appear. Anyone got any ideas/need any additional info?

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 15:56

A little light reading suggested I needed to add any new imageset files to the scheme file. That seemed to partially work - some new graphics showed up from a new dds and a new imageset, but one did not.

Code: Select all

<GUILayout >
    <Window Type="BBLook/StaticImage" Name="MainMenuBackground" > <!-- Main Background Image -->
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> <!-- Position on screen as proportion; subwindows are proportions of this window -->
        <Property Name="Image" Value="set:BBBackgroundMainMenuWCE image:BBBackgroundMainMenu" /> <!-- Which ImageSet to look in and the name of the image within it -->
        <Window Type="BBLook/StaticImage" Name="MainMenuBackground/Back01" > <!-- Banner -->
            <Property Name="UnifiedAreaRect" Value="{{0.0625},{0.033333,0},{0.270833,0},{0.85,0}}" />
         <Property Name="Image" Value="set:BBLookDode image:Menu_Banner" />
        </Window>
        <Window Type="BBLook/StaticImage" Name="MainMenuBackground/Bottom" > <!-- Bottom Tape -->
            <Property Name="UnifiedAreaRect" Value="{{0,0},{0.925,0},{1,0},{0.966667,0}}" />
            <Property Name="Image" Value="set:BBLookDode image:Menu_Ribbon" />
        </Window>
      <Window Type="BBLook/StaticImage" Name="MainMenuBackground/TV" > <!-- Top Tape -->
            <Property Name="UnifiedAreaRect" Value="{{0,0},{0.033333,0},{1,0},{0.075,0}}" />
            <Property Name="Image" Value="set:BBLookDode image:Menu_Ribbon" />
        </Window>
        <Window Type="BBLook/StaticImage" Name="MainMenuBackground/TitleLogo" > <!-- CE Logo -->
            <Property Name="UnifiedAreaRect" Value="{{0.584896,0},{0.088333,0},{0.96875,0},{0.251667,0}}" />
         <Property Name="Image" Value="set:BBLookDode image:Menu_Logo" />
        </Window>
        <!-- <Window Type="BBLook/StaticImage" Name="MainMenuBackground/TV" >
            <Property Name="UnifiedAreaRect" Value="{{0.654297,0},{-2.32831e-010,0},{0.703125,0},{0.0546875,0}}" />
            <Property Name="Image" Value="set:BBLook3 image:Menu_TV" />
        </Window> -->
    </Window>
</GUILayout>


The first sub-window, name MainMenuBackground/Back01, doesn't show. The rest (apart from the commented bit, ofc) does.

Forgive me, I am a complete noob. :)

There will likely be similar stupid questions at some point.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Sat Mar 01, 2014 17:47

Was there a warning or error in the logs about not finding images? if u wanna use images from an imageset you need to first load it in your code, if u define it in the scheme file u dont need to do that if u load the scheme file.
CrazyEddie: "I don't like GUIs"

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 18:01

No warnings, no errors, simply... no image.

This is what should happen: http://i1013.photobucket.com/albums/af2 ... ef369b.png
This is what does happen: http://i1013.photobucket.com/albums/af2 ... 6ae444.png

I got the "should" image by simply making the missing part a bit of the overall background image, so I can make that screen work if necessary. I'd like to use that resource in other screens, though, so I'd like to know what I'm doing wrong.
This is the relevant imageset file which puts the red lines at the top and bottom and the main logo to the right, and should also (along with the layout above) put the banner in:

Code: Select all

<Imageset Name="BBLookDode" Imagefile="Data\Gui\Imagesets\BBLookDode.dds" NativeHorzRes="1920" NativeVertRes="1200" >
    <Image Name="Menu_Banner" XPos="0" YPos="1" Width="400" Height="980" />
    <Image Name="Menu_Ribbon" XPos="0" YPos="1150" Width="1920" Height="50" />
   <Image Name="Menu_Logo" XPos="430" YPos="5" Width="737" Height="196" />   
</Imageset>

The imageset has been added to the relevant scheme file, so should load up with that.

Your help is much appreciated.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Sat Mar 01, 2014 18:17

Does it state in the log that the imageset you want to load is loaded?
CrazyEddie: "I don't like GUIs"

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 18:41

It does indeed:

Code: Select all

01/03/2014 18:05:43 (InfL1)   Attempting to create an Imageset from the information specified in file 'Data/Gui/Imagesets/BBLookDode.imageset'.
01/03/2014 18:05:43 (InfL1)   Started creation of Imageset from XML specification:
01/03/2014 18:05:43 (InfL1)   ---- CEGUI Imageset name: BBLookDode
01/03/2014 18:05:43 (InfL1)   ---- Source texture file: Data\Gui\Imagesets\BBLookDode.dds in resource group: (Default)

There are no errors or faults in the log.

I'd have been surprised if it didn't given that two other images from the same dds file and imageset (Menu_Ribbon and Menu_logo) were loading fine, tbh.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Sat Mar 01, 2014 19:31

I don't know. Seems bizarre and never encountered such an issue... Pretty sure the fault doesn't lie inside CEGUI. With the given information I can't really see anything wrong. It's hard to tell from a distance. You should best double check evferything especially imageset and that you are not referencing old data. Try to open the imageset with ceed and check how the images are defined and how the image looks (transparency)
CrazyEddie: "I don't like GUIs"

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 20:53

I've not got ceed installed at all, or any of the CEGUI stuff. Having real issues with installing it. I'm solely editing xmls and creating .dds files (with DTX3 Explicit Alpha for transparency) and making the .dds in paint.net. The file looks fine in paint.net, ofc.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Sat Mar 01, 2014 20:59

You dont need to install CEED, it is self-dependent... just extract and run. You can open the imageset directly there. You don't need to specify the resources or a project file for it.
CrazyEddie: "I don't like GUIs"

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Sat Mar 01, 2014 21:36

Ok, so CEED won't import any of the underlying .dds files to work from, even the originals. The imagesets show up as frames, along with the code, but trying to load the .dds does nothing - I just get the checkerboard.

I changed the relevant .dds to a .png and this loaded into CEED and showed up just fine, so I altered the imageset to see if that would help but nothing changed.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Sat Mar 01, 2014 21:40

What happens if u change the image of the window which doesnt display the image to another image which is shown correctly in another window?
what happens if u rename the image in both imageset and layout to a new name?
CrazyEddie: "I don't like GUIs"

dode74
Just popping in
Just popping in
Posts: 15
Joined: Tue Feb 25, 2014 12:23

Re: Reverse engineering an existing GUI

Postby dode74 » Thu Mar 06, 2014 08:37

Tried moving the relevant image to another dds file and put it in the respective imageset while pointing the layout in the right place, but it still doesn't show. Must be something to do with the image itself, although I am stumped as to what it could be.

I presume there is no issue with images having transparent parts or anything? The pic in question is a banner with a bunch of holes in it.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Reverse engineering an existing GUI

Postby Ident » Thu Mar 06, 2014 08:47

It should not be transparent at the parts that you want to render ;)
otherwise CEGUI fully supports transparency usingt he alpha channel of images.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests