Page 1 of 1

Drop Shadows on FrameWindows?

Posted: Tue Sep 19, 2006 14:30
by SuperGeek
The Problem:
I have a very talented photoshop guy on board to handle the skin for my CEGUI game. He is a bit too talented actually. He drew me up a skin that includes drop shadows on the windows. A very nice touch actually.

I couldn't find any information on this in the forums and it was clear that CEGUI didn't natively support such a thing... so I got to thinking. I like rigging up alaborate over the top ways to do simple things, so this is what I did:

The Solution:
I created child windows in my FrameWindow and set the edges off of the screen, then disabled the object and made it's disabled state imagery that of the drop shadow. I did this because disabled objects are not there when considering hit areas. I created as many as was needed and aligned them such that they make a smooth drop shadow around the left and bottom of the FrameWindow.

The Side Effect:
When you roll up a window, the shadow stays where it is. I guess there is a way to capture a rollup or rolldown event for any window globally and add some code to hide/show the shadows for the FrameWindow and the Titlebar, but I don't know how just yet. If anyone has a pointer or two, I'd listen.

The Question:
My question is (other than those posed above) has anyone else found a different/better way to do this? or is there some major flaw in this way that I have not noticed yet?

The Screen Shot:
Image

Posted: Sat Sep 23, 2006 20:48
by SuperGeek
No one has any comments? Has no one tried to add drop shadows before?

Actually, now I have found an interesting issue. My CEGUI log states that my child windows do not exist for all frame windows. This is odd since they all display and function just fine. Any ideas?

23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__auto_titlebar__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__auto_closebutton__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__TitleBarShadow__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__WindowShadowLeft__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__WindowShadowLeftBottom__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__WindowShadowBottomLeft__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__auto_titlebar__' does not exist within the system
23/09/2006 16:01:21 (Error) Exception: WindowManager::getWindow - A Window object with the name 'TestRoot/Master__WindowShadowBottomRight__' does not exist within the system

...

23/09/2006 16:01:22 (InfL1) ---- Successfully completed loading of GUI layout from '../datafiles/Datalink/Test.layout' ----
23/09/2006 16:01:22 (InfL1) ---- Creating Lua bindings ----


It does this for every FrameWindow object loaded. All of my layouts report loading correctly, and display correctly too.

Posted: Sun Sep 24, 2006 17:22
by Pompei2
I'm sorry, I can't help you, but your graphics guy is really good :)

Posted: Tue Sep 26, 2006 03:13
by cutenoob
My suggestion is to make a custom Widget :) :)

if so,First you should read the .looknfeel file make sure what're those variables means for,,,and make your drop shadow window as your need,,dont forget the schemes file...

i think it's the best way to make your window...


ps: you can search the looknfeel to find more infomation on forum/wiki..Good Luck man :D :D