Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: ArcadeBliss on October 14, 2016, 07:03:05 AM

Title: AM's sfml implementation?
Post by: ArcadeBliss on October 14, 2016, 07:03:05 AM
In sfml it is possible to change the origin point of an sf:shape, text, and sprite by setting the origin property. This allows objects to be rotated using the center point instead of the upper left point of an object.

Raygun, would it be very involved to expose this property in squirrel?

Here is the link to the sfml documentation for sf::Transformable http://www.sfml-dev.org/tutorials/2.4/graphics-transform.php
Title: Re: AM's sfml implementation?
Post by: raygun on November 02, 2016, 11:14:54 PM
Hey there, it actually looks pretty straight forward... in fact I 've got it implemented now for the next version jst looking at it  :D
Title: Re: AM's sfml implementation?
Post by: ArcadeBliss on November 04, 2016, 06:59:30 AM
Hey there, it actually looks pretty straight forward... in fact I 've got it implemented now for the next version jst looking at it  :D


You rock! You dont know how well this will help me and other themers. It will now be possible to do a slew od things that were not possible before.
Title: Re: AM's sfml implementation?
Post by: liquid8d on November 29, 2016, 06:22:48 PM
Awesome! I've had that request in for a while :)
Title: Re: AM's sfml implementation?
Post by: raygun on December 02, 2016, 07:13:31 PM
Yeah I can be pretty dim sometimes, it didn't really click for me until ArcadeBliss pointed out that the setorigin function is right there in sfml to do exactly what was needed.. duoh
Title: Re: AM's sfml implementation?
Post by: liquid8d on December 03, 2016, 08:38:33 AM
the set origin is a huge help, were you able to look at the shapes? Just simple rectangles and possibly circles would be helpful. I worked around rectangles by using a single white pixel image and setting color but it'd be nice if it was an actual object.