Minimum needed to create a skin?

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

Habba
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Tue Sep 19, 2006 15:21
Location: Finland
Contact:

Postby Habba » Wed Dec 06, 2006 11:33

You don't need to redo your layout each time you change LookNFeel-file.

What I did was that I made a basic layout with the editor (the one you can see in the picture). I saved it, and then edited it with text editor to support my skin and changed few properties (such as font colors and overrided images). After that I didn't tough the layout file nor the layout editor.

Then I made a copy of Taharezlook, and renamed everything that was related to TaharezLook from those files to Horizon.

I created a simple program that loads up the LookNFeel and layout files, and then displays the GUI. After that I started making changes to the LookNFeel and imagest file. Piece by pice I converted it from TaharezLook into what it is now.

And yes, I wouldn't have minded having a better tool to change those files, but a XML editor will do.

To get started, maybe back on track: Let's say I want to change all black colors for the WindowsLook skin/looknfeel to now be white [only talking about the colors that are set via code [xml], not the colors in the imageset's .tga file]. How would I do that?


Open the LookNFeel-file with a text editor. Use 'replace' function and search for 'FFFFFFFF' and replace it with 'FF000000'.

LennyH
Quite a regular
Quite a regular
Posts: 92
Joined: Thu Nov 30, 2006 20:50

Postby LennyH » Wed Dec 06, 2006 16:16

Rackle wrote:windowslookskin.scheme is from v0.4. Could some of the problems you are having be solved within v0.5? Maybe you can spend an hour on installing this newer version and performing a test.


This *may* be a possibility; unfortunately I cannot make that leap at the moment. We are using delta3d, and currently are using version 1.3 of it. Which, you may or may not know, but delta3d 1.3 uses CEGUI 0.4.1. Now, delta 3d has released version 1.4, which does support CEGUI 0.5.0, however, we haven't been told to migrate to that yet...

Habba wrote:You don't need to redo your layout each time you change LookNFeel-file.

What I did was that I made a basic layout with the editor (the one you can see in the picture). I saved it, and then edited it with text editor to support my skin and changed few properties (such as font colors and overrided images). After that I didn't tough the layout file nor the layout editor.

Well of course you don't need to redo the layout. But if you have to manually go into the layout file to change colors, etc, it is almost the same thing as redoing your layout...

Then I made a copy of Taharezlook, and renamed everything that was related to TaharezLook from those files to Horizon.


In my case, I am initially just trying to modify the windowslook skin - to become familiar with what does what, what changes will do what, etc.

However, what do you do with the dll? Since the dll can only be loaded once, it can only be used by one scheme at a time. If the idea is that you will only ship whatever skin you make and only allow its use, then this is no problem. But if you have more than one scheme referencing the same dll [regardless if the dlls are named differently] you wind up with a problem, ya?

I created a simple program that loads up the LookNFeel and layout files, and then displays the GUI. After that I started making changes to the LookNFeel and imagest file. Piece by pice I converted it from TaharezLook into what it is now.




And yes, I wouldn't have minded having a better tool to change those files, but a XML editor will do.


Again, it's not really about editing the files. What my problem is that things are needing to be edited that, from the reading and from intuition, should not need to be =p

I simply use edxor [a plain text editor] for editing them. Maybe I'll look into something else that is as light weight that offers slightly more niceties, but that's a different topic :p

To get started, maybe back on track: Let's say I want to change all black colors for the WindowsLook skin/looknfeel to now be white [only talking about the colors that are set via code [xml], not the colors in the imageset's .tga file]. How would I do that?


Open the LookNFeel-file with a text editor. Use 'replace' function and search for 'FFFFFFFF' and replace it with 'FF000000'.


Well yes. As I stated several times, I have done this and SEE NO RESULTS. So, apparently you are doing something different than me, but from your comments, I have absolutely no idea what it could be.

So, let me say what I've done so that maybe somebody can go "oh dude, you missed THIS" lol

The current, simple goal: change all black colors in the WindowsLook skin to be white.

1) Edit WindowsLook.looknfeel by doing a find and replace. I find "FF000000" and replace with "FFFFFFFF".

2) I go over to the code side of things and code up a simple app that builds a window and a button, like so [relevant code]:

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme( "schemes/WindowsLookSkin.scheme" );
CEGUI::System::getSingleton().setDefaultFont( "Tahoma-12" );

CEGUIWindowManager   = CEGUI::WindowManager::getSingletonPtr();
CEGUISheet         = CEGUIWindowManager->createWindow( "DefaultGUISheet", "root_wnd" );
CEGUI::System::getSingleton().setGUISheet( CEGUISheet );

CEGUI::PushButton* ExitButton = (CEGUI::PushButton*)CEGUI::WindowManager::getSingletonPtr()->createWindow( "WindowsLook/Button", "QuitButton" );
CEGUI::System::getSingleton().getGUISheet()->addChildWindow( ExitButton );

ExitButton->setText( "Exit" );
ExitButton->setPosition( CEGUI::Point(0.4f, 0.7f) );
ExitButton->setSize( CEGUI::Size(0.2f, 0.1f) );



Those 2 steps is basically my whole test. Until the ExitButton's text color is white [without me manually setting it] I can only conclude the looknfeel is not being consulted properly?

So, with that bit of easiness, what vital step must I be missing? :(

LennyH
Quite a regular
Quite a regular
Posts: 92
Joined: Thu Nov 30, 2006 20:50

Postby LennyH » Wed Dec 06, 2006 16:25

At least I am not crazy. I got it to display white in my test method. Some of my gripes are still valid, of course, but at least now I can push forward [I hope!]

Isn't that one of the neat things about programming...getting so frustrated and stressed, only to be greeted by a nice smack of relief when you solve something :p

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Dec 07, 2006 13:05

LennyH wrote:At least I am not crazy. I got it to display white in my test method. Some of my gripes are still valid, of course, but at least now I can push forward [I hope!]


Maybe, to save other people from:
LennyH wrote:getting so frustrated and stressed, ...

you could tell us how you solved your problem ?

LennyH
Quite a regular
Quite a regular
Posts: 92
Joined: Thu Nov 30, 2006 20:50

Postby LennyH » Tue Dec 12, 2006 20:45

Pompei2 wrote:
LennyH wrote:At least I am not crazy. I got it to display white in my test method. Some of my gripes are still valid, of course, but at least now I can push forward [I hope!]


Maybe, to save other people from:
LennyH wrote:getting so frustrated and stressed, ...

you could tell us how you solved your problem ?


That implies I know what exactly I changed. I wound up restoring my backups and beginning from a fresh start. What I did differently the first time from the second, I honestly do not know. I listed all that I did in my above posts, and I did nothing more than what I listed. So I am at a loss.

I still hold onto my gripes that the layout editor doesn't [appear to] support any other skin but WindowsLook/Taharez and that they appear to be somehow hard coded in [instead of referencing the imageset/looknfeel]. As well as that the layout mechanisms - both in code and in the layout file should not have any reference to the skin. The layout should be a layout. The skin a skin. CEGUI should determine how a layout looks simply based on what scheme you loaded, instead of creating windows that specify exactly what scheme is to be used.

But, one step at a time. I am currently pleased well enough with CEGUI to keep going and to keep learning more about it. Some of the effects it can do [intentionally or not, I'm not sure, lol] are pretty interesting. And the ability to completely control the look through images, colors, and combinations and blends thereof is quite nice :)

Habba
Not too shy to talk
Not too shy to talk
Posts: 31
Joined: Tue Sep 19, 2006 15:21
Location: Finland
Contact:

Postby Habba » Tue Dec 12, 2006 20:51

LennyH wrote:And the ability to completely control the look through images, colors, and combinations and blends thereof is quite nice :)


Well, like Andre Lamothe once put it: The Dark Side is the path of prebuild easy-to-use libraries that will cost you our soul and the control of every aspect of your application. So, holding the control to yourself would make you a jedi of the light side. 8)


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 22 guests