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

Author Topic: Plot widget  (Read 2310 times)

0 Members and 1 Guest are viewing this topic.

vams

  • Newbie
  • *
  • Posts: 8
    • View Profile
Plot widget
« on: May 16, 2013, 03:05:41 pm »
Hi,
There's a fast way to implement a widget that plot a function?
I'd like to use it to keep track of some quantities in a game.

Thanks in advance!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Plot widget
« Reply #1 on: May 16, 2013, 03:21:31 pm »
No idea what you mean by widget...
SFML is not a GUI library, it only provides basic drawing function. So if you want to draw a function, just go ahead and use for instance a sf::VertexArray, define some points by running the math function and let it display.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

vams

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Plot widget
« Reply #2 on: May 16, 2013, 04:25:47 pm »
That's what I was looking for, thanks!
Now I can create my widget plot class, just joining together a vertexarray class, some sort of abstract function class and a method to draw.

 

anything