Jump to content

  • Log In with Google      Sign In   
  • Create Account


Lysy

Member Since 09 Mar 2013
Offline Last Active Yesterday, 12:22 PM

Topics I've Started

little feedback with UI and callbacks

22 July 2014 - 02:01 PM

Hello there. So I'm playing aroung with python and pysfml, started writing pong clone. I began with creating UI, and I got little problem with callbacks and buttons. As you will see in the code (link below) in gamestatesettings.py I create a list of buttons, and in each of them I assign a callback method to invoke when pressed. And in this very method, I also invoke code on the same button explicitly e.g.

    def diff_up(self, engine):
        engine.game_settings.difficulty_up()
        self.butt_list[0].set_text('# ' + engine.game_settings.get_difficulty())

which i find inconvenient.

And I don't have any idea how could I do this look nice. So maybe someone here will be so kind and suggest some solution for me?

 

 

https://github.com/cosmonaut-paul/pysfml-pong


is anyone using pySFML?

29 June 2014 - 02:19 PM

Hello there!

 

I got a little question. Recently I started doing some stuff with python and pysfml, and it occured to me, that barely anyone is using pysfml. I looked up on github, and comparison of pygame vs pysfml projects is just shattering for the latter. Also it's not even listed on https://wiki.python.org/moin/PythonGameLibraries. So it makes me wonder, is it just so unpopular (which is weird, considering popularity of original sfml for c++), or maybe a bad tool (which it doesn't seem to be, so far I think it's pretty good)?


PARTNERS