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.


Topics - ElChupacabra

Pages: [1]
1
Graphics / Weird Error
« on: November 12, 2008, 12:25:54 am »
This is the piece of Code troubling me:
Code: [Select]

void ClockString::Render(const RenderWindow &Window) const
{
  time_string.SetText("Some Stuff");
  Window.Draw(time_string);
}

ClockString is a class inherited from sf::Drawable. time_string is a Member of the type sf::String. The Problem is I get this error when compiling:
Quote

 error: passing `const sf::String' as `this' argument of `void sf::String::SetText(const std::string&)' discards qualifiers

I'm not into the debts of c++. Can someone explain to me what is wrong here?

2
Window / [solved]Custom Cursor
« on: November 07, 2008, 02:54:25 pm »
How can I set a custom cursor(like a crosshair) for a given RenderWindow? Are there some Methods in SFML for this?

3
Window / [solved]Drawable Class
« on: October 25, 2008, 03:26:43 am »
Hi guys,
Can you maybe help me with this? How do I create a class which I can hand over to the sf::RenderWindow::Draw() function? Lets say my class consists of drawable objects like sf::String and sf::Shape. In other words what I want to do is:
Code: [Select]

class myButton
{
  Shape shape;
  String string;
  myButton(..stuff) { ... stuff}
};
int main()
{
  RenderWindow App();
  myButton button();
  App.Draw(button);
...
}

Pages: [1]
anything