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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ElectricRevolt

Pages: [1]
1
Thanks Dad, I figured it out.  I finally found some info where I was able to determine that the draw function was indeed a pure virtual function.  Once I discovered this I knew what to do.  Way easier than I envisioned.  I laugh at it now.

2
Graphics / Sprite.getSize() ??? Is there a way to do this for 2.5
« on: February 26, 2019, 06:41:38 am »
I am trying to have the size of a sprite returned so that I can change the origin to center/center but I am not sure how to do this in SFML 2.5. I was told that getSize() was depricated in 1.6.  Any idea how to achieve this?  Thanks.

3
Hi, I am a total noob to C++ and SFML but I desparately want to learn.  I am familiar with OOP but definitely not that great at it.  I was hoping that someone could provide a basic example of a class that inherits from Drawable and uses the virtual draw function to display a simple sprite with a main.cpp driver to show it in action.  I have a hard time learning if I don't have a concrete example to go by.  I've been reading just about everything that I can find on how to do this but I am struggling to grasp the concepts.
Ultimately, I am required to build a class that stores sprite data, texture, and xy coordinates to draw moveable sprites to the target window for school.  I have to implement the private virtual draw function from my class that inherits from Drawable.
If someone could show me a basic simple functional example if its not too much to ask for, then I am sure that I can figure it out.

Pages: [1]
anything