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

Pages: [1]
1
Graphics / Weird Error
« on: November 12, 2008, 01:45:43 am »
Thanks, it worked :)[Making the time_string mutable]

2
Graphics / Weird Error
« on: November 12, 2008, 12:58:46 am »
Thanks. Since the original Render function is const, how can I solve this?

3
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?

4
Window / [solved]Custom Cursor
« on: November 11, 2008, 03:28:14 am »
Works fine, thanks :)

5
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?

6
Window / [solved]Drawable Class
« on: October 26, 2008, 08:18:15 pm »
Thanks for the answer, looks good. But I keep getting the message "`RenderTarget' has not been declared". I use Codeblocks on windows. System.hpp,Window.hpp and Graphics.hpp are included.
It works however when I redefine the Render function this way:
Code: [Select]
protected: virtual void Render(const RenderWindow &Window) const

7
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