Page 1 of 1
Scaling Problem with WindowsLook.tga
Posted: Sat May 20, 2006 00:25
by arkos
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!
Posted: Sat May 20, 2006 02:40
by Sneftel
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.
Posted: Sat May 20, 2006 16:31
by arkos
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).
Posted: Sun May 21, 2006 03:33
by Sneftel
I apologize for the imprecision; I meant hardcoded into the looknfeel file as opposed to the imageset.
Posted: Sun May 21, 2006 08:36
by arkos
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!
Posted: Wed Jun 07, 2006 07:20
by arkos
Well I got the WindowsLookSkin.scheme to finally work, but I still don't have a clue how to scale the darn images down!
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!?!?!?!
Posted: Wed Jun 07, 2006 16:42
by lindquist
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