Drop Shadows on FrameWindows?

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
SuperGeek
Just popping in
Just popping in
Posts: 16
Joined: Wed Oct 19, 2005 18:56

Drop Shadows on FrameWindows?

Postby SuperGeek » Tue Sep 19, 2006 14:30

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

User avatar
SuperGeek
Just popping in
Just popping in
Posts: 16
Joined: Wed Oct 19, 2005 18:56

Postby SuperGeek » Sat Sep 23, 2006 20:48

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.

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

Postby Pompei2 » Sun Sep 24, 2006 17:22

I'm sorry, I can't help you, but your graphics guy is really good :)

cutenoob
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Jul 11, 2006 02:28
Location: Shanghai

Postby cutenoob » Tue Sep 26, 2006 03:13

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


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests