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 - SamTheT

Pages: [1]
1
Okay, it's okay to pass the render window as an argument as I found out, BUT I still can't draw text with it, it seems like I can't access the button's sf::Text class even though it is public. Any solution to that? I have no idea what's happening.

2
Hey guys! I just started using SFML and I am working on a "paint" app just for fun and I encountered a problem: I have a button class, which has sf::Text, bounds and stuff (buttons will be used to switch between brushes, for example) and I need to draw it. I found a simple solution for myself, but it doesn't work :( I'll write some code for a simplr understanding:
WindowButton::draw(sf::RenderWindow* renderWindow)
{
renderWindow->draw(buttonText);
}

But this gives me access violation exception every frame and that freaks me out! Is there any way to fix this?

P.S: there might a problem with button text though, but I'm not sure, I'll try to investigate it, but still, please help me, I need to know if passing renderWindow as an argument is actually a thing.
Thanks in advance!

Pages: [1]