drhodes/go-sfml — pull request #1 by acieroid (2012-08-11 09:35:09+00:00)
Title: Lots of improvements

Hi!

I wanted to port a small game I wrote with Go-SDL to use Go-SFML (because I couldn't get any Go-SDL program to work on windows, but it is fine with Go-SFML), and so I updated your bindings to have all the functionalities I needed. I made a lot of changes, mainly adding functions that were not yet in the binding, fixing some name problems, ... The game sources are available [here](https://github.com/acieroid/nov13).

Here is a non-exhaustive list of changes I made:

- Added support for unicode string in gfx-text (converting from Go's UTF-8 strings to SFML's UTF-32 strings)
- Completed CircularShape binding
- Added RectangleShape binding
- Changing the win-example to be like the official [SFML example](http://www.sfml-dev.org/documentation/2.0)
- Used an URL to import the Go-SFML package instead of importing sfml (so that people can just do `go get github.com/drhodes/go-sfml`, and then import github.com/drhodes/go-sfml to use it)
- Removed the `Get` off all accessors, to comply to Go's [guidelines](http://golang.org/doc/effective_go.html#Getters) (with the exception of the GetScale method since there already is a Scale method!)
- Improved tests with better testing and better error messages when failing
- Completed some other classes bindings (Sprite, Image, RenderWindow, ...)
- Updated the win-example and pong samples to be compatible with all those changes

Also, all these changes have been made to be compatible with the version of CSFML I personally have on my computer, which is *not* the RC (the RC version seems a bit incomplete, missing classes like RectangleShape and having non consistent naming). The version I have is the git version as of 2012-05-04 (the last packaged version in Archlinux's repositories). I created the `git` branch on my fork to contain a version of the binding compatible with the latest git version of CSFML. Depending on which version of CSFML you are working with, I can merge those two branch and update my version of CSFML to the latest git version.

I now consider that the current version of Go-SFML is usable (even though not complete yet), and maybe you should update the README to say so (I don't consider the build currently broken).

Should you have any further precision or justification on any change I made, don't hesitate to ask me.

Thanks!