Scaling Problem with WindowsLook.tga

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
arkos
Quite a regular
Quite a regular
Posts: 49
Joined: Thu Apr 27, 2006 21:45

Scaling Problem with WindowsLook.tga

Postby arkos » Sat May 20, 2006 00:25

Hello,

I am currently using the WindowsLook skin as a base to create a new skin. I am trying to use a larger texture to sample from because the one given is only (125x125).

I converted the WindowsLook.tga to a 512x512 image. Obviously just scaling a 125x125 image into a 512x512 image isn't going to get me a better resolution, but I intend on painting over it with smoother lines and curves.

I wrote a small program to go through the WindowsLook.imageset file and multiply all of the values by 4 because 125x4 = 512. I was expecting there to be minimal difference between the two versions (125 and 512) in my application, but I was mistaken. The mouse is WAY bigger and all of the borders are too big as well.

I really want the 512x512 resolution because it looks nice and my app will not be very CEGUI intense at any given time.

Is there a way to scale the CEGUI elements down?

I have to imagine that there is because with the stock WindowsLook at 125x125, the mouse in my app is much bigger than it is in the targa file.

Please Help!

Sneftel
Just popping in
Just popping in
Posts: 15
Joined: Fri Apr 07, 2006 19:05

Postby Sneftel » Sat May 20, 2006 02:40

I'm a little confused. You just made your imageset four times as large. Every element is four times the size it was before. Isn't the increased size....expected?

BTW: The looknfeel file for WindowsLook, IIRC, has some hardcoded absolute dimensions. You'll need to manually track those down and change them for everything to look good.

User avatar
arkos
Quite a regular
Quite a regular
Posts: 49
Joined: Thu Apr 27, 2006 21:45

Postby arkos » Sat May 20, 2006 16:31

thanks for the reply,

I am a bit skeptical that the values are hardcoded somewhere because that seems to go against the whole idea of skinning your own gui. Surely there has to be an easy way for people who do Falagard skinning to scale their skins to fit their screen.

If you are correct, could you please tell me where are these absolute dimensions hardcoded and how could I go about changing them? I don't even know where to start looking. Note: I do not wish to compile CEGUI, rather I just want to mess with the external files (looknfeel, imageset, scheme or the CEGUI include files).

Sneftel
Just popping in
Just popping in
Posts: 15
Joined: Fri Apr 07, 2006 19:05

Postby Sneftel » Sun May 21, 2006 03:33

I apologize for the imprecision; I meant hardcoded into the looknfeel file as opposed to the imageset.

User avatar
arkos
Quite a regular
Quite a regular
Posts: 49
Joined: Thu Apr 27, 2006 21:45

Postby arkos » Sun May 21, 2006 08:36

hey thank you so much for your advice,

I am now under the impression that to correct my problem, I have to go into the looknfeel file and divide all of the absolute values by 4. This is a lot of work, but it is doable.

This also presents a new problem. If I use the standard WindowsLook.scheme, CEGUI ignores the looknfeel file completely. However if I use the WindowsLookSkin.scheme which uses falagard skinning I will be able to alter the looknfeel file and have the changes show up in my app. The problem is that I am new to this whole skinning thing and I grabbed WindowsLookSkin.scheme off one of the forum posts. In all my attempts to use it, I have gotten errors like:

Code: Select all

21/05/2006 04:29:50 (Error)   Exception: Imageset::getImage - The Image named 'StaticLeft' could not be found in Imageset 'WindowsLook'.
21/05/2006 04:29:50 (InfL2)   Window 'char/char4/prev_btn' of type 'WindowsLook/Button' has been created.
21/05/2006 04:29:50 (InfL2)   Assigning LookNFeel 'WindowsLook/Button' to window 'char/char4/prev_btn'.
21/05/2006 04:29:50 (InfL2)   Window 'char/char4/next_btn' of type 'WindowsLook/Button' has been created.
21/05/2006 04:29:50 (InfL2)   Assigning LookNFeel 'WindowsLook/Button' to window 'char/char4/next_btn'.
21/05/2006 04:29:50 (InfL2)   Window 'char/char1/type_cbox' of type 'WindowsLook/Combobox' has been created.
21/05/2006 04:29:50 (InfL2)   Assigning LookNFeel 'WindowsLook/Combobox' to window 'char/char1/type_cbox'.
21/05/2006 04:29:50 (Error)   Exception: WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'WindowsLook/ComboEditbox' Window objects is not registered with the system.



Does anyone have a comment or advice?

If anyone knows where I can get a copy of WindowsLookSkin.scheme that mimics that original WindowsLook.scheme perfectly, I would be very interested in that!

User avatar
arkos
Quite a regular
Quite a regular
Posts: 49
Joined: Thu Apr 27, 2006 21:45

Postby arkos » Wed Jun 07, 2006 07:20

Well I got the WindowsLookSkin.scheme to finally work, but I still don't have a clue how to scale the darn images down! :evil:

I went into the looknfeel file, but I don't really get what this means:

Code: Select all

<UnifiedDim scale="1" type="BottomEdge" />


Does anyone have any advice!?!?!?!

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Wed Jun 07, 2006 16:42

Open up the WindowsLook.imageset XML file and fine the attribute autoScaled (it's in the very beginning). Change its value from 'true' to 'false'.

This will make sure the pixels map 1:1 unless otherwise "stated" in the looknfeel.

HTH, and btw we have a Falagard manual in the wiki


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests