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

Author Topic: Why I can't setTexture?  (Read 1794 times)

0 Members and 1 Guest are viewing this topic.

LordNani

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Why I can't setTexture?
« on: May 31, 2019, 11:11:29 pm »
How can I fix it?
  sf::Texture pencilIcon;
  sf::RectangleShape testShape;
  testShape.setTexture(pencilIcon);
I know, it says about *texture, but I don't know how to pass it(setTexture(*pencilIcon) doesn't work)

[FIXED]
« Last Edit: May 31, 2019, 11:15:47 pm by LordNani »

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Why I can't setTexture?
« Reply #1 on: May 31, 2019, 11:52:05 pm »
Not sure if [FIXED] means you guessed but the proper way is &pencilIcon.
Back to C++ gamedev with SFML in May 2023

LordNani

  • Newbie
  • *
  • Posts: 12
    • View Profile
    • Email
Re: Why I can't setTexture?
« Reply #2 on: June 01, 2019, 12:30:34 pm »
Not sure if [FIXED] means you guessed but the proper way is &pencilIcon.
Thx, yeah, I did exactly this!