Home » Developing U++ » U++ Developers corner » styling of widgets ( animation / look and feel)
Re: styling of widgets ( animation / look and feel) [message #59810 is a reply to message #59808] |
Thu, 20 April 2023 21:51   |
 |
mirek
Messages: 14265 Registered: November 2005
|
Ultimate Member |
|
|
dodobar wrote on Thu, 20 April 2023 19:17Thanks, however the base classes I provided could still be relevant with a few modifications
To be more in line with what you're suggesting , possibly functions passed to it as the easing
Those are trivialities. Obviously you need some time based transition to animate, but that is not the problem.
Problem is that following code:
Quote:
Color start_color = SColorFace();
Color end_color = SColorHighlight();
Color current_color = animation.LerpColor(start_color, end_color);
cannot be code. It has to be parametrised so it can be replaced it with any (or no) animation
Think about Button. Its look (and feel) is parametrized as
struct Style : ChStyle<Style> {
Value look[4];
Color monocolor[4], textcolor[4];
Point pressoffset;
int focusmargin;
int overpaint;
Font font;
Image ok, cancel, exit;
bool transparent;
bool focus_use_ok;
};
Now buton has 4 basic states (normal, hot (when mouse is over), pushed, disabled). Proper animation support most provide transition beween any 2 of them (that is 12 transitions if I count right) while allowing to set such animation in Style somehow and also while not singificantly complicating Option::Draw. Ideally, animation code, if any, should be completely outside of Option code.
EDIT: Moreover, it needs correct transitions between partial states (e.g. user moves mouse over, so hot state ends before animation is complete).
Mirek
[Updated on: Thu, 20 April 2023 21:53] Report message to a moderator
|
|
|
 |
|
styling of widgets ( animation / look and feel)
By: dodobar on Sun, 16 April 2023 20:54
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: Novo on Mon, 17 April 2023 15:53
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Tue, 18 April 2023 09:17
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 00:37
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Thu, 20 April 2023 08:58
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 13:00
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 13:06
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Thu, 20 April 2023 14:22
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 19:17
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Thu, 20 April 2023 21:51
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 22:36
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Thu, 20 April 2023 23:55
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Fri, 21 April 2023 07:56
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Fri, 21 April 2023 11:40
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Sat, 22 April 2023 14:44
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Sun, 23 April 2023 16:27
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Mon, 24 April 2023 09:23
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Mon, 09 September 2024 09:10
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Mon, 09 September 2024 10:03
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: dodobar on Sun, 22 September 2024 09:28
|
 |
|
Re: styling of widgets ( animation / look and feel)
By: mirek on Sun, 22 September 2024 09:38
|
Goto Forum:
Current Time: Sat Jul 12 20:55:46 CEST 2025
Total time taken to generate the page: 0.04364 seconds
|