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

Pages: [1]
1
General / Beginner mistakes, help me please.
« on: July 08, 2012, 07:07:07 pm »
I am a newbie and trying to work with SFML in visual studio 2010. I decided to analyze samples. Do not know how (with the aid of the search) I came across this example.
http://en.sfml-dev.org/forums/index.php?topic=7100.0
I copied the code into my project ... but in the following piece of code


m_shape.SetOrigin(10,10);
m_shape.SetFillColor(sf::Color(255, 0, 255, 255));

ground.RECT.SetOrigin(4000,25);
   ground.RECT.SetFillColor(sf::Color(200,75,20,255));
    ground.SHAPE.SetAsBox(4000.0f/PPM,25.0f/PPM);
    ground.BOD = world.CreateBody(&ground.DEF);
    ground.FIX.shape = &ground.SHAPE;
   ground.FIX.density = .7f;
   ground.FIX.friction = .9f;
    ground.BOD->CreateFixture(&ground.SHAPE,1.0f);

   //text stuff to appear on the page
   sf::Font myFont;
   if (!myFont.LoadFromFile("../res/athena_u.TTF"))
      return EXIT_FAILURE;
    sf::Text Text("FPS", myFont);
    Text.SetCharacterSize(20);
    Text.SetColor(sf::Color(0, 255, 255, 255));
    Text.SetPosition(25,25);
   //added these guys BHN
   sf::Text clearInstructions("Press [Space] to reset");
   sf::Text jumpInstructions("Press [A] to make blocks jump");
   clearInstructions.SetCharacterSize(18);
   jumpInstructions.SetCharacterSize(18);
   clearInstructions.SetColor(sf::Color(200, 55, 100, 255));
   jumpInstructions.SetColor(sf::Color(200, 55, 100, 255));
   clearInstructions.SetPosition(25, 50);
   jumpInstructions.SetPosition(25, 70);

 vs2010  tells me

'SetOrigin' : is not a member of 'sf::RectangleShape'
'SetFillColor' : is not a member of 'sf::RectangleShape'
'LoadFromFile' : is not a member of 'sf::Font'
'SetCharacterSize' : is not a member of 'sf::Text'
'SetColor' : is not a member of 'sf::Text'
'SetPosition' : is not a member of 'sf::Text'
'IsOpen' : is not a member of 'sf::RenderWindow'
'SetRotation' : is not a member of 'sf::RectangleShape'
'SetPosition' : is not a member of 'sf::RectangleShape'

But in the manual also says that these classes have these features.
I use sfml2.0rc.
Please tell me what I'm doing wrong.
Thanks in advance. I hope I described the problem properly.

Pages: [1]
anything