Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GUI Library with ANIMATIONS ?  (Read 5207 times)

0 Members and 1 Guest are viewing this topic.

sggocu88

  • Newbie
  • *
  • Posts: 13
    • View Profile
GUI Library with ANIMATIONS ?
« on: February 09, 2017, 09:47:06 pm »
Hi. Please tell me a GUI library which can be easy integrate in SFML.
I need gui animations, not only buttons and scrollbars etc. I need to animate things like buttons or sprites on click , or transition effects for sprites or visual effects or something like that.
I don't like Qt, it does not fit with my needs and i really don't understand that annoyng restrictions for lgpgl license... :'(
I need free library. :(
I know about SFGUI, TGUI, wxWidgets, GTK+, I DON'T NEED THEM. I can paint buttons in paint and put them in game , i need only do animations or effects. 8)

I know about integrating HTML in a c++ app... i know html and css .. but it's a good idea to integrate HTML with SFML ? if yes, how ?

HELP ME PLEASE.
P.S: Sorry for my bad english. :D

JayhawkZombie

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: GUI Library with ANIMATIONS ?
« Reply #1 on: February 10, 2017, 03:56:21 am »
In TGUI, you can create your own Renderer for whatever element it is that you want and animate it yourself. For buttons, see https://tgui.eu/documentation/v0.7/classtgui_1_1ButtonRenderer.html.

For instance, to animate a button, change the texture every so often, see https://tgui.eu/documentation/v0.7/classtgui_1_1Texture.html.
The classes have public methods you can use to change the texture, texture rect, etc.

How good or bad it would be to integrate, say, the Chrome V8 engine and use Javascript with your SFML game really depends on what you plan to do with it.  Most games I can think of use some sort of scripting engine (my team uses Chaiscript, for example), but I've not seen many that use the V8 engine.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: GUI Library with ANIMATIONS ?
« Reply #2 on: February 10, 2017, 04:08:53 am »
You could give Hapax's Plinth library a try. It provides functionalities for tweening and other animations.

Creating a HTML/CSS renderer is not trivial at all and I wouldn't recommend it. There are libraries that can do that, but even then, HTML/CSS aren't really the best tool for the task. Their generics simply allow for all sorts of hacky things.
If you need special animations, then I definitely recommend Spriter or Spine, which are dedicated 2D animation applications. Spine even provides a runtime library for SFML, but it's not free. Spriter on the other hand offers a free and a pro version.

And for simple frame animations, you can take a look at the AnimatedSprite or Thor's animation system.
« Last Edit: February 10, 2017, 04:10:24 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sggocu88

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: GUI Library with ANIMATIONS ?
« Reply #3 on: February 10, 2017, 12:48:06 pm »
Hi. Thanks for help, but i have one more question.
So i make a simulation tycoon game and gui is very important for this game, so i need my buttons or menus or sprites to do animations like this : https://daneden.github.io/animate.css/
So which library should i use to do same thing with sprites or buttons when are clicked  ?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: GUI Library with ANIMATIONS ?
« Reply #4 on: February 11, 2017, 04:32:45 am »
I appreciate the mention of Plinth, eXpl0it3r.

Here's a short example of how it might look to use Plinth to animate similar visuals to those of the example website (I've added a few comments :D):
(click to show/hide)

Note that if you are considering animating the three-dimensional flips, you might want to take a look at Selba Ward's Sprite 3D.



EDIT: Added video of the example code.
« Last Edit: April 03, 2020, 12:12:17 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

sggocu88

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: GUI Library with ANIMATIONS ?
« Reply #5 on: February 11, 2017, 12:26:24 pm »
Thanks for help guys.

 

anything