Compiling sources.

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
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Wed Apr 28, 2004 18:07

Hi;
Firstly thanks for this great GUI. I'm learning how to code a GUI system with your sources, thanks a lot.

I have some problems when compiling your sources. I tried something but can not compile them. I have downloaded "crayzedsgui-0.300.000-source.zip" file from this site. I extracted this zip file and opened the solution in "source" folder. I'm using Visual Studio .NET 2003 and my OS is Windows XP Professional. I also have DirectX 9.0b SDK installed in Retail mode. With these settings, when I want to compile your code, it gives me many many errors. All the errors are same, ".h" and ".cpp" files can not opened. One of the error like below:

Code: Select all

e:\Development\Sources\dotNET\DirectX GUI\crayz\Source\CrayZEdGUIBase\GUILib\Window.cpp(29): fatal error C1083: Cannot open include file: 'CrayZEdGUIBase/GUILib/window.h': No such file or directory


Please help me about this problem.
Thanks for this great GUI again.

Ali Polat OLU

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Wed Apr 28, 2004 18:58

Hi,

The first thing to check is that the package was extracted properly and that file does actually exist :)

Assuming that's ok, can you confirm that the additional include entry is properly specified in the settings for each project (that's in C/C++ >> General in the properties box). This should be set to "..\..\Include".

If this does not work perhaps you might try adding the include path to the C++ include paths in Tools>Options>Projects>VC++ Directories.

Can't think of anything else off hand that the moment, but hopefully one of the above suggestions will get you compiling okay.

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Wed May 05, 2004 18:34

Hi again;

I compiled the sources. But I have a problem too. I'm changing WinLook project. I opened WinLook.tga file in PhotoShop. And draw something. After that I added new sprites contionusly and updated new SpriteCount field in file. New SpriteCount is 88, I added 8 new sprites. I opened WLFrameWindow.h file and changed the sprite numbers (SPR_LEFT_EDGE, etc.). After that i can not see new border :o( Are there anything wrong?

Thanks again for this great GUI.

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Wed May 05, 2004 18:54

I'll hazard a guess that this is being caused by the fact you may not have modified the alpha channel to properly un-mask the new imagery components.

If you did properly modify the alpha-channel, post back and I'll see if I can think of anything else.

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Wed May 05, 2004 19:21

I don't know how to set alpha channel in PhotoShop. I only draw new border for WLFrameWindow starting from (X=2, Y=90) and simply save the file.

Thanks for you interest. :D

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Wed May 05, 2004 19:47

Yes, this is definately why you can't see the imagery then, as it's all being rejected by the alpha-test :)

Errrm... I don't use Photoshop (though I have previously), I think you can access the alpha channel by selectimg from one of the control boxes on the right (the one whee you can select to show red, green, blue, channels etc). Failing that you could load a selection from the alpha channel, edit the selection to include you new parts, and then save the selection back to the alpha channel. You should also be able to use the same technique with a mask.

Sorry I can't be of more direct or immediate help, since I no longer have access to this package (I'm using PSP8.1 at the moment, though this has bugs in the Targa saving, which can be fun to work araound also!).

Possibly someone else reading may have more experience with Photoshop and can advise on how to edit the alpha channel...

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Thu May 06, 2004 10:29

Yep, you are right. I forgot the alpha channel. I opened file again, and draw alpha information in photoshop. now it's working :o). thanks a lot.

byee.

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Thu May 06, 2004 13:22

8) Glad you got it working...

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Fri May 07, 2004 15:36

Hi again. I need transparent rendering in your GUI. When will you distribute source of transparency supported GUI System. or can you explain to me how to implement transparency to the controls.

Thanks,

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Fri May 07, 2004 17:45

Hello,

The source with alphablending (transparency) has been available via CVS for months, though I assume you're looking for a ready made downloadable .zip package...

Which can be had from here: http://crazy-eddie.myby.co.uk/files/crayzedsgui-source.zip

The Taharez demo is modified to use alpha transparency but the Windows look demo is not (actually done intentionally to show that old code, especially the actual widget code, compiles virtually unchanged). Having said this, all controls and widgets support the alpha setting in the base classes, so it's fairly trivial to get the Windows look demo to work with alpha blending as well.

To use the newer system, you will require slight modification to your initialisation sequence. You no longer set a pointer to the Direct3D device, but pass this when creating a 'Renderer' object - you then have to set a pointer to the renderer object.

Hope this helps :)

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Sun May 09, 2004 20:09

Hi;

I have two question, sorry about this. If you help me I will be glad :)

First one is making a background image. I created a PLDesktop Class. This class is derived from CEGUI::Window. It has a RenderableImage file. Everything is good, I can make some colour effects. But I can not load an image from disk. I tried to write a function to RenderableImage class but I can not do this, because my DirectX knowledge and experience is not good :(

Can you explain me that how to load image file from disk.

The second one is about Round Rect FrameWindows. I made changes on WinLook.tga file and make RoundRect FrameWindows. Frame's outter side is great but I want RoundRect also inner side. The ClientArea class is hacking this :D How can i make RoundRect ClientArea or RoundRect Windows (with inner and outter sides)

thanks.

P.S. I'm trying to reach a great looking GUI. You can see it here:
http://www.sigames.com/graphics/images/651.gif
This is FM 2005's screen shot. It's great for me, and I'm trying to develop and render GUI looks like this. You can see framewindow that has RoundRect corners from this picture.

You can also see all of the GUI images from:
http://www.sigames.com/softography.php?type=view&id=16
Thanks for your help and thanks for this great GUI system.

Take Care,

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Mon May 10, 2004 09:19

For loading an image, I would recommend creating a PTS2DSpriteSet that contains just one large sprite. This can then be used with RenderableImage. This is probably the easiest way to create an image that uses the system as-is. So you would have a code section similar to this...

Code: Select all

PTS2DSpriteSet   myBackdrop;
myBackdrop->load("myBackdropImage.bmp");
Utils::instance()->registerSpriteSet(myBackdrop);


The registerSpriteSet call is not required, but will properly re-load the image after a device reset. If you leave this call out you would have to somehow do the reload manually.

The curved inner borders is definately more of a problem :( This is one of the flaws in the method used to implement client areas, but there are a couple of solutions.

First, you could modify the rendering code for the client area so that it alters the z co-ordinate used for drawing - this will effectively move the client area rendering behind the window frame and your curved inner corners will not be covered over. Basically, you'd get the current Z, subtract the value of GUI_Z_ADJUSTMENT (to get back to the same layer as the frame), and then subtract some small amount more to move just behind the frame.

The second method is to create a new Client area window that has its own frame that has curved outer corners that fit into the curved inner corners of the main window frame (if you see what I mean).

The second approach is technically the 'right' way of doing the job but is more work. The first method is pretty much a quick hack, but should provide the results you're looking for.

Hope this helps :-D

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Mon May 10, 2004 10:09

A third way for solving the client area issue...

Get the frame window to do all the rendering (including the translucent background part in the middle), and modify the Client area so that it does no rendering of it's own. This is probably about the best solution, as it gives you all the control you need without resorting to any kind of hack to get it done.

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Compiling sources.

Postby alipolatolu » Mon May 10, 2004 12:56

hi;

I solved Desktop Background with PTS2DSpriteSet;) Thank you. But I couldn't load file directly. I need to create sdf.txt file first, set the sprite info in this file. After that i can load file by using this sdf.txt file. Is that right, or are there any other way to load files directly.

Code: Select all

   PTS2DSpriteSet*   myBackdrop = new PTS2DSpriteSet(Utils::instance()->getRenderer());
   myBackdrop->load("..\\GfxData\\Backgrounds.sdf.txt");
   Utils::instance()->registerSpriteSet(*myBackdrop);
   
   d_Background.setPostition(0, 0, 0.0f);
   d_Background.setImage(myBackdrop, SPR_DESKTOP);
   d_Background.setRenderType(RenderableImage::RenderType::STRETCHED);
   d_Background.setColours(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
   d_Background.setSize(1024,768);


My code is like that. d_Background is RenderableImage.

About curved clientareas:
Can you please explain a little bit more. How can I modify the client area. Will I change the d_ActiveClientArea from Window* to FrameWindow* ?

I'm sorry, I'm tiring you :(

Thanks for your help.
P.S. If you want we can speak at ICQ or any other place.

Polat

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Compiling sources.

Postby CrazyEddie » Mon May 10, 2004 13:16

Yes your approach to rendering the background is what I meant. Although this means having that sdf.txt file, it's the only way of doing it without modifying the system. This approach has the advantage of also allowing you to change the image loaded by editing the sdf.txt file rather than doing a re-compile. :)

FrameWindow stuff
============
Depending on which method you want to use, this will be different. But hopefully this will give you the basic idea....

In WLClientArea class modify the WLClientArea::drawSelf method so that it does not do anything. This will not affect child windows attached to the client area.

In WLFrameWindow, add a RenderableImage like the one in WLClientArea, and initialise it however you like (for whatever you want to appear as the client area in windows.

In WLFrameWindow::onSize add some code to re-size the RenderableImage you added (use the code out of WLClientArea::onSize but keep the size a bit smaller than the size of the outer frame otherwise you will see the backdrop corners showing behind your frame's outer-curves).

Now add code into WLFrameWindow::drawWindowFrame that will draw the RenderableImage you added to WLFrameWindow - make this call before the code that draws the frame, then the frame *should* appear infront of the backdrop for the window (if not try it the other way around).


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests