UI animation engine
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
-
- Just popping in
- Posts: 10
- Joined: Tue Jul 01, 2008 07:57
Code: Select all
bool UIAnimationManager::addWindow(CEGUI::Window *window, const std::string &id, const std::string &animationName)
{
_windowDefaults[id].getScalarProperties().push_back(CEGUIProperty("Text", window->getProperty("Visible").c_str()));
}
Visible should be Text...
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
I'm not certain (not my product ), but what you could perhaps do is set up an action that sets the 'Visible' property once the fade is completed? Not certain how you'd do it, but I'd bet it's possible somehow
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: UI animation engine
Hi Everyone,
I came around this thread some days ago in the search of an animation class for CEGUI.
So I tested this usefull engine and added some new stuff to it:
The main changes are:
An animation queue to build an animation chain.
I.E.:
1. Animate window A
(if finished)
2. Animate window B
...
A callback functionality, which I borrowed, with little changes, from the CEGUI lib .
Example:
Please read the readmeto.txt for detailed information.
I hope you'll find some use for it and keep sharing!
For CEGUI Version 0.6
http://rapidshare.com/files/265654602/CEGUI-UIAE-0.4.0.zip.html
Mirror:
http://bubbleworld.co.cc/CEGUI-UIAE-0.4.0.zip
h.a.n.d
I came around this thread some days ago in the search of an animation class for CEGUI.
So I tested this usefull engine and added some new stuff to it:
The main changes are:
An animation queue to build an animation chain.
I.E.:
1. Animate window A
(if finished)
2. Animate window B
...
A callback functionality, which I borrowed, with little changes, from the CEGUI lib .
Example:
Code: Select all
class MyClass {
public:
MyClass(){};
~MyClass(){};
//CEGUI Windows
CEGUI::Window* mWindowA;
CEGUI::Window* mWindowB;
UIAE::UIAnimationManager* mGUIAnimatorManager;
void setup()
{
mGUIAnimatorManager = UIAE::UIAnimationManager::instance();
if (mGUIAnimatorManager->loadAnimationsFromFile("GUIAnimations.xml")) {
mAnimateGUI = true;
setupWindowAnimations();
}
}
void setupWindowAnimations()
{
//Adding the Windows to the AnimationManager
mGUIAnimatorManager->addWindow(mWindowA, mWindowA->getName().c_str(), "misc");
mGUIAnimatorManager->addWindow(mWindowB, mWindowB->getName().c_str(), "misc");
//Binding a callback function to the "hide" animation
mGUIAnimatorManager->subscribeCallback(mWindowA->getName().c_str(), "hide", UIAE::Callback(&hide, this));
}
bool hide(const CEGUI::EventArgs& args)
{
mWindowA->setVisible(false);
mWindowB->setVisible(true);
return true;
}
void animateWindowA()
{
mGUIAnimatorManager->animate((mWindowA->getName().c_str(),"hide");
}
void animateWindowAB()
{
UIAE::AnimationPairList animations;
animations.push_back(UIAE::AnimationPair(mWindowA->getName().c_str(),"hide"));
animations.push_back(UIAE::AnimationPair(mWindowB->getName().c_str(),"show"));
mGUIAnimatorManager->animate(animations);
}
};
Please read the readmeto.txt for detailed information.
I hope you'll find some use for it and keep sharing!
For CEGUI Version 0.6
http://rapidshare.com/files/265654602/CEGUI-UIAE-0.4.0.zip.html
Mirror:
http://bubbleworld.co.cc/CEGUI-UIAE-0.4.0.zip
h.a.n.d
Last edited by h.a.n.d on Fri Aug 14, 2009 17:30, edited 5 times in total.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: UI animation engine
Cool, it sounds like some good enhancements The link to the file however does not function for me
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 5 guests