Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » 2025.1 (alpha)
Re: 2025.1 (alpha) [message #61488 is a reply to message #61487] Mon, 24 February 2025 04:42 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1224
Registered: August 2007
Senior Contributor
Hello dodobar,

Quote:
Awesome, is there any docs on the animation features?
is this expandable to colors and layouts? or drawing?

Cheers
C


Yes you can animate both values and Ctrls.


void Animate(Ctrl& ctrl, const Upp::Rect& target, int type = -1)
void Animate(Ctrl& ctrl, int x, int y, int cx, int cy, int type = -1)
Animates a ctrl to transition smoothly to a target rectangle using a specified animation effect. The animation effect type can be GUIEFFECT_SLIDE, which moves the control gradually to the target position, or GUIEFFECT_FADE, which gradually adjusts the control's transparency from fully transparent to fully opaque. If the type is set to a negative value, the function will use the global UI setting. Any other value will cause the the ctrl to jump directly to the target rectangle without any animation.


void Animate(Event<double> update, int duration = 100)
Performs GUI animation, repeatedly calling update with increasing numbers from the interval 0..1 for duration milliseconds.


void Animate(Vector<Ptr<Ctrl>>& ctrls, const Vector<Rect>& targets, int duration = 100)
Animates the transition of multiple ctrls from their current positions to the target positions specified by the targets parameter, over a given duration. The default duration is 100 miliseconds. The number of ctrls must match the number of the target rectangles otherwise the function will silently return without modifying anything.


template <class T>
void Animate(Vector<T>& data, const Vector<T>& targets, Event<> update, int duration = 100)
Animates the transition of multiple data values from their current positions to the target positions specified by the targets parameter, over a given duration. The default duration is 100 miliseconds. The number of data values must match the number of the targets values otherwise the function will silently return without modifying anything. After each animation step Animate calls update


Best regards,
Oblivion


[Updated on: Mon, 24 February 2025 04:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 2024.1a (rc)
Next Topic: 2025.1rc
Goto Forum:
  


Current Time: Fri Aug 15 18:56:04 CEST 2025

Total time taken to generate the page: 0.00729 seconds